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>
Public Member Functions | |
| LinearProgramSolver (const LinearProgramSolver &)=default | |
| LinearProgramSolver (LinearProgramSolver &&)=default | |
| LinearProgramSolver & | operator= (const LinearProgramSolver &)=default |
| LinearProgramSolver & | operator= (LinearProgramSolver &&)=default |
|
virtual const ILinearProgramHandle & | linear_program () const =0 |
| Get immutable access to the underlying Linear Program object. | |
| virtual ILinearProgramHandle & | linear_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. | |
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.
|
pure virtual |
Check whether the solver backend supports the given parameter.
| param | The parameter to check support for. |
Implemented in lpint::SoplexSolver, and lpint::GurobiSolver.
|
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.
| param | The parameter to change. |
| value | The value to which to set the parameter. |
Implemented in lpint::SoplexSolver, and lpint::GurobiSolver.
|
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.
| param | The parameter to change. |
| value | The value to which to set the parameter. |
Implemented in lpint::SoplexSolver, and lpint::GurobiSolver.
1.8.6