Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
|
The value returned by the Callback function. More...
#include <callback.h>
Classes | |
struct | GeneratedLinearConstraint |
Public Member Functions | |
void | AddUserCut (BoundedLinearExpression linear_constraint) |
void | AddLazyConstraint (BoundedLinearExpression linear_constraint) |
absl::Status | CheckModelStorage (const ModelStorage *expected_storage) const |
CallbackResultProto | Proto () const |
Public Attributes | |
bool | terminate = false |
Stop the solve process and return early. Can be called from any event. | |
std::vector< GeneratedLinearConstraint > | new_constraints |
std::vector< VariableMap< double > > | suggested_solutions |
A solution or partially defined solution to give to the solver. | |
The value returned by the Callback function.
Definition at line 225 of file callback.h.
|
inline |
Adds a "lazy constraint," a linear constraint that excludes integer points. Use only for CallbackEvent::kMipNode and CallbackEvent::kMipSolution.
Definition at line 246 of file callback.h.
|
inline |
Adds a "user cut," a linear constraint that excludes the current LP solution but does not cut off any integer points. Use only for CallbackEvent::kMipNode.
Definition at line 240 of file callback.h.
absl::Status operations_research::math_opt::CallbackResult::CheckModelStorage | ( | const ModelStorage * | expected_storage | ) | const |
Returns a failure if the referenced variables don't belong to the input expected_storage (which must not be nullptr).
Definition at line 115 of file callback.cc.
CallbackResultProto operations_research::math_opt::CallbackResult::Proto | ( | ) | const |
Returns the proto equivalent of this object.
The caller should use CheckModelStorage() as this function does not check internal consistency of the referenced variables.
Definition at line 133 of file callback.cc.
std::vector<GeneratedLinearConstraint> operations_research::math_opt::CallbackResult::new_constraints |
The user cuts and lazy constraints added. Prefer AddUserCut() and AddLazyConstraint() to modifying this directly.
Definition at line 265 of file callback.h.
std::vector<VariableMap<double> > operations_research::math_opt::CallbackResult::suggested_solutions |
A solution or partially defined solution to give to the solver.
Definition at line 268 of file callback.h.
bool operations_research::math_opt::CallbackResult::terminate = false |
Stop the solve process and return early. Can be called from any event.
Definition at line 261 of file callback.h.