Browse Source

Minor fixes for GlpkLpSolver.

Former-commit-id: 07595da7f3
tempestpy_adaptions
dehnert 11 years ago
parent
commit
c5985be437
  1. 4
      src/solver/GlpkLpSolver.cpp
  2. 10
      src/solver/GlpkLpSolver.h

4
src/solver/GlpkLpSolver.cpp

@ -40,6 +40,10 @@ namespace storm {
// Intentionally left empty.
}
GlpkLpSolver::GlpkLpSolver() : GlpkLpSolver("", MINIMIZE) {
// Intentionally left empty.
}
GlpkLpSolver::~GlpkLpSolver() {
// Dispose of all objects allocated dynamically by glpk.
glp_delete_prob(this->lp);

10
src/solver/GlpkLpSolver.h

@ -37,6 +37,12 @@ namespace storm {
*/
GlpkLpSolver(std::string const& name);
/*!
* Constructs a solver without a name. By default the objective function is assumed to be minimized,
* but this may be altered later using a call to setModelSense.
*/
GlpkLpSolver();
/*!
* Destructs a solver by freeing the pointers to glpk's structures.
*/
@ -86,6 +92,10 @@ namespace storm {
throw storm::exceptions::NotImplementedException() << "This version of StoRM was compiled without support for glpk. Yet, a method was called that requires this support. Please choose a version of support with glpk support.";
}
GlpkLpSolver() : LpSolver(MINIMIZE) {
throw storm::exceptions::NotImplementedException() << "This version of StoRM was compiled without support for glpk. Yet, a method was called that requires this support. Please choose a version of support with glpk support.";
}
virtual ~GlpkLpSolver() {
throw storm::exceptions::NotImplementedException() << "This version of StoRM was compiled without support for glpk. Yet, a method was called that requires this support. Please choose a version of support with glpk support.";
}

Loading…
Cancel
Save