![]() |
OR-Tools
9.6
|
Definition at line 1572 of file linear_solver.h.
Public Types | |
| enum | SynchronizationStatus { MUST_RELOAD , MODEL_SYNCHRONIZED , SOLUTION_SYNCHRONIZED } |
Public Member Functions | |
| MPSolverInterface (MPSolver *const solver) | |
| virtual | ~MPSolverInterface () |
| virtual MPSolver::ResultStatus | Solve (const MPSolverParameters ¶m)=0 |
| virtual std::optional< MPSolutionResponse > | DirectlySolveProto (const MPModelRequest &request, std::atomic< bool > *interrupt) |
| virtual void | Write (const std::string &filename) |
| virtual void | Reset ()=0 |
| virtual void | SetOptimizationDirection (bool maximize)=0 |
| virtual void | SetVariableBounds (int index, double lb, double ub)=0 |
| virtual void | SetVariableInteger (int index, bool integer)=0 |
| virtual void | SetConstraintBounds (int index, double lb, double ub)=0 |
| virtual void | AddRowConstraint (MPConstraint *const ct)=0 |
| virtual bool | AddIndicatorConstraint (MPConstraint *const ct) |
| virtual void | AddVariable (MPVariable *const var)=0 |
| virtual void | SetCoefficient (MPConstraint *const constraint, const MPVariable *const variable, double new_value, double old_value)=0 |
| virtual void | ClearConstraint (MPConstraint *const constraint)=0 |
| virtual void | SetObjectiveCoefficient (const MPVariable *const variable, double coefficient)=0 |
| virtual void | SetObjectiveOffset (double value)=0 |
| virtual void | ClearObjective ()=0 |
| virtual void | BranchingPriorityChangedForVariable (int var_index) |
| virtual int64_t | iterations () const =0 |
| virtual int64_t | nodes () const =0 |
| double | best_objective_bound () const |
| double | objective_value () const |
| virtual MPSolver::BasisStatus | row_status (int constraint_index) const =0 |
| virtual MPSolver::BasisStatus | column_status (int variable_index) const =0 |
| bool | CheckSolutionIsSynchronized () const |
| virtual bool | CheckSolutionExists () const |
| bool | CheckSolutionIsSynchronizedAndExists () const |
| virtual bool | IsContinuous () const =0 |
| virtual bool | IsLP () const =0 |
| virtual bool | IsMIP () const =0 |
| int | last_variable_index () const |
| bool | variable_is_extracted (int var_index) const |
| void | set_variable_as_extracted (int var_index, bool extracted) |
| bool | constraint_is_extracted (int ct_index) const |
| void | set_constraint_as_extracted (int ct_index, bool extracted) |
| bool | quiet () const |
| void | set_quiet (bool quiet_value) |
| MPSolver::ResultStatus | result_status () const |
| virtual std::string | SolverVersion () const =0 |
| virtual void * | underlying_solver ()=0 |
| virtual double | ComputeExactConditionNumber () const |
| virtual void | SetStartingLpBasis (const std::vector< MPSolver::BasisStatus > &variable_statuses, const std::vector< MPSolver::BasisStatus > &constraint_statuses) |
| virtual bool | InterruptSolve () |
| virtual bool | NextSolution () |
| virtual void | SetCallback (MPCallback *mp_callback) |
| virtual bool | SupportsCallbacks () const |
Static Public Attributes | |
| static constexpr int64_t | kUnknownNumberOfIterations = -1 |
| static constexpr int64_t | kUnknownNumberOfNodes = -1 |
Protected Attributes | |
| MPSolver *const | solver_ |
| SynchronizationStatus | sync_status_ |
| MPSolver::ResultStatus | result_status_ |
| bool | maximize_ |
| int | last_constraint_index_ |
| int | last_variable_index_ |
| double | objective_value_ |
| double | best_objective_bound_ |
| bool | quiet_ |
Static Protected Attributes | |
| static const int | kDummyVariableIndex = 0 |
| Enumerator | |
|---|---|
| MUST_RELOAD | |
| MODEL_SYNCHRONIZED | |
| SOLUTION_SYNCHRONIZED | |
Definition at line 1574 of file linear_solver.h.
|
explicit |
Definition at line 1831 of file linear_solver.cc.
|
virtual |
Definition at line 1842 of file linear_solver.cc.
|
inlinevirtual |
Reimplemented in SCIPInterface, SatInterface, and GurobiInterface.
Definition at line 1643 of file linear_solver.h.
|
pure virtual |
Implemented in SCIPInterface, SatInterface, PdlpInterface, KnapsackInterface, GurobiInterface, GLOPInterface, CLPInterface, CBCInterface, and BopInterface.
|
pure virtual |
Implemented in SCIPInterface, SatInterface, PdlpInterface, KnapsackInterface, GurobiInterface, GLOPInterface, CLPInterface, CBCInterface, and BopInterface.
| double best_objective_bound | ( | ) | const |
Definition at line 1911 of file linear_solver.cc.
|
inlinevirtual |
Reimplemented in SCIPInterface, and GurobiInterface.
Definition at line 1669 of file linear_solver.h.
|
virtual |
Definition at line 1896 of file linear_solver.cc.
| bool CheckSolutionIsSynchronized | ( | ) | const |
Definition at line 1884 of file linear_solver.cc.
|
inline |
Definition at line 1696 of file linear_solver.h.
|
pure virtual |
Implemented in SCIPInterface, SatInterface, PdlpInterface, KnapsackInterface, GurobiInterface, GLOPInterface, CLPInterface, CBCInterface, and BopInterface.
|
pure virtual |
Implemented in SCIPInterface, SatInterface, PdlpInterface, KnapsackInterface, GurobiInterface, GLOPInterface, CLPInterface, CBCInterface, and BopInterface.
|
pure virtual |
Implemented in SCIPInterface, SatInterface, PdlpInterface, KnapsackInterface, GurobiInterface, GLOPInterface, CLPInterface, CBCInterface, and BopInterface.
|
virtual |
Reimplemented in GurobiInterface.
Definition at line 1935 of file linear_solver.cc.
|
inline |
Definition at line 1722 of file linear_solver.h.
|
inlinevirtual |
Reimplemented in SCIPInterface, SatInterface, PdlpInterface, and GurobiInterface.
Definition at line 1610 of file linear_solver.h.
|
protected |
Definition at line 1848 of file linear_solver.cc.
|
protectedpure virtual |
Implemented in SCIPInterface, SatInterface, PdlpInterface, KnapsackInterface, GurobiInterface, GLOPInterface, CLPInterface, CBCInterface, and BopInterface.
|
protectedpure virtual |
Implemented in SCIPInterface, SatInterface, PdlpInterface, KnapsackInterface, GurobiInterface, GLOPInterface, CLPInterface, CBCInterface, and BopInterface.
|
protectedpure virtual |
Implemented in SCIPInterface, SatInterface, PdlpInterface, KnapsackInterface, GurobiInterface, GLOPInterface, CLPInterface, CBCInterface, and BopInterface.
|
inlinevirtual |
Reimplemented in SCIPInterface, SatInterface, GurobiInterface, GLOPInterface, and BopInterface.
Definition at line 1757 of file linear_solver.h.
|
protected |
Definition at line 1929 of file linear_solver.cc.
|
pure virtual |
Implemented in SCIPInterface, SatInterface, PdlpInterface, KnapsackInterface, GurobiInterface, GLOPInterface, CLPInterface, CBCInterface, and BopInterface.
|
pure virtual |
Implemented in SCIPInterface, SatInterface, PdlpInterface, KnapsackInterface, GurobiInterface, GLOPInterface, CLPInterface, CBCInterface, and BopInterface.
|
pure virtual |
Implemented in SCIPInterface, SatInterface, PdlpInterface, KnapsackInterface, GurobiInterface, GLOPInterface, CLPInterface, CBCInterface, and BopInterface.
|
pure virtual |
Implemented in SCIPInterface, SatInterface, PdlpInterface, KnapsackInterface, GurobiInterface, GLOPInterface, CLPInterface, CBCInterface, and BopInterface.
|
inline |
Definition at line 1714 of file linear_solver.h.
|
inlinevirtual |
Reimplemented in SCIPInterface, and GurobiInterface.
Definition at line 1760 of file linear_solver.h.
|
pure virtual |
Implemented in SCIPInterface, SatInterface, PdlpInterface, KnapsackInterface, GurobiInterface, GLOPInterface, CLPInterface, CBCInterface, and BopInterface.
| double objective_value | ( | ) | const |
Definition at line 1906 of file linear_solver.cc.
|
inline |
Definition at line 1730 of file linear_solver.h.
|
pure virtual |
Implemented in SCIPInterface, SatInterface, PdlpInterface, KnapsackInterface, GurobiInterface, GLOPInterface, CLPInterface, CBCInterface, and BopInterface.
|
protected |
Definition at line 1876 of file linear_solver.cc.
|
inline |
Definition at line 1735 of file linear_solver.h.
|
pure virtual |
Implemented in SCIPInterface, SatInterface, PdlpInterface, KnapsackInterface, GurobiInterface, GLOPInterface, CLPInterface, CBCInterface, and BopInterface.
|
inline |
Definition at line 1725 of file linear_solver.h.
|
inline |
Definition at line 1732 of file linear_solver.h.
|
inline |
Definition at line 1719 of file linear_solver.h.
|
inlinevirtual |
Reimplemented in SCIPInterface, and GurobiInterface.
Definition at line 1763 of file linear_solver.h.
|
pure virtual |
Implemented in SCIPInterface, SatInterface, PdlpInterface, KnapsackInterface, GurobiInterface, GLOPInterface, CLPInterface, CBCInterface, and BopInterface.
|
protected |
Definition at line 1944 of file linear_solver.cc.
|
pure virtual |
Implemented in SCIPInterface, GurobiInterface, CLPInterface, CBCInterface, SatInterface, PdlpInterface, KnapsackInterface, GLOPInterface, and BopInterface.
|
protected |
Definition at line 1980 of file linear_solver.cc.
|
protectedpure virtual |
Implemented in SatInterface, PdlpInterface, KnapsackInterface, GLOPInterface, and BopInterface.
|
protectedvirtual |
Definition at line 1985 of file linear_solver.cc.
|
protectedpure virtual |
Implemented in SatInterface, PdlpInterface, KnapsackInterface, GLOPInterface, and BopInterface.
|
protected |
Definition at line 1965 of file linear_solver.cc.
|
protectedvirtual |
Reimplemented in SatInterface, PdlpInterface, and CBCInterface.
Definition at line 1991 of file linear_solver.cc.
|
pure virtual |
Implemented in SCIPInterface, SatInterface, PdlpInterface, KnapsackInterface, GurobiInterface, GLOPInterface, CLPInterface, CBCInterface, and BopInterface.
|
pure virtual |
Implemented in SCIPInterface, SatInterface, PdlpInterface, KnapsackInterface, GurobiInterface, GLOPInterface, CBCInterface, BopInterface, and CLPInterface.
|
pure virtual |
Implemented in SCIPInterface, SatInterface, PdlpInterface, KnapsackInterface, GurobiInterface, GLOPInterface, CLPInterface, CBCInterface, and BopInterface.
|
protectedpure virtual |
Implemented in SatInterface, PdlpInterface, KnapsackInterface, GLOPInterface, and BopInterface.
|
protectedpure virtual |
Implemented in SatInterface, PdlpInterface, KnapsackInterface, GLOPInterface, and BopInterface.
|
protectedpure virtual |
Implemented in SatInterface, PdlpInterface, KnapsackInterface, GLOPInterface, and BopInterface.
|
protectedpure virtual |
Implemented in SatInterface, PdlpInterface, KnapsackInterface, GLOPInterface, and BopInterface.
|
protectedpure virtual |
Implemented in SatInterface, PdlpInterface, KnapsackInterface, GLOPInterface, and BopInterface.
|
protectedvirtual |
Reimplemented in SatInterface, PdlpInterface, GLOPInterface, and BopInterface.
Definition at line 1996 of file linear_solver.cc.
|
inlinevirtual |
Reimplemented in GLOPInterface.
Definition at line 1751 of file linear_solver.h.
|
protected |
Definition at line 1972 of file linear_solver.cc.
|
protectedvirtual |
Definition at line 1976 of file linear_solver.cc.
|
pure virtual |
Implemented in SCIPInterface, GurobiInterface, CLPInterface, CBCInterface, SatInterface, PdlpInterface, KnapsackInterface, GLOPInterface, and BopInterface.
|
pure virtual |
Implemented in SCIPInterface, GurobiInterface, CLPInterface, CBCInterface, SatInterface, PdlpInterface, KnapsackInterface, GLOPInterface, and BopInterface.
|
pure virtual |
Implemented in SCIPInterface, SatInterface, PdlpInterface, KnapsackInterface, GurobiInterface, GLOPInterface, CLPInterface, CBCInterface, and BopInterface.
|
pure virtual |
Implemented in SCIPInterface, SatInterface, PdlpInterface, KnapsackInterface, GurobiInterface, GLOPInterface, CLPInterface, CBCInterface, and BopInterface.
|
inlinevirtual |
Reimplemented in SCIPInterface, and GurobiInterface.
Definition at line 1767 of file linear_solver.h.
|
pure virtual |
Implemented in SCIPInterface, SatInterface, PdlpInterface, KnapsackInterface, GurobiInterface, GLOPInterface, CLPInterface, CBCInterface, and BopInterface.
|
inline |
Definition at line 1716 of file linear_solver.h.
|
virtual |
Reimplemented in GurobiInterface.
Definition at line 1844 of file linear_solver.cc.
|
protected |
Definition at line 1794 of file linear_solver.h.
|
staticprotected |
Definition at line 1801 of file linear_solver.h.
|
staticconstexpr |
Definition at line 1589 of file linear_solver.h.
|
staticconstexpr |
Definition at line 1592 of file linear_solver.h.
|
protected |
Definition at line 1786 of file linear_solver.h.
|
protected |
Definition at line 1788 of file linear_solver.h.
|
protected |
Definition at line 1783 of file linear_solver.h.
|
protected |
Definition at line 1791 of file linear_solver.h.
|
protected |
Definition at line 1797 of file linear_solver.h.
|
protected |
Definition at line 1781 of file linear_solver.h.
|
protected |
Definition at line 1776 of file linear_solver.h.
|
protected |
Definition at line 1778 of file linear_solver.h.