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";
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.")
.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;
} else if (minMaxEquationSolvingTechnique == "policy-iteration" || minMaxEquationSolvingTechnique == "pi") {
return storm::solver::MinMaxMethod::PolicyIteration;
} else if (minMaxEquationSolvingTechnique == "linear-programming" || minMaxEquationSolvingTechnique == "lp") {
return storm::solver::MinMaxMethod::LinearProgramming;
} else if (minMaxEquationSolvingTechnique == "acyclic") {
return storm::solver::MinMaxMethod::Acyclic;
}

2
src/storm/solver/SolverSelectionOptions.cpp

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

2
src/storm/solver/SolverSelectionOptions.h

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

Loading…
Cancel
Save