C++ Reference
C++ Reference: Linear solver
Detailed Description
Definition at line 1477 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 absl::optional< MPSolutionResponse > | DirectlySolveProto (const MPModelRequest &request) |
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 | iterations () const =0 |
virtual int64 | nodes () const =0 |
virtual double | best_objective_bound () const =0 |
double | trivial_worst_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 | CheckBestObjectiveBoundExists () 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 | kUnknownNumberOfIterations = -1 |
static constexpr int64 | 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_ |
bool | quiet_ |
Static Protected Attributes | |
static const int | kDummyVariableIndex |
Member Enumeration Documentation
◆ SynchronizationStatus
Enumerator | |
---|---|
MUST_RELOAD | |
MODEL_SYNCHRONIZED | |
SOLUTION_SYNCHRONIZED |
Definition at line 1479 of file linear_solver.h.
Constructor & Destructor Documentation
◆ MPSolverInterface()
|
explicit |
◆ ~MPSolverInterface()
|
virtual |
Member Function Documentation
◆ AddIndicatorConstraint()
|
inlinevirtual |
Definition at line 1542 of file linear_solver.h.
◆ AddRowConstraint()
|
pure virtual |
◆ AddVariable()
|
pure virtual |
◆ best_objective_bound()
|
pure virtual |
◆ BranchingPriorityChangedForVariable()
|
inlinevirtual |
Definition at line 1568 of file linear_solver.h.
◆ CheckBestObjectiveBoundExists()
|
virtual |
◆ CheckSolutionExists()
|
virtual |
◆ CheckSolutionIsSynchronized()
bool CheckSolutionIsSynchronized | ( | ) | const |
◆ CheckSolutionIsSynchronizedAndExists()
|
inline |
Definition at line 1598 of file linear_solver.h.
◆ ClearConstraint()
|
pure virtual |
◆ ClearObjective()
|
pure virtual |
◆ column_status()
|
pure virtual |
◆ ComputeExactConditionNumber()
|
virtual |
◆ constraint_is_extracted()
|
inline |
Definition at line 1627 of file linear_solver.h.
◆ DirectlySolveProto()
|
inlinevirtual |
Definition at line 1512 of file linear_solver.h.
◆ ExtractModel()
|
protected |
◆ ExtractNewConstraints()
|
protectedpure virtual |
◆ ExtractNewVariables()
|
protectedpure virtual |
◆ ExtractObjective()
|
protectedpure virtual |
◆ InterruptSolve()
|
inlinevirtual |
Definition at line 1662 of file linear_solver.h.
◆ InvalidateSolutionSynchronization()
|
protected |
◆ IsContinuous()
|
pure virtual |
◆ IsLP()
|
pure virtual |
◆ IsMIP()
|
pure virtual |
◆ iterations()
|
pure virtual |
◆ last_variable_index()
|
inline |
Definition at line 1619 of file linear_solver.h.
◆ NextSolution()
|
inlinevirtual |
Definition at line 1665 of file linear_solver.h.
◆ nodes()
|
pure virtual |
◆ objective_value()
double objective_value | ( | ) | const |
◆ quiet()
|
inline |
Definition at line 1635 of file linear_solver.h.
◆ ReadParameterFile()
|
protectedvirtual |
◆ Reset()
|
pure virtual |
◆ ResetExtractionInformation()
|
protected |
◆ result_status()
|
inline |
Definition at line 1640 of file linear_solver.h.
◆ row_status()
|
pure virtual |
◆ set_constraint_as_extracted()
|
inline |
Definition at line 1630 of file linear_solver.h.
◆ set_quiet()
|
inline |
Definition at line 1637 of file linear_solver.h.
◆ set_variable_as_extracted()
|
inline |
Definition at line 1624 of file linear_solver.h.
◆ SetCallback()
|
inlinevirtual |
Definition at line 1668 of file linear_solver.h.
◆ SetCoefficient()
|
pure virtual |
◆ SetCommonParameters()
|
protected |
◆ SetConstraintBounds()
|
pure virtual |
◆ SetDoubleParamToUnsupportedValue()
|
protected |
◆ SetDualTolerance()
|
protectedpure virtual |
◆ SetIntegerParamToUnsupportedValue()
|
protectedvirtual |
◆ SetLpAlgorithm()
|
protectedpure virtual |
◆ SetMIPParameters()
|
protected |
◆ SetNumThreads()
|
protectedvirtual |
◆ SetObjectiveCoefficient()
|
pure virtual |
◆ SetObjectiveOffset()
|
pure virtual |
◆ SetOptimizationDirection()
|
pure virtual |
◆ SetParameters()
|
protectedpure virtual |
◆ SetPresolveMode()
|
protectedpure virtual |
◆ SetPrimalTolerance()
|
protectedpure virtual |
◆ SetRelativeMipGap()
|
protectedpure virtual |
◆ SetScalingMode()
|
protectedpure virtual |
◆ SetSolverSpecificParametersAsString()
|
protectedvirtual |
◆ SetStartingLpBasis()
|
inlinevirtual |
Definition at line 1656 of file linear_solver.h.
◆ SetUnsupportedDoubleParam()
|
protected |
◆ SetUnsupportedIntegerParam()
|
protectedvirtual |
◆ SetVariableBounds()
|
pure virtual |
◆ SetVariableInteger()
|
pure virtual |
◆ Solve()
|
pure virtual |
◆ SolverVersion()
|
pure virtual |
◆ SupportsCallbacks()
|
inlinevirtual |
Definition at line 1672 of file linear_solver.h.
◆ trivial_worst_objective_bound()
double trivial_worst_objective_bound | ( | ) | const |
◆ underlying_solver()
|
pure virtual |
◆ ValidFileExtensionForParameterFile()
|
protectedvirtual |
◆ variable_is_extracted()
|
inline |
Definition at line 1621 of file linear_solver.h.
◆ Write()
|
virtual |
Member Data Documentation
◆ kDummyVariableIndex
|
staticprotected |
Definition at line 1703 of file linear_solver.h.
◆ kUnknownNumberOfIterations
|
staticconstexpr |
Definition at line 1494 of file linear_solver.h.
◆ kUnknownNumberOfNodes
|
staticconstexpr |
Definition at line 1497 of file linear_solver.h.
◆ last_constraint_index_
|
protected |
Definition at line 1691 of file linear_solver.h.
◆ last_variable_index_
|
protected |
Definition at line 1693 of file linear_solver.h.
◆ maximize_
|
protected |
Definition at line 1688 of file linear_solver.h.
◆ objective_value_
|
protected |
Definition at line 1696 of file linear_solver.h.
◆ quiet_
|
protected |
Definition at line 1699 of file linear_solver.h.
◆ result_status_
|
protected |
Definition at line 1686 of file linear_solver.h.
◆ solver_
|
protected |
Definition at line 1681 of file linear_solver.h.
◆ sync_status_
|
protected |
Definition at line 1683 of file linear_solver.h.
The documentation for this class was generated from the following file: