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

Detailed Description

Definition at line 57 of file cplex_interface.cc.

Inheritance diagram for operations_research::CplexInterface:
operations_research::MPSolverInterface

Public Member Functions

 CplexInterface (MPSolver *const solver, bool mip)
 ~CplexInterface ()
virtual void SetOptimizationDirection (bool maximize)
virtual MPSolver::ResultStatus Solve (MPSolverParameters const &param)
virtual void Reset ()
virtual void SetVariableBounds (int var_index, double lb, double ub)
virtual void SetVariableInteger (int var_index, bool integer)
virtual void SetConstraintBounds (int row_index, double lb, double ub)
virtual void AddRowConstraint (MPConstraint *const ct)
virtual void AddVariable (MPVariable *const var)
virtual void SetCoefficient (MPConstraint *const constraint, MPVariable const *const variable, double new_value, double old_value)
virtual void ClearConstraint (MPConstraint *const constraint)
virtual void SetObjectiveCoefficient (MPVariable const *const variable, double coefficient)
virtual void SetObjectiveOffset (double value)
virtual void ClearObjective ()
virtual int64_t iterations () const
virtual int64_t nodes () const
virtual MPSolver::BasisStatus row_status (int constraint_index) const
virtual MPSolver::BasisStatus column_status (int variable_index) const
virtual bool IsContinuous () const
virtual bool IsLP () const
virtual bool IsMIP () const
bool SetSolverSpecificParametersAsString (const std::string &parameters) override
virtual void ExtractNewVariables ()
virtual void ExtractNewConstraints ()
virtual void ExtractObjective ()
virtual std::string SolverVersion () const
virtual void * underlying_solver ()
virtual double ComputeExactConditionNumber () const
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 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

Protected Member Functions

virtual void SetParameters (MPSolverParameters const &param)
virtual void SetRelativeMipGap (double value)
virtual void SetPrimalTolerance (double value)
virtual void SetDualTolerance (double value)
virtual void SetPresolveMode (int value)
virtual void SetScalingMode (int value)
virtual void SetLpAlgorithm (int value)
virtual bool ReadParameterFile (std::string const &filename)
virtual std::string ValidFileExtensionForParameterFile () const
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 absl::Status SetNumThreads (int num_threads)

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 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

◆ CplexInterface()

operations_research::CplexInterface::CplexInterface ( MPSolver *const solver,
bool mip )
explicit

Definition at line 214 of file cplex_interface.cc.

◆ ~CplexInterface()

operations_research::CplexInterface::~CplexInterface ( )

Definition at line 239 of file cplex_interface.cc.

Member Function Documentation

◆ AddRowConstraint()

void operations_research::CplexInterface::AddRowConstraint ( MPConstraint *const ct)
virtual

Implements operations_research::MPSolverInterface.

Definition at line 444 of file cplex_interface.cc.

◆ AddVariable()

void operations_research::CplexInterface::AddVariable ( MPVariable *const var)
virtual

Implements operations_research::MPSolverInterface.

Definition at line 454 of file cplex_interface.cc.

◆ ClearConstraint()

void operations_research::CplexInterface::ClearConstraint ( MPConstraint *const constraint)
virtual

Implements operations_research::MPSolverInterface.

Definition at line 495 of file cplex_interface.cc.

◆ ClearObjective()

void operations_research::CplexInterface::ClearObjective ( )
virtual

Implements operations_research::MPSolverInterface.

Definition at line 563 of file cplex_interface.cc.

◆ column_status()

MPSolver::BasisStatus operations_research::CplexInterface::column_status ( int variable_index) const
virtual

Implements operations_research::MPSolverInterface.

Definition at line 657 of file cplex_interface.cc.

◆ ComputeExactConditionNumber()

virtual double operations_research::CplexInterface::ComputeExactConditionNumber ( ) const
inlinevirtual

Reimplemented from operations_research::MPSolverInterface.

Definition at line 126 of file cplex_interface.cc.

◆ ExtractNewConstraints()

void operations_research::CplexInterface::ExtractNewConstraints ( )
virtual

Implements operations_research::MPSolverInterface.

Definition at line 843 of file cplex_interface.cc.

◆ ExtractNewVariables()

void operations_research::CplexInterface::ExtractNewVariables ( )
virtual

Implements operations_research::MPSolverInterface.

Definition at line 682 of file cplex_interface.cc.

◆ ExtractObjective()

void operations_research::CplexInterface::ExtractObjective ( )
virtual

Implements operations_research::MPSolverInterface.

Definition at line 948 of file cplex_interface.cc.

◆ IsContinuous()

virtual bool operations_research::CplexInterface::IsContinuous ( ) const
inlinevirtual

Implements operations_research::MPSolverInterface.

Definition at line 112 of file cplex_interface.cc.

◆ IsLP()

virtual bool operations_research::CplexInterface::IsLP ( ) const
inlinevirtual

Implements operations_research::MPSolverInterface.

Definition at line 113 of file cplex_interface.cc.

◆ IsMIP()

virtual bool operations_research::CplexInterface::IsMIP ( ) const
inlinevirtual

Implements operations_research::MPSolverInterface.

Definition at line 114 of file cplex_interface.cc.

◆ iterations()

