Google OR-Tools v9.15
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
operations_research::CBCInterface Class Reference

Detailed Description

Definition at line 40 of file cbc_interface.cc.

Inheritance diagram for operations_research::CBCInterface:
operations_research::MPSolverInterface

Public Member Functions

 CBCInterface (MPSolver *solver)
 ~CBCInterface () override
void Reset () override
void SetOptimizationDirection (bool maximize) override
absl::Status SetNumThreads (int num_threads) override
MPSolver::ResultStatus Solve (const MPSolverParameters &param) override
virtual void ExtractModel ()
bool IsContinuous () const override
bool IsLP () const override
bool IsMIP () const override
void SetVariableBounds (int var_index, double lb, double ub) override
void SetVariableInteger (int var_index, bool integer) override
void SetConstraintBounds (int row_index, double lb, double ub) override
void AddRowConstraint (MPConstraint *ct) override
void AddVariable (MPVariable *var) override
void SetCoefficient (MPConstraint *const constraint, const MPVariable *const variable, double new_value, double old_value) override
void ClearConstraint (MPConstraint *const constraint) override
void SetObjectiveCoefficient (const MPVariable *const variable, double coefficient) override
void SetObjectiveOffset (double value) override
void ClearObjective () override
int64_t iterations () const override
int64_t nodes () const override
MPSolver::BasisStatus row_status (int constraint_index) const override
MPSolver::BasisStatus column_status (int variable_index) const override
void ExtractNewVariables () override
void ExtractNewConstraints () override
void ExtractObjective () override
std::string SolverVersion () const override
void * underlying_solver () override
Public Member Functions inherited from operations_research::MPSolverInterface
 MPSolverInterface (MPSolver *solver)
virtual ~MPSolverInterface ()
virtual bool SupportsDirectlySolveProto (std::atomic< bool > *) const
virtual MPSolutionResponse DirectlySolveProto (LazyMutableCopy< MPModelRequest >, std::atomic< bool > *)
virtual void Write (const std::string &filename)
virtual bool AddIndicatorConstraint (MPConstraint *const)
virtual void BranchingPriorityChangedForVariable (int)
double best_objective_bound () const
double objective_value () const
bool CheckSolutionIsSynchronized () const
virtual bool CheckSolutionExists () const
bool CheckSolutionIsSynchronizedAndExists () const
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 double ComputeExactConditionNumber () const
virtual void SetStartingLpBasis (const std::vector< MPSolver::BasisStatus > &, const std::vector< MPSolver::BasisStatus > &)
virtual double infinity ()
virtual bool InterruptSolve ()
virtual bool NextSolution ()
virtual void SetCallback (MPCallback *)
virtual bool SupportsCallbacks () const

Additional Inherited Members

Public Types inherited from operations_research::MPSolverInterface
enum  SynchronizationStatus { MUST_RELOAD , MODEL_SYNCHRONIZED , SOLUTION_SYNCHRONIZED }
Static Public Attributes inherited from operations_research::MPSolverInterface
static constexpr int64_t kUnknownNumberOfIterations = -1
static constexpr int64_t kUnknownNumberOfNodes = -1
Protected Member Functions inherited from operations_research::MPSolverInterface
void ExtractModel ()
void ResetExtractionInformation ()
void InvalidateSolutionSynchronization ()
void SetCommonParameters (const MPSolverParameters &param)
void SetMIPParameters (const MPSolverParameters &param)
void SetUnsupportedDoubleParam (MPSolverParameters::DoubleParam param)
virtual void SetUnsupportedIntegerParam (MPSolverParameters::IntegerParam param)
void SetDoubleParamToUnsupportedValue (MPSolverParameters::DoubleParam param, double value)
virtual void SetIntegerParamToUnsupportedValue (MPSolverParameters::IntegerParam param, int value)
virtual bool SetSolverSpecificParametersAsString (const std::string &parameters)
Protected Attributes inherited from operations_research::MPSolverInterface
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 inherited from operations_research::MPSolverInterface
static const int kDummyVariableIndex = 0

Constructor & Destructor Documentation

◆ CBCInterface()

operations_research::CBCInterface::CBCInterface ( MPSolver * solver)
explicit

Definition at line 156 of file cbc_interface.cc.

◆ ~CBCInterface()

operations_research::CBCInterface::~CBCInterface ( )
override

Definition at line 165 of file cbc_interface.cc.

Member Function Documentation

◆ AddRowConstraint()

void operations_research::CBCInterface::AddRowConstraint ( MPConstraint * ct)
overridevirtual

Implements operations_research::MPSolverInterface.

Definition at line 229 of file cbc_interface.cc.

◆ AddVariable()

void operations_research::CBCInterface::AddVariable ( MPVariable * var)
overridevirtual

Implements operations_research::MPSolverInterface.

Definition at line 233 of file cbc_interface.cc.

◆ ClearConstraint()

void operations_research::CBCInterface::ClearConstraint ( MPConstraint *const constraint)
inlineoverridevirtual

Implements operations_research::MPSolverInterface.

Definition at line 88 of file cbc_interface.cc.

◆ ClearObjective()

void operations_research::CBCInterface::ClearObjective ( )
inlineoverridevirtual

Implements operations_research::MPSolverInterface.

Definition at line 100 of file cbc_interface.cc.

