From c5985be437ac92ac2370caeb5d8cc22d285869f4 Mon Sep 17 00:00:00 2001 From: dehnert Date: Mon, 16 Dec 2013 17:25:51 +0100 Subject: [PATCH] Minor fixes for GlpkLpSolver. Former-commit-id: 07595da7f3f6f86a9e197d83327023858eb6d032 --- src/solver/GlpkLpSolver.cpp | 4 ++++ src/solver/GlpkLpSolver.h | 10 ++++++++++ 2 files changed, 14 insertions(+) diff --git a/src/solver/GlpkLpSolver.cpp b/src/solver/GlpkLpSolver.cpp index 11aeeda6e..e03f86066 100644 --- a/src/solver/GlpkLpSolver.cpp +++ b/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); diff --git a/src/solver/GlpkLpSolver.h b/src/solver/GlpkLpSolver.h index 9607e59d3..87707b283 100644 --- a/src/solver/GlpkLpSolver.h +++ b/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."; }