1 #ifndef UTILITY_OPTIMIZER_LINEAR_PROG_GLPK_WRAPPER_H 2 #define UTILITY_OPTIMIZER_LINEAR_PROG_GLPK_WRAPPER_H 8 #include <capd/capdlib.h> 80 void fillArrays(
const Eigen::VectorXd& objectCoefficients,
81 double objectConstantTerm,
82 const Eigen::MatrixXd& constraintMatrix,
83 const std::vector<capd::interval>& constraintRowBounds,
84 const std::vector<capd::interval>& constraintColBounds);
116 void init(
const Eigen::VectorXd& objectCoefficients,
117 double objectConstantTerm,
118 const Eigen::MatrixXd& constraintMatrix,
119 const std::vector<capd::interval>& constraintRowBounds,
120 const std::vector<capd::interval>& constraintColBounds,
130 void solve(
bool isExact);
139 const Eigen::MatrixXd& constraintMatrix,
140 const std::vector<capd::interval>& constraintRowBounds)
const;
143 #endif //UTILITY_OPTIMIZER_LINEAR_PROG_GLPK_WRAPPER_H
int * ia_
pointer to the ia array of GLPK problem
Definition: GLPKWrapper.h:28
LINEPROG_DIRECTION
optimization direction of the linear programming
Definition: enum.h:83
~GLPKWrapper()
destructor
Definition: GLPKWrapper.cpp:137
double * array_
GLPK data array.
Definition: GLPKWrapper.h:44
Evaluation result(const Eigen::VectorXd &objectCoefficients, const Eigen::MatrixXd &constraintMatrix, const std::vector< capd::interval > &constraintRowBounds) const
get the resulting of the solving
Definition: GLPKWrapper.cpp:193
void createArrays(std::size_t size)
allocate memory for the GLPK array
Definition: GLPKWrapper.cpp:7
bool solved_
is the problem solved by GLPK
Definition: GLPKWrapper.h:60
Definition: evaluation.hpp:10
bool isReady_
is data prepared
Definition: GLPKWrapper.h:56
Definition: condition.cpp:3
LINEPROG_DIRECTION direction_
optimizing direction of the problem
Definition: GLPKWrapper.h:52
glp_prob * glpProb_
pointer to the GLPK problem
Definition: GLPKWrapper.h:20
void deleteArrays()
release the memory
Definition: GLPKWrapper.cpp:126
void fillArrays(const Eigen::VectorXd &objectCoefficients, double objectConstantTerm, const Eigen::MatrixXd &constraintMatrix, const std::vector< capd::interval > &constraintRowBounds, const std::vector< capd::interval > &constraintColBounds)
fill the GLPK array with given information
Definition: GLPKWrapper.cpp:17
Definition: GLPKWrapper.h:14
bool isExact_
solve LP problem in exact arithmetic or not
Definition: GLPKWrapper.h:48
void solve(bool isExact)
solve the problem with wrapped GLPK library
Definition: GLPKWrapper.cpp:178
void init(const Eigen::VectorXd &objectCoefficients, double objectConstantTerm, const Eigen::MatrixXd &constraintMatrix, const std::vector< capd::interval > &constraintRowBounds, const std::vector< capd::interval > &constraintColBounds, LINEPROG_DIRECTION direction)
initialize the problem with given information
Definition: GLPKWrapper.cpp:146
GLPKWrapper()
constructor
Definition: GLPKWrapper.h:94
std::size_t rowCnt_
number of the rows of constraints
Definition: GLPKWrapper.h:36
glp_smcp param_
GLPK related parameters.
Definition: GLPKWrapper.h:24
int * ja_
pointer to the ja array of GLPK problem
Definition: GLPKWrapper.h:32
bool isArrayCreated_
is the GLPK array created
Definition: GLPKWrapper.h:64
std::size_t colCnt_
number of the variables
Definition: GLPKWrapper.h:40