![]() |
irafhy
Interval arithmetic based Reachability Analysis Framework for Hybrid Automaton
|
#include <GLPKWrapper.h>

Public Member Functions | |
| GLPKWrapper () | |
| constructor More... | |
| 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 More... | |
| ~GLPKWrapper () | |
| destructor More... | |
| void | solve (bool isExact) |
| solve the problem with wrapped GLPK library More... | |
| Evaluation | result (const Eigen::VectorXd &objectCoefficients, const Eigen::MatrixXd &constraintMatrix, const std::vector< capd::interval > &constraintRowBounds) const |
| get the resulting of the solving More... | |
Private Member Functions | |
| void | createArrays (std::size_t size) |
| allocate memory for the GLPK array More... | |
| 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 More... | |
| void | deleteArrays () |
| release the memory More... | |
Private Attributes | |
| glp_prob * | glpProb_ = nullptr |
| pointer to the GLPK problem More... | |
| glp_smcp | param_ |
| GLPK related parameters. More... | |
| int * | ia_ = nullptr |
| pointer to the ia array of GLPK problem More... | |
| int * | ja_ = nullptr |
| pointer to the ja array of GLPK problem More... | |
| std::size_t | rowCnt_ |
| number of the rows of constraints More... | |
| std::size_t | colCnt_ |
| number of the variables More... | |
| double * | array_ = nullptr |
| GLPK data array. More... | |
| bool | isExact_ |
| solve LP problem in exact arithmetic or not More... | |
| LINEPROG_DIRECTION | direction_ |
| optimizing direction of the problem More... | |
| bool | isReady_ |
| is data prepared More... | |
| bool | solved_ |
| is the problem solved by GLPK More... | |
| bool | isArrayCreated_ = false |
| is the GLPK array created More... | |
|
inline |
constructor
References init(), result(), solve(), and ~GLPKWrapper().

| irafhy::GLPKWrapper::~GLPKWrapper | ( | ) |
destructor
References deleteArrays(), glpProb_, isReady_, and solved_.
Referenced by GLPKWrapper().

|
private |
allocate memory for the GLPK array
| size | size of the array |
References array_, deleteArrays(), ia_, isArrayCreated_, and ja_.
Referenced by init().

|
private |
release the memory
References array_, ia_, isArrayCreated_, and ja_.
Referenced by createArrays(), and ~GLPKWrapper().
|
private |
fill the GLPK array with given information
| objectCoefficients | coefficients of the object function |
| objectConstantTerm | constant item of the object function |
| constraintMatrix | linear constraints |
| constraintRowBounds | bounds of the linear constraints |
| constraintColBounds | bounds of variables |
References array_, colCnt_, glpProb_, ia_, isArrayCreated_, ja_, and rowCnt_.
Referenced by init().
| void irafhy::GLPKWrapper::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
| objectCoefficients | coefficients of object function |
| objectConstantTerm | constant term of object function |
| constraintMatrix | linear constraints |
| constraintRowBounds | bounds of linear constraints |
| constraintColBounds | bounds of variables |
| direction | direction of the linear programming |
References createArrays(), direction_, fillArrays(), glpProb_, isReady_, irafhy::MAX, irafhy::MIN, and param_.
Referenced by GLPKWrapper().

| Evaluation irafhy::GLPKWrapper::result | ( | const Eigen::VectorXd & | objectCoefficients, |
| const Eigen::MatrixXd & | constraintMatrix, | ||
| const std::vector< capd::interval > & | constraintRowBounds | ||
| ) | const |
get the resulting of the solving
| objectCoefficients | coefficients of object function |
| constraintMatrix | linear constraints |
| constraintRowBounds | bounds of linear constraints |
References colCnt_, irafhy::FEASIBLE, glpProb_, irafhy::INFEASIBLE, irafhy::NO_FEASIBLE, irafhy::OPTIMAL, rowCnt_, solved_, irafhy::UNBOUNDED, and irafhy::UNDEFINED.
Referenced by GLPKWrapper().
| void irafhy::GLPKWrapper::solve | ( | bool | isExact | ) |
|
private |
GLPK data array.
Referenced by createArrays(), deleteArrays(), fillArrays(), and solve().
|
private |
number of the variables
Referenced by fillArrays(), result(), and solve().
|
private |
optimizing direction of the problem
Referenced by init().
|
private |
pointer to the GLPK problem
Referenced by fillArrays(), init(), result(), solve(), and ~GLPKWrapper().
|
private |
pointer to the ia array of GLPK problem
Referenced by createArrays(), deleteArrays(), fillArrays(), and solve().
|
mutableprivate |
is the GLPK array created
Referenced by createArrays(), deleteArrays(), and fillArrays().
|
private |
solve LP problem in exact arithmetic or not
|
mutableprivate |
is data prepared
Referenced by init(), solve(), and ~GLPKWrapper().
|
private |
pointer to the ja array of GLPK problem
Referenced by createArrays(), deleteArrays(), fillArrays(), and solve().
|
private |
GLPK related parameters.
Referenced by init().
|
private |
number of the rows of constraints
Referenced by fillArrays(), result(), and solve().
|
mutableprivate |
is the problem solved by GLPK
Referenced by result(), solve(), and ~GLPKWrapper().