14#ifndef OR_TOOLS_MATH_OPT_CORE_BASE_SOLVER_H_
15#define OR_TOOLS_MATH_OPT_CORE_BASE_SOLVER_H_
22#include "absl/status/statusor.h"
23#include "ortools/math_opt/callback.pb.h"
24#include "ortools/math_opt/infeasible_subsystem.pb.h"
25#include "ortools/math_opt/model.pb.h"
26#include "ortools/math_opt/model_parameters.pb.h"
27#include "ortools/math_opt/model_update.pb.h"
28#include "ortools/math_opt/parameters.pb.h"
29#include "ortools/math_opt/result.pb.h"
54 using Callback = std::function<CallbackResultProto(
const CallbackDataProto&)>;
93 friend std::ostream&
operator<<(std::ostream& out,
103 virtual absl::StatusOr<SolveResultProto>
Solve(
107 virtual absl::StatusOr<ComputeInfeasibleSubsystemResultProto>
124 virtual absl::StatusOr<bool>
Update(ModelUpdateProto model_update) = 0;
virtual absl::StatusOr< SolveResultProto > Solve(const SolveArgs &arguments)=0
Solves the current model (including all updates).
virtual ~BaseSolver()=default
virtual absl::StatusOr< ComputeInfeasibleSubsystemResultProto > ComputeInfeasibleSubsystem(const ComputeInfeasibleSubsystemArgs &arguments)=0
Computes an infeasible subsystem of model (including all updates).
std::function< CallbackResultProto(const CallbackDataProto &)> Callback
Callback function type for MIP/LP callbacks.
virtual absl::StatusOr< bool > Update(ModelUpdateProto model_update)=0
std::function< void(const std::vector< std::string > &)> MessageCallback
BaseSolver & operator=(const BaseSolver &)=delete
BaseSolver(const BaseSolver &)=delete
An object oriented wrapper for quadratic constraints in ModelStorage.
Arguments used when calling ComputeInfeasibleSubsystem().
const SolveInterrupter * interrupter
friend std::ostream & operator<<(std::ostream &out, const ComputeInfeasibleSubsystemArgs &args)
MessageCallback message_callback
SolveParametersProto parameters
Arguments used when calling Solve() to solve the problem.
SolveParametersProto parameters
ModelSolveParametersProto model_parameters
const SolveInterrupter * interrupter
CallbackRegistrationProto callback_registration
friend std::ostream & operator<<(std::ostream &out, const SolveArgs &args)
MessageCallback message_callback