Browse Source

added minmax method 'linearprogramming'

tempestpy_adaptions
TimQu 7 years ago
parent
commit
77c0cdc0e3
  1. 4
      src/storm/settings/modules/MinMaxEquationSolverSettings.cpp
  2. 2
      src/storm/solver/SolverSelectionOptions.cpp
  3. 2
      src/storm/solver/SolverSelectionOptions.h

4
src/storm/settings/modules/MinMaxEquationSolverSettings.cpp

@ -19,7 +19,7 @@ namespace storm {
const std::string MinMaxEquationSolverSettings::absoluteOptionName = "absolute"; const std::string MinMaxEquationSolverSettings::absoluteOptionName = "absolute";
MinMaxEquationSolverSettings::MinMaxEquationSolverSettings() : ModuleSettings(moduleName) { MinMaxEquationSolverSettings::MinMaxEquationSolverSettings() : ModuleSettings(moduleName) {
std::vector<std::string> minMaxSolvingTechniques = {"vi", "value-iteration", "pi", "policy-iteration", "acyclic"};
std::vector<std::string> minMaxSolvingTechniques = {"vi", "value-iteration", "pi", "policy-iteration", "linear-programming", "lp", "acyclic"};
this->addOption(storm::settings::OptionBuilder(moduleName, solvingMethodOptionName, false, "Sets which min/max linear equation solving technique is preferred.") this->addOption(storm::settings::OptionBuilder(moduleName, solvingMethodOptionName, false, "Sets which min/max linear equation solving technique is preferred.")
.addArgument(storm::settings::ArgumentBuilder::createStringArgument("name", "The name of a min/max linear equation solving technique.").addValidatorString(ArgumentValidatorFactory::createMultipleChoiceValidator(minMaxSolvingTechniques)).setDefaultValueString("vi").build()).build()); .addArgument(storm::settings::ArgumentBuilder::createStringArgument("name", "The name of a min/max linear equation solving technique.").addValidatorString(ArgumentValidatorFactory::createMultipleChoiceValidator(minMaxSolvingTechniques)).setDefaultValueString("vi").build()).build());
@ -36,6 +36,8 @@ namespace storm {
return storm::solver::MinMaxMethod::ValueIteration; return storm::solver::MinMaxMethod::ValueIteration;
} else if (minMaxEquationSolvingTechnique == "policy-iteration" || minMaxEquationSolvingTechnique == "pi") { } else if (minMaxEquationSolvingTechnique == "policy-iteration" || minMaxEquationSolvingTechnique == "pi") {
return storm::solver::MinMaxMethod::PolicyIteration; return storm::solver::MinMaxMethod::PolicyIteration;
} else if (minMaxEquationSolvingTechnique == "linear-programming" || minMaxEquationSolvingTechnique == "lp") {
return storm::solver::MinMaxMethod::LinearProgramming;
} else if (minMaxEquationSolvingTechnique == "acyclic") { } else if (minMaxEquationSolvingTechnique == "acyclic") {
return storm::solver::MinMaxMethod::Acyclic; return storm::solver::MinMaxMethod::Acyclic;
} }

2
src/storm/solver/SolverSelectionOptions.cpp

@ -8,6 +8,8 @@ namespace storm {
return "policy"; return "policy";
case MinMaxMethod::ValueIteration: case MinMaxMethod::ValueIteration:
return "value"; return "value";
case MinMaxMethod::LinearProgramming:
return "linearprogramming";
case MinMaxMethod::Topological: case MinMaxMethod::Topological:
return "topological"; return "topological";
case MinMaxMethod::Acyclic: case MinMaxMethod::Acyclic:

2
src/storm/solver/SolverSelectionOptions.h

@ -6,7 +6,7 @@
namespace storm { namespace storm {
namespace solver { namespace solver {
ExtendEnumsWithSelectionField(MinMaxMethod, PolicyIteration, ValueIteration, Topological, Acyclic)
ExtendEnumsWithSelectionField(MinMaxMethod, PolicyIteration, ValueIteration, LinearProgramming, Topological, Acyclic)
ExtendEnumsWithSelectionField(GameMethod, PolicyIteration, ValueIteration) ExtendEnumsWithSelectionField(GameMethod, PolicyIteration, ValueIteration)
ExtendEnumsWithSelectionField(LpSolverType, Gurobi, Glpk, Z3) ExtendEnumsWithSelectionField(LpSolverType, Gurobi, Glpk, Z3)

Loading…
Cancel
Save