hops
Public Member Functions | Protected Attributes | List of all members
hops::LinearProgram Class Referenceabstract

#include <LinearProgram.hpp>

Inheritance diagram for hops::LinearProgram:
Inheritance graph
Collaboration diagram for hops::LinearProgram:
Collaboration graph

Public Member Functions

 LinearProgram (Eigen::MatrixXd a, Eigen::VectorXd b)
 
virtual ~LinearProgram ()=default
 
virtual LinearProgramSolution solve (const Eigen::VectorXd &objective) const =0
 
virtual std::tuple< Eigen::MatrixXd, Eigen::VectorXd > removeRedundantConstraints (double tolerance)=0
 Removes redundant constraints and returns system matrices. Changes to the system matrices are reflected internally in the LP solver. More...
 
virtual LinearProgramSolution computeChebyshevCenter () const =0
 
virtual std::vector< long > computeUnconstrainedDimensions () const =0
 
virtual std::tuple< Eigen::MatrixXd, Eigen::VectorXd > addBoxConstraintsToUnconstrainedDimensions (double lb, double ub)=0
 Adds box constraints to unconstrained dimensions and returns system matrices. Changes to the system matrices are reflected internally in the LP solver. More...
 
const Eigen::MatrixXd & getA () const
 
const Eigen::VectorXd & getB () const
 

Protected Attributes

Eigen::MatrixXd A
 
Eigen::VectorXd b
 

Constructor & Destructor Documentation

◆ LinearProgram()

hops::LinearProgram::LinearProgram ( Eigen::MatrixXd  a,
Eigen::VectorXd  b 
)
inline

◆ ~LinearProgram()

virtual hops::LinearProgram::~LinearProgram ( )
virtualdefault

Member Function Documentation

◆ addBoxConstraintsToUnconstrainedDimensions()

virtual std::tuple<Eigen::MatrixXd, Eigen::VectorXd> hops::LinearProgram::addBoxConstraintsToUnconstrainedDimensions ( double  lb,
double  ub 
)
pure virtual

Adds box constraints to unconstrained dimensions and returns system matrices. Changes to the system matrices are reflected internally in the LP solver.

Parameters
lb
ub
Returns
A and b

Implemented in hops::LinearProgramGurobiImpl, and hops::LinearProgramClpImpl.

◆ computeChebyshevCenter()

virtual LinearProgramSolution hops::LinearProgram::computeChebyshevCenter ( ) const
pure virtual

◆ computeUnconstrainedDimensions()

virtual std::vector<long> hops::LinearProgram::computeUnconstrainedDimensions ( ) const
pure virtual

dimensions with missing upper boundaries are counted starting from 1 upwards. dimensions with missing lower boundaries are counted starting from -1 downwards.

Returns

Implemented in hops::LinearProgramGurobiImpl, and hops::LinearProgramClpImpl.

◆ getA()

const Eigen::MatrixXd& hops::LinearProgram::getA ( ) const
inline

◆ getB()

const Eigen::VectorXd& hops::LinearProgram::getB ( ) const
inline

◆ removeRedundantConstraints()

virtual std::tuple<Eigen::MatrixXd, Eigen::VectorXd> hops::LinearProgram::removeRedundantConstraints ( double  tolerance)
pure virtual

Removes redundant constraints and returns system matrices. Changes to the system matrices are reflected internally in the LP solver.

Parameters
tolerance
Returns
A and b

Implemented in hops::LinearProgramGurobiImpl, and hops::LinearProgramClpImpl.

◆ solve()

virtual LinearProgramSolution hops::LinearProgram::solve ( const Eigen::VectorXd &  objective) const
pure virtual

Member Data Documentation

◆ A

Eigen::MatrixXd hops::LinearProgram::A
protected

◆ b

Eigen::VectorXd hops::LinearProgram::b
protected

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