lpinterface
 All Classes Namespaces Files Functions Variables Enumerations Enumerator
Public Member Functions | List of all members
lpint::LinearProgramSolver Class Referenceabstract

Interface to internal linear program solver. This interface is the most important interface within lpinterface. It allows one to generically use various different linear program solvers polymorphically. See the documentation of its methods and the implementations of this interface for usage information. More...

#include <lpinterface.hpp>

Inheritance diagram for lpint::LinearProgramSolver:
lpint::GurobiSolver lpint::SoplexSolver

Public Member Functions

 LinearProgramSolver (const LinearProgramSolver &)=default
 
 LinearProgramSolver (LinearProgramSolver &&)=default
 
LinearProgramSolveroperator= (const LinearProgramSolver &)=default
 
LinearProgramSolveroperator= (LinearProgramSolver &&)=default
 
virtual const
ILinearProgramHandle
linear_program () const =0
 Get immutable access to the underlying Linear Program object.
 
virtual ILinearProgramHandlelinear_program ()=0
 Get mutable access to the underlying Linear Program object.
 
virtual bool parameter_supported (const Param param) const =0
 Check whether the solver backend supports the given parameter. More...
 
virtual void set_parameter (const Param param, const int value)=0
 Set an integer-valued parameter in the internal LP solver. This method will fail with LpError::UnsupportedParameterError if param is not a valid parameter for the internal solver. More...
 
virtual void set_parameter (const Param param, const double value)=0
 Set a double-valued parameter in the internal LP solver This method will fail with LpError::UnsupportedParameterError if param is not a valid parameter for the internal solver. More...
 
virtual Status solve ()=0
 Solve the linear program.
 
virtual Status solution_status () const =0
 Query the LP solver for the solution status.
 
virtual const Solution< double > & get_solution () const =0
 Get the solution of the linear program. This method will fail with LpError::ModelNotsolvedError if the solution has not (yet) been found.
 

Detailed Description

Interface to internal linear program solver. This interface is the most important interface within lpinterface. It allows one to generically use various different linear program solvers polymorphically. See the documentation of its methods and the implementations of this interface for usage information.

Member Function Documentation

virtual bool lpint::LinearProgramSolver::parameter_supported ( const Param  param) const
pure virtual

Check whether the solver backend supports the given parameter.

Parameters
paramThe parameter to check support for.
Returns
true The solver supports the given parameter.
false The solver does not support the given parameter.

Implemented in lpint::SoplexSolver, and lpint::GurobiSolver.

virtual void lpint::LinearProgramSolver::set_parameter ( const Param  param,
const int  value 
)
pure virtual

Set an integer-valued parameter in the internal LP solver. This method will fail with LpError::UnsupportedParameterError if param is not a valid parameter for the internal solver.

Parameters
paramThe parameter to change.
valueThe value to which to set the parameter.

Implemented in lpint::SoplexSolver, and lpint::GurobiSolver.

virtual void lpint::LinearProgramSolver::set_parameter ( const Param  param,
const double  value 
)
pure virtual

Set a double-valued parameter in the internal LP solver This method will fail with LpError::UnsupportedParameterError if param is not a valid parameter for the internal solver.

Parameters
paramThe parameter to change.
valueThe value to which to set the parameter.

Implemented in lpint::SoplexSolver, and lpint::GurobiSolver.


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