Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
operations_research::RoutingLinearSolverWrapper Class Referenceabstract

#include <routing_lp_scheduling.h>

Inheritance diagram for operations_research::RoutingLinearSolverWrapper:
operations_research::RoutingCPSatWrapper operations_research::RoutingGlopWrapper

Public Member Functions

virtual ~RoutingLinearSolverWrapper ()
 
virtual void Clear ()=0
 
virtual int CreateNewPositiveVariable ()=0
 
virtual void SetVariableName (int index, absl::string_view name)=0
 
virtual bool SetVariableBounds (int index, int64_t lower_bound, int64_t upper_bound)=0
 
virtual void SetVariableDisjointBounds (int index, const std::vector< int64_t > &starts, const std::vector< int64_t > &ends)=0
 
virtual int64_t GetVariableLowerBound (int index) const =0
 
virtual int64_t GetVariableUpperBound (int index) const =0
 
virtual void SetObjectiveCoefficient (int index, double coefficient)=0
 
virtual double GetObjectiveCoefficient (int index) const =0
 
virtual void ClearObjective ()=0
 
virtual int NumVariables () const =0
 
virtual int CreateNewConstraint (int64_t lower_bound, int64_t upper_bound)=0
 
virtual void SetCoefficient (int ct, int index, double coefficient)=0
 
virtual bool IsCPSATSolver ()=0
 
virtual void AddObjectiveConstraint ()=0
 
virtual void AddMaximumConstraint (int max_var, std::vector< int > vars)=0
 
virtual void AddProductConstraint (int product_var, std::vector< int > vars)=0
 
virtual void SetEnforcementLiteral (int ct, int condition)=0
 
virtual DimensionSchedulingStatus Solve (absl::Duration duration_limit)=0
 
virtual int64_t GetObjectiveValue () const =0
 
virtual double GetValue (int index) const =0
 
virtual bool SolutionIsInteger () const =0
 
virtual void SetParameters (const std::string &parameters)=0
 This function is meant to override the parameters of the solver.
 
virtual bool ModelIsEmpty () const
 Returns if the model is empty or not.
 
virtual std::string PrintModel () const =0
 Prints an understandable view of the model.
 
int AddVariable (int64_t lower_bound, int64_t upper_bound)
 Adds a variable with bounds [lower_bound, upper_bound].
 
int AddLinearConstraint (int64_t lower_bound, int64_t upper_bound, absl::Span< const std::pair< int, double > > variable_coeffs)
 
int AddReifiedLinearConstraint (int64_t lower_bound, int64_t upper_bound, absl::Span< const std::pair< int, double > > weighted_variables)
 

Detailed Description

Definition at line 167 of file routing_lp_scheduling.h.

Constructor & Destructor Documentation

◆ ~RoutingLinearSolverWrapper()

virtual operations_research::RoutingLinearSolverWrapper::~RoutingLinearSolverWrapper ( )
inlinevirtual

Definition at line 169 of file routing_lp_scheduling.h.

Member Function Documentation

◆ AddLinearConstraint()

int operations_research::RoutingLinearSolverWrapper::AddLinearConstraint ( int64_t lower_bound,
int64_t upper_bound,
absl::Span< const std::pair< int, double > > variable_coeffs )
inline

Adds a linear constraint, enforcing lower_bound <= sum variable * coeff <= upper_bound, and returns the identifier of that constraint.

Definition at line 215 of file routing_lp_scheduling.h.

◆ AddMaximumConstraint()

virtual void operations_research::RoutingLinearSolverWrapper::AddMaximumConstraint ( int max_var,
std::vector< int > vars )
pure virtual

◆ AddObjectiveConstraint()

virtual void operations_research::RoutingLinearSolverWrapper::AddObjectiveConstraint ( )
pure virtual

◆ AddProductConstraint()

virtual void operations_research::RoutingLinearSolverWrapper::AddProductConstraint ( int product_var,
std::vector< int > vars )
pure virtual

◆ AddReifiedLinearConstraint()

int operations_research::RoutingLinearSolverWrapper::AddReifiedLinearConstraint ( int64_t lower_bound,
int64_t upper_bound,
absl::Span< const std::pair< int, double > > weighted_variables )
inline

Adds a linear constraint and a 0/1 variable that is true iff lower_bound <= sum variable * coeff <= upper_bound, and returns the identifier of that variable.