◆ column_status()

MPSolver::BasisStatus operations_research::CBCInterface::column_status ( int variable_index) const
inlineoverridevirtual

Implements operations_research::MPSolverInterface.

Definition at line 113 of file cbc_interface.cc.

◆ ExtractModel()

virtual void operations_research::CBCInterface::ExtractModel ( )
inlinevirtual

Definition at line 65 of file cbc_interface.cc.

◆ ExtractNewConstraints()

void operations_research::CBCInterface::ExtractNewConstraints ( )
inlineoverridevirtual

Implements operations_research::MPSolverInterface.

Definition at line 119 of file cbc_interface.cc.

◆ ExtractNewVariables()

void operations_research::CBCInterface::ExtractNewVariables ( )
inlineoverridevirtual

Implements operations_research::MPSolverInterface.

Definition at line 118 of file cbc_interface.cc.

◆ ExtractObjective()

void operations_research::CBCInterface::ExtractObjective ( )
inlineoverridevirtual

Implements operations_research::MPSolverInterface.

Definition at line 120 of file cbc_interface.cc.

◆ IsContinuous()

bool operations_research::CBCInterface::IsContinuous ( ) const
inlineoverridevirtual

Implements operations_research::MPSolverInterface.

Definition at line 68 of file cbc_interface.cc.

◆ IsLP()

bool operations_research::CBCInterface::IsLP ( ) const
inlineoverridevirtual

Implements operations_research::MPSolverInterface.

Definition at line 69 of file cbc_interface.cc.

◆ IsMIP()

bool operations_research::CBCInterface::IsMIP ( ) const
inlineoverridevirtual

Implements operations_research::MPSolverInterface.

Definition at line 70 of file cbc_interface.cc.

◆ iterations()

int64_t operations_research::CBCInterface::iterations ( ) const
overridevirtual

Implements operations_research::MPSolverInterface.

Definition at line 465 of file cbc_interface.cc.

◆ nodes()

int64_t operations_research::CBCInterface::nodes ( ) const
overridevirtual

Implements operations_research::MPSolverInterface.

Definition at line 470 of file cbc_interface.cc.

◆ Reset()

void operations_research::CBCInterface::Reset ( )
overridevirtual

Implements operations_research::MPSolverInterface.

Definition at line 168 of file cbc_interface.cc.

◆ row_status()

MPSolver::BasisStatus operations_research::CBCInterface::row_status ( int constraint_index) const
inlineoverridevirtual

Implements operations_research::MPSolverInterface.

Definition at line 108 of file cbc_interface.cc.

◆ SetCoefficient()

void operations_research::CBCInterface::SetCoefficient ( MPConstraint *const constraint,
const MPVariable *const variable,
double new_value,
double old_value )
inlineoverridevirtual

Implements operations_research::MPSolverInterface.

Definition at line 82 of file cbc_interface.cc.

◆ SetConstraintBounds()

void operations_research::CBCInterface::SetConstraintBounds ( int row_index,
double lb,
double ub )
overridevirtual

Implements operations_research::MPSolverInterface.

Definition at line 220 of file cbc_interface.cc.

◆ SetNumThreads()

absl::Status operations_research::CBCInterface::SetNumThreads ( int num_threads)
inlineoverridevirtual

Reimplemented from operations_research::MPSolverInterface.

Definition at line 54 of file cbc_interface.cc.

◆ SetObjectiveCoefficient()

void operations_research::CBCInterface::SetObjectiveCoefficient ( const MPVariable *const variable,
double coefficient )
inlineoverridevirtual

Implements operations_research::MPSolverInterface.

Definition at line 93 of file cbc_interface.cc.

◆ SetObjectiveOffset()

void operations_research::CBCInterface::SetObjectiveOffset ( double value)
inlineoverridevirtual

Implements operations_research::MPSolverInterface.

Definition at line 98 of file cbc_interface.cc.

◆ SetOptimizationDirection()

void operations_research::CBCInterface::SetOptimizationDirection ( bool maximize)
overridevirtual

Implements operations_research::MPSolverInterface.

Definition at line 183 of file cbc_interface.cc.

◆ SetVariableBounds()

void operations_research::CBCInterface::SetVariableBounds ( int var_index,
double lb,
double ub )
overridevirtual

Implements operations_research::MPSolverInterface.

Definition at line 197 of file cbc_interface.cc.

◆ SetVariableInteger()

void operations_research::CBCInterface::SetVariableInteger ( int var_index,
bool integer )
overridevirtual

Implements operations_research::MPSolverInterface.

Definition at line 206 of file cbc_interface.cc.

◆ Solve()

MPSolver::ResultStatus operations_research::CBCInterface::Solve ( const MPSolverParameters & param)
overridevirtual

Implements operations_research::MPSolverInterface.

Definition at line 239 of file cbc_interface.cc.

◆ SolverVersion()

std::string operations_research::CBCInterface::SolverVersion ( ) const
inlineoverridevirtual

Implements operations_research::MPSolverInterface.

Definition at line 122 of file cbc_interface.cc.

◆ underlying_solver()

void * operations_research::CBCInterface::underlying_solver ( )
inlineoverridevirtual

Implements operations_research::MPSolverInterface.

Definition at line 127 of file cbc_interface.cc.


The documentation for this class was generated from the following file: