14#ifndef OR_TOOLS_MATH_OPT_CORE_SOLVER_H_
15#define OR_TOOLS_MATH_OPT_CORE_SOLVER_H_
19#include "absl/status/status.h"
20#include "absl/status/statusor.h"
21#include "ortools/math_opt/callback.pb.h"
26#include "ortools/math_opt/infeasible_subsystem.pb.h"
27#include "ortools/math_opt/model.pb.h"
28#include "ortools/math_opt/model_parameters.pb.h"
29#include "ortools/math_opt/model_update.pb.h"
30#include "ortools/math_opt/parameters.pb.h"
31#include "ortools/math_opt/result.pb.h"
72 const ModelProto&
model, SolverTypeProto solver_type,
77 static absl::StatusOr<ComputeInfeasibleSubsystemResultProto>
79 const ModelProto&
model, SolverTypeProto solver_type,
85 static absl::StatusOr<std::unique_ptr<Solver>>
New(
86 SolverTypeProto solver_type,
const ModelProto&
model,
91 absl::StatusOr<SolveResultProto>
Solve(
const SolveArgs& arguments)
override;
100 absl::StatusOr<bool>
Update(ModelUpdateProto model_update)
override;
102 absl::StatusOr<ComputeInfeasibleSubsystemResultProto>
107 Solver(std::unique_ptr<SolverInterface> underlying_solver,
116 std::unique_ptr<SolverInterface> underlying_solver_;
124 bool fatal_failure_occurred_ =
false;
132 SolverTypeProto solver_type);
Tracker for pending calls.
static absl::StatusOr< SolveResultProto > NonIncrementalSolve(const ModelProto &model, SolverTypeProto solver_type, const InitArgs &init_args, const SolveArgs &solve_args)
A shortcut for calling Solver::New() and then Solver::Solve().
absl::StatusOr< bool > Update(ModelUpdateProto model_update) override
absl::StatusOr< ComputeInfeasibleSubsystemResultProto > ComputeInfeasibleSubsystem(const ComputeInfeasibleSubsystemArgs &arguments) override
Computes an infeasible subsystem of model (including all updates).
absl::StatusOr< SolveResultProto > Solve(const SolveArgs &arguments) override
Solves the current model (including all updates).
static absl::StatusOr< ComputeInfeasibleSubsystemResultProto > NonIncrementalComputeInfeasibleSubsystem(const ModelProto &model, SolverTypeProto solver_type, const InitArgs &init_args, const ComputeInfeasibleSubsystemArgs &compute_infeasible_subsystem_args)
static absl::StatusOr< std::unique_ptr< Solver > > New(SolverTypeProto solver_type, const ModelProto &model, const InitArgs &arguments)
absl::Status ValidateInitArgs(const Solver::InitArgs &init_args, const SolverTypeProto solver_type)
An object oriented wrapper for quadratic constraints in ModelStorage.
Arguments used when calling ComputeInfeasibleSubsystem().
Arguments used when calling Solve() to solve the problem.
Initialization arguments.