int64_t operations_research::CplexInterface::iterations ( ) const
virtual

Implements operations_research::MPSolverInterface.

Definition at line 595 of file cplex_interface.cc.

◆ nodes()

int64_t operations_research::CplexInterface::nodes ( ) const
virtual

Implements operations_research::MPSolverInterface.

Definition at line 604 of file cplex_interface.cc.

◆ ReadParameterFile()

bool operations_research::CplexInterface::ReadParameterFile ( std::string const & filename)
protectedvirtual

Definition at line 1064 of file cplex_interface.cc.

◆ Reset()

void operations_research::CplexInterface::Reset ( )
virtual

Implements operations_research::MPSolverInterface.

Definition at line 264 of file cplex_interface.cc.

◆ row_status()

MPSolver::BasisStatus operations_research::CplexInterface::row_status ( int constraint_index) const
virtual

Implements operations_research::MPSolverInterface.

Definition at line 632 of file cplex_interface.cc.

◆ SetCoefficient()

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

Implements operations_research::MPSolverInterface.

Definition at line 464 of file cplex_interface.cc.

◆ SetConstraintBounds()

void operations_research::CplexInterface::SetConstraintBounds ( int row_index,
double lb,
double ub )
virtual

Implements operations_research::MPSolverInterface.

Definition at line 413 of file cplex_interface.cc.

◆ SetDualTolerance()

void operations_research::CplexInterface::SetDualTolerance ( double value)
protectedvirtual

Implements operations_research::MPSolverInterface.

Definition at line 995 of file cplex_interface.cc.

◆ SetLpAlgorithm()

void operations_research::CplexInterface::SetLpAlgorithm ( int value)
protectedvirtual

Implements operations_research::MPSolverInterface.

Definition at line 1033 of file cplex_interface.cc.

◆ SetObjectiveCoefficient()

void operations_research::CplexInterface::SetObjectiveCoefficient ( MPVariable const *const variable,
double coefficient )
virtual

Implements operations_research::MPSolverInterface.

Definition at line 535 of file cplex_interface.cc.

◆ SetObjectiveOffset()

void operations_research::CplexInterface::SetObjectiveOffset ( double value)
virtual

Implements operations_research::MPSolverInterface.

Definition at line 557 of file cplex_interface.cc.

◆ SetOptimizationDirection()

void operations_research::CplexInterface::SetOptimizationDirection ( bool maximize)
virtual

Implements operations_research::MPSolverInterface.

Definition at line 283 of file cplex_interface.cc.

◆ SetParameters()

void operations_research::CplexInterface::SetParameters ( MPSolverParameters const & param)
protectedvirtual

Implements operations_research::MPSolverInterface.

Definition at line 977 of file cplex_interface.cc.

◆ SetPresolveMode()

void operations_research::CplexInterface::SetPresolveMode ( int value)
protectedvirtual

Implements operations_research::MPSolverInterface.

Definition at line 999 of file cplex_interface.cc.

◆ SetPrimalTolerance()

void operations_research::CplexInterface::SetPrimalTolerance ( double value)
protectedvirtual

Implements operations_research::MPSolverInterface.

Definition at line 991 of file cplex_interface.cc.

◆ SetRelativeMipGap()

void operations_research::CplexInterface::SetRelativeMipGap ( double value)
protectedvirtual

Implements operations_research::MPSolverInterface.

Definition at line 982 of file cplex_interface.cc.

◆ SetScalingMode()

void operations_research::CplexInterface::SetScalingMode ( int value)
protectedvirtual

Implements operations_research::MPSolverInterface.

Definition at line 1015 of file cplex_interface.cc.

◆ SetSolverSpecificParametersAsString()

bool operations_research::CplexInterface::SetSolverSpecificParametersAsString ( const std::string & parameters)
overridevirtual

Reimplemented from operations_research::MPSolverInterface.

Definition at line 1283 of file cplex_interface.cc.

◆ SetVariableBounds()

void operations_research::CplexInterface::SetVariableBounds ( int var_index,
double lb,
double ub )
virtual

Implements operations_research::MPSolverInterface.

Definition at line 288 of file cplex_interface.cc.

◆ SetVariableInteger()

void operations_research::CplexInterface::SetVariableInteger ( int var_index,
bool integer )
virtual

Implements operations_research::MPSolverInterface.

Definition at line 317 of file cplex_interface.cc.

◆ Solve()

MPSolver::ResultStatus operations_research::CplexInterface::Solve ( MPSolverParameters const & param)
virtual

Implements operations_research::MPSolverInterface.

Definition at line 1073 of file cplex_interface.cc.

◆ SolverVersion()

std::string operations_research::CplexInterface::SolverVersion ( ) const
virtual

Implements operations_research::MPSolverInterface.

Definition at line 244 of file cplex_interface.cc.

◆ underlying_solver()

virtual void * operations_research::CplexInterface::underlying_solver ( )
inlinevirtual

Implements operations_research::MPSolverInterface.

Definition at line 124 of file cplex_interface.cc.

◆ ValidFileExtensionForParameterFile()

std::string operations_research::CplexInterface::ValidFileExtensionForParameterFile ( ) const
protectedvirtual

Definition at line 1069 of file cplex_interface.cc.


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