Definition at line 228 of file routing_lp_scheduling.h.

◆ AddVariable()

int operations_research::RoutingLinearSolverWrapper::AddVariable ( int64_t lower_bound,
int64_t upper_bound )
inline

Adds a variable with bounds [lower_bound, upper_bound].

Definition at line 206 of file routing_lp_scheduling.h.

◆ Clear()

virtual void operations_research::RoutingLinearSolverWrapper::Clear ( )
pure virtual

◆ ClearObjective()

virtual void operations_research::RoutingLinearSolverWrapper::ClearObjective ( )
pure virtual

◆ CreateNewConstraint()

virtual int operations_research::RoutingLinearSolverWrapper::CreateNewConstraint ( int64_t lower_bound,
int64_t upper_bound )
pure virtual

◆ CreateNewPositiveVariable()

virtual int operations_research::RoutingLinearSolverWrapper::CreateNewPositiveVariable ( )
pure virtual

◆ GetObjectiveCoefficient()

virtual double operations_research::RoutingLinearSolverWrapper::GetObjectiveCoefficient ( int index) const
pure virtual

◆ GetObjectiveValue()

virtual int64_t operations_research::RoutingLinearSolverWrapper::GetObjectiveValue ( ) const
pure virtual

◆ GetValue()

virtual double operations_research::RoutingLinearSolverWrapper::GetValue ( int index) const
pure virtual

◆ GetVariableLowerBound()

virtual int64_t operations_research::RoutingLinearSolverWrapper::GetVariableLowerBound ( int index) const
pure virtual

◆ GetVariableUpperBound()

virtual int64_t operations_research::RoutingLinearSolverWrapper::GetVariableUpperBound ( int index) const
pure virtual

◆ IsCPSATSolver()

virtual bool operations_research::RoutingLinearSolverWrapper::IsCPSATSolver ( )
pure virtual

◆ ModelIsEmpty()

virtual bool operations_research::RoutingLinearSolverWrapper::ModelIsEmpty ( ) const
inlinevirtual

Returns if the model is empty or not.

Reimplemented in operations_research::RoutingCPSatWrapper.

Definition at line 200 of file routing_lp_scheduling.h.

◆ NumVariables()

virtual int operations_research::RoutingLinearSolverWrapper::NumVariables ( ) const
pure virtual

◆ PrintModel()

virtual std::string operations_research::RoutingLinearSolverWrapper::PrintModel ( ) const
pure virtual

Prints an understandable view of the model.

Implemented in operations_research::RoutingCPSatWrapper, and operations_research::RoutingGlopWrapper.

◆ SetCoefficient()

virtual void operations_research::RoutingLinearSolverWrapper::SetCoefficient ( int ct,
int index,
double coefficient )
pure virtual

◆ SetEnforcementLiteral()

virtual void operations_research::RoutingLinearSolverWrapper::SetEnforcementLiteral ( int ct,
int condition )
pure virtual

◆ SetObjectiveCoefficient()

virtual void operations_research::RoutingLinearSolverWrapper::SetObjectiveCoefficient ( int index,
double coefficient )
pure virtual

◆ SetParameters()

virtual void operations_research::RoutingLinearSolverWrapper::SetParameters ( const std::string & parameters)
pure virtual

This function is meant to override the parameters of the solver.

Implemented in operations_research::RoutingCPSatWrapper, and operations_research::RoutingGlopWrapper.

◆ SetVariableBounds()

virtual bool operations_research::RoutingLinearSolverWrapper::SetVariableBounds ( int index,
int64_t lower_bound,
int64_t upper_bound )
pure virtual

◆ SetVariableDisjointBounds()

virtual void operations_research::RoutingLinearSolverWrapper::SetVariableDisjointBounds ( int index,
const std::vector< int64_t > & starts,
const std::vector< int64_t > & ends )
pure virtual

◆ SetVariableName()

virtual void operations_research::RoutingLinearSolverWrapper::SetVariableName ( int index,
absl::string_view name )
pure virtual

◆ SolutionIsInteger()

virtual bool operations_research::RoutingLinearSolverWrapper::SolutionIsInteger ( ) const
pure virtual

◆ Solve()

virtual DimensionSchedulingStatus operations_research::RoutingLinearSolverWrapper::Solve ( absl::Duration duration_limit)
pure virtual

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