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

Detailed Description

Definition at line 88 of file glpk_interface.cc.

Inheritance diagram for operations_research::GLPKInterface:
operations_research::MPSolverInterface

Public Member Functions

 GLPKInterface (MPSolver *solver, bool mip)
 ~GLPKInterface () override
void SetOptimizationDirection (bool maximize) override
MPSolver::ResultStatus Solve (const MPSolverParameters &param) override
void Reset () override
void SetVariableBounds (int mpsolver_var_index, double lb, double ub) override
void SetVariableInteger (int mpsolver_var_index, bool integer) override
void SetConstraintBounds (int mpsolver_constraint_index, double lb, double ub) override
void AddRowConstraint (MPConstraint *ct) override
void AddVariable (MPVariable *var) override
void SetCoefficient (MPConstraint *constraint, const MPVariable *variable, double new_value, double old_value) override
void ClearConstraint (MPConstraint *constraint) override
void SetObjectiveCoefficient (const MPVariable *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
bool CheckSolutionExists () const override
bool IsContinuous () const override
bool IsLP () const override
bool IsMIP () const override
void ExtractNewVariables () override
void ExtractNewConstraints () override
void ExtractObjective () override
std::string SolverVersion () const override
void * underlying_solver () override
double ComputeExactConditionNumber () const 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
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

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 absl::Status SetNumThreads (int num_threads)
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

◆ GLPKInterface()

operations_research::GLPKInterface::GLPKInterface ( MPSolver * solver,
bool mip )

Definition at line 205 of file glpk_interface.cc.

◆ ~GLPKInterface()

operations_research::GLPKInterface::~GLPKInterface ( )
override

Definition at line 217 of file glpk_interface.cc.

Member Function Documentation

◆ AddRowConstraint()

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

Implements operations_research::MPSolverInterface.

Definition at line 365 of file glpk_interface.cc.

◆ AddVariable()

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

Implements operations_research::MPSolverInterface.

Definition at line 369 of file glpk_interface.cc.

◆ CheckSolutionExists()

bool operations_research::GLPKInterface::CheckSolutionExists ( ) const
overridevirtual

Reimplemented from operations_research::MPSolverInterface.

Definition at line 708 of file glpk_interface.cc.

◆ ClearConstraint()

void operations_research::GLPKInterface::ClearConstraint ( MPConstraint * constraint)
overridevirtual

Implements operations_research::MPSolverInterface.

Definition at line 329 of file glpk_interface.cc.

◆ ClearObjective()

void operations_research::GLPKInterface::ClearObjective ( )
overridevirtual

Implements operations_research::MPSolverInterface.

Definition at line 350 of file glpk_interface.cc.

◆ column_status()

MPSolver::BasisStatus operations_research::GLPKInterface::column_status ( int variable_index) const
overridevirtual

Implements operations_research::MPSolverInterface.

Definition at line 700 of file glpk_interface.cc.

◆ ComputeExactConditionNumber()

double operations_research::GLPKInterface::ComputeExactConditionNumber ( ) const
overridevirtual

Reimplemented from operations_research::MPSolverInterface.

Definition at line 719 of file glpk_interface.cc.

◆ ExtractNewConstraints()

void operations_research::GLPKInterface::ExtractNewConstraints ( )
overridevirtual

Implements operations_research::MPSolverInterface.

Definition at line 438 of file glpk_interface.cc.

◆ ExtractNewVariables()

void operations_research::GLPKInterface::ExtractNewVariables ( )
overridevirtual

Implements operations_research::MPSolverInterface.

Definition at line 374 of file glpk_interface.cc.

◆ ExtractObjective()

void operations_research::GLPKInterface::ExtractObjective ( )
overridevirtual

Implements operations_research::MPSolverInterface.

Definition at line 499 of file glpk_interface.cc.

◆ IsContinuous()

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

Implements operations_research::MPSolverInterface.

Definition at line 144 of file glpk_interface.cc.

◆ IsLP()

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

Implements operations_research::MPSolverInterface.

Definition at line 145 of file glpk_interface.cc.

◆ IsMIP()

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

Implements operations_research::MPSolverInterface.

Definition at line 146 of file glpk_interface.cc.

◆ iterations()

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

Implements operations_research::MPSolverInterface.

Definition at line 667 of file glpk_interface.cc.

◆ nodes()

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

Implements operations_research::MPSolverInterface.

Definition at line 682 of file glpk_interface.cc.

◆ Reset()

void operations_research::GLPKInterface::Reset ( )
overridevirtual

Implements operations_research::MPSolverInterface.

Definition at line 223 of file glpk_interface.cc.

◆ row_status()

MPSolver::BasisStatus operations_research::GLPKInterface::row_status ( int constraint_index) const
overridevirtual

Implements operations_research::MPSolverInterface.

Definition at line 692 of file glpk_interface.cc.

◆ SetCoefficient()

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

Implements operations_research::MPSolverInterface.

Definition at line 310 of file glpk_interface.cc.

◆ SetConstraintBounds()

void operations_research::GLPKInterface::SetConstraintBounds ( int mpsolver_constraint_index,
double lb,
double ub )
overridevirtual

Implements operations_research::MPSolverInterface.

Definition at line 281 of file glpk_interface.cc.

◆ SetObjectiveCoefficient()

void operations_research::GLPKInterface::SetObjectiveCoefficient ( const MPVariable * variable,
double coefficient )
overridevirtual

Implements operations_research::MPSolverInterface.

Definition at line 339 of file glpk_interface.cc.

◆ SetObjectiveOffset()

void operations_research::GLPKInterface::SetObjectiveOffset ( double value)
overridevirtual

Implements operations_research::MPSolverInterface.

Definition at line 345 of file glpk_interface.cc.

◆ SetOptimizationDirection()

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

Implements operations_research::MPSolverInterface.

Definition at line 235 of file glpk_interface.cc.

◆ SetVariableBounds()

void operations_research::GLPKInterface::SetVariableBounds ( int mpsolver_var_index,
double lb,
double ub )
overridevirtual

Implements operations_research::MPSolverInterface.

Definition at line 240 of file glpk_interface.cc.

◆ SetVariableInteger()

void operations_research::GLPKInterface::SetVariableInteger ( int mpsolver_var_index,
bool integer )
overridevirtual

Implements operations_research::MPSolverInterface.

Definition at line 268 of file glpk_interface.cc.

◆ Solve()

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

Implements operations_research::MPSolverInterface.

Definition at line 511 of file glpk_interface.cc.

◆ SolverVersion()

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

Implements operations_research::MPSolverInterface.

Definition at line 152 of file glpk_interface.cc.

◆ underlying_solver()

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

Implements operations_research::MPSolverInterface.

Definition at line 156 of file glpk_interface.cc.


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