69 #ifndef OR_TOOLS_MATH_OPT_CPP_CALLBACK_H_
70 #define OR_TOOLS_MATH_OPT_CPP_CALLBACK_H_
77 #include "absl/container/flat_hash_set.h"
78 #include "absl/status/status.h"
79 #include "absl/time/time.h"
80 #include "absl/types/span.h"
81 #include "ortools/math_opt/callback.pb.h"
91 struct CallbackResult;
115 kMip = CALLBACK_EVENT_MIP,
158 CallbackRegistrationProto
Proto()
const;
168 absl::flat_hash_set<CallbackEvent>
events;
265 CallbackResultProto
Proto()
const;
const ModelStorage * storage() const
std::function< CallbackResult(const CallbackData &)> Callback
MATH_OPT_DEFINE_ENUM(BasisStatus, BASIS_STATUS_UNSPECIFIED)
Collection of objects used to extend the Constraint Solver library.
LinearExpression expression
CallbackDataProto::PresolveStats presolve_stats
CallbackData(CallbackEvent event, absl::Duration runtime)
std::optional< VariableMap< double > > solution
CallbackDataProto::SimplexStats simplex_stats
CallbackDataProto::BarrierStats barrier_stats
CallbackDataProto::MipStats mip_stats
CallbackRegistrationProto Proto() const
MapFilter< Variable > mip_solution_filter
bool add_lazy_constraints
absl::Status CheckModelStorage(const ModelStorage *expected_storage) const
MapFilter< Variable > mip_node_filter
absl::flat_hash_set< CallbackEvent > events
const ModelStorage * storage() const
BoundedLinearExpression linear_constraint
std::vector< VariableMap< double > > suggested_solutions
void AddLazyConstraint(BoundedLinearExpression linear_constraint)
CallbackResultProto Proto() const
absl::Status CheckModelStorage(const ModelStorage *expected_storage) const
void AddUserCut(BoundedLinearExpression linear_constraint)
std::vector< GeneratedLinearConstraint > new_constraints