27 std::vector<std::string> minMaxSolvingTechniques = {
"vi",
"value-iteration",
28 "pi",
"policy-iteration",
29 "lp",
"linear-programming",
31 "ii",
"interval-iteration",
32 "svi",
"sound-value-iteration",
33 "ovi",
"optimistic-value-iteration",
34 "topological",
"vi-to-pi",
35 "vi-to-lp",
"acyclic"};
41 .setDefaultValueString(
"topological")
46 "The maximal number of iterations to perform before iterative solving is aborted.")
55 .setDefaultValueDouble(1e-06)
61 "Sets whether the relative or the absolute error is considered for detecting convergence.")
65 std::vector<std::string> multiplicationStyles = {
"gaussseidel",
"regular",
"gs",
"r"};
67 "Sets which method multiplication style to prefer for value iteration.")
71 .setDefaultValueString(
"gaussseidel")
76 "Enforces end component collapsing for MinMax equation systems so that their solution becomes unique. May "
77 "simplify solving but causes some overhead.")
82 "If set, enforce equality in the LP encoding for actions with a unique state.")
90 std::vector<std::string> optimizationObjectiveTypes = {
"all",
"onlyinitial"};
96 .setDefaultValueString(
"all")
103 if (minMaxEquationSolvingTechnique ==
"value-iteration" || minMaxEquationSolvingTechnique ==
"vi") {
104 return storm::solver::MinMaxMethod::ValueIteration;
105 }
else if (minMaxEquationSolvingTechnique ==
"policy-iteration" || minMaxEquationSolvingTechnique ==
"pi") {
106 return storm::solver::MinMaxMethod::PolicyIteration;
107 }
else if (minMaxEquationSolvingTechnique ==
"linear-programming" || minMaxEquationSolvingTechnique ==
"lp") {
108 return storm::solver::MinMaxMethod::LinearProgramming;
109 }
else if (minMaxEquationSolvingTechnique ==
"ratsearch" || minMaxEquationSolvingTechnique ==
"rs") {
110 return storm::solver::MinMaxMethod::RationalSearch;
111 }
else if (minMaxEquationSolvingTechnique ==
"interval-iteration" || minMaxEquationSolvingTechnique ==
"ii") {
112 return storm::solver::MinMaxMethod::IntervalIteration;
113 }
else if (minMaxEquationSolvingTechnique ==
"sound-value-iteration" || minMaxEquationSolvingTechnique ==
"svi") {
114 return storm::solver::MinMaxMethod::SoundValueIteration;
115 }
else if (minMaxEquationSolvingTechnique ==
"optimistic-value-iteration" || minMaxEquationSolvingTechnique ==
"ovi") {
116 return storm::solver::MinMaxMethod::OptimisticValueIteration;
117 }
else if (minMaxEquationSolvingTechnique ==
"topological") {
118 return storm::solver::MinMaxMethod::Topological;
119 }
else if (minMaxEquationSolvingTechnique ==
"vi-to-pi") {
120 return storm::solver::MinMaxMethod::ViToPi;
121 }
else if (minMaxEquationSolvingTechnique ==
"vi-to-lp") {
122 return storm::solver::MinMaxMethod::ViToLp;
123 }
else if (minMaxEquationSolvingTechnique ==
"acyclic") {
124 return storm::solver::MinMaxMethod::Acyclic;
127 STORM_LOG_THROW(
false, storm::exceptions::IllegalArgumentValueException,
128 "Unknown min/max equation solving technique '" << minMaxEquationSolvingTechnique <<
"'.");
167 if (multiplicationStyleString ==
"gaussseidel" || multiplicationStyleString ==
"gs") {
169 }
else if (multiplicationStyleString ==
"regular" || multiplicationStyleString ==
"r") {
172 STORM_LOG_THROW(
false, storm::exceptions::IllegalArgumentValueException,
"Unknown multiplication style '" << multiplicationStyleString <<
"'.");
virtual std::string getValueAsString() const =0
Retrieves the value of this argument as a string.
virtual uint_fast64_t getValueAsUnsignedInteger() const =0
Retrieves the value of this argument as an unsigned integer.
virtual bool getHasBeenSet() const
Retrieves whether the argument has been set.
virtual double getValueAsDouble() const =0
Retrieves the value of this argument as a double.
virtual bool wasSetFromDefaultValue() const =0
static ArgumentBuilder createUnsignedIntegerArgument(std::string const &name, std::string const &description)
Creates an unsigned integer argument with the given parameters.
static ArgumentBuilder createDoubleArgument(std::string const &name, std::string const &description)
Creates a double argument with the given parameters.
static ArgumentBuilder createStringArgument(std::string const &name, std::string const &description)
Creates a string argument with the given parameters.
static std::shared_ptr< ArgumentValidator< double > > createDoubleRangeValidatorExcluding(double lowerBound, double upperBound)
static std::shared_ptr< ArgumentValidator< std::string > > createMultipleChoiceValidator(std::vector< std::string > const &choices)
This class provides the interface to create an option...
ArgumentBase const & getArgumentByName(std::string const &argumentName) const
Returns a reference to the argument with the specified long name.
bool getHasOptionBeenSet() const
Retrieves whether the option has been set.
bool getLpUseOnlyInitialStateAsObjective() const
Retrieves whether only initial states should occur in the optimization objective.
bool getLpUseNonTrivialBounds() const
Retrieves whether additional bounds should be used when constructing the LP.
bool isMinMaxEquationSolvingMethodSetFromDefaultValue() const
Retrieves whether the min/max equation solving method is set from its default value.
bool isConvergenceCriterionSet() const
Retrieves whether the convergence criterion has been set.
uint_fast64_t getMaximalIterationCount() const
Retrieves the maximal number of iterations to perform until giving up on converging.
bool isMaximalIterationCountSet() const
Retrieves whether the maximal iteration count has been set.
bool isMinMaxEquationSolvingMethodSet() const
Retrieves whether a min/max equation solving technique has been set.
static const std::string moduleName
double getPrecision() const
Retrieves the precision that is used for detecting convergence.
bool isForceUniqueSolutionRequirementSet() const
ConvergenceCriterion getConvergenceCriterion() const
Retrieves the selected convergence criterion.
bool getLpUseEqualityForTrivialActions() const
Retrieves whether equality should be enforced where possible.
MinMaxEquationSolverSettings()
bool isPrecisionSet() const
Retrieves whether the precision has been set.
storm::solver::MultiplicationStyle getValueIterationMultiplicationStyle() const
Retrieves the multiplication style to use in the min-max methods.
storm::solver::MinMaxMethod getMinMaxEquationSolvingMethod() const
Retrieves the selected min/max equation solving method.
This is the base class of the settings for a particular module.
void addOption(std::shared_ptr< Option > const &option)
Adds and registers the given option.
Option & getOption(std::string const &longName)
Retrieves the option with the given long name.
#define STORM_LOG_THROW(cond, exception, message)
const std::string maximalIterationsOptionName
const std::string forceUniqueSolutionRequirementOptionName
const std::string solvingMethodOptionName
const std::string lpUseNonTrivialBoundsOptionName
const std::string precisionOptionName
const std::string lpOptimizeOnlyInitialStateOptionName
const std::string valueIterationMultiplicationStyleOptionName
const std::string absoluteOptionName
const std::string lpEqualityForUniqueActionsOptionName
const std::string maximalIterationsOptionShortName