14 #ifndef OR_TOOLS_MATH_OPT_CORE_SOLVER_H_ 15 #define OR_TOOLS_MATH_OPT_CORE_SOLVER_H_ 20 #include "absl/status/statusor.h" 21 #include "ortools/math_opt/callback.pb.h" 24 #include "ortools/math_opt/model.pb.h" 25 #include "ortools/math_opt/model_parameters.pb.h" 26 #include "ortools/math_opt/model_update.pb.h" 27 #include "ortools/math_opt/parameters.pb.h" 28 #include "ortools/math_opt/result.pb.h" 61 using Callback = std::function<CallbackResultProto(
const CallbackDataProto&)>;
65 static absl::StatusOr<std::unique_ptr<Solver>>
New(
66 SolverType solver_type,
const ModelProto&
model,
67 const SolverInitializerProto& initializer);
73 absl::StatusOr<SolveResultProto>
Solve(
75 const ModelSolveParametersProto& model_parameters = {},
76 const CallbackRegistrationProto& callback_registration = {},
84 absl::StatusOr<bool>
Update(
const ModelUpdateProto& model_update);
87 Solver(std::unique_ptr<SolverInterface> underlying_solver,
88 ModelSummary model_summary);
90 const std::unique_ptr<SolverInterface> underlying_solver_;
91 ModelSummary model_summary_;
97 #endif // OR_TOOLS_MATH_OPT_CORE_SOLVER_H_
static absl::StatusOr< std::unique_ptr< Solver > > New(SolverType solver_type, const ModelProto &model, const SolverInitializerProto &initializer)
Solver & operator=(const Solver &)=delete
Solver(const Solver &)=delete
std::function< CallbackResultProto(const CallbackDataProto &)> Callback
absl::StatusOr< SolveResultProto > Solve(const SolveParametersProto ¶meters, const ModelSolveParametersProto &model_parameters={}, const CallbackRegistrationProto &callback_registration={}, Callback user_cb=nullptr)
Collection of objects used to extend the Constraint Solver library.
absl::StatusOr< bool > Update(const ModelUpdateProto &model_update)