15const std::string GameSolverSettings::solvingMethodOptionName =
"method";
16const std::string GameSolverSettings::maximalIterationsOptionName =
"maxiter";
17const std::string GameSolverSettings::maximalIterationsOptionShortName =
"i";
18const std::string GameSolverSettings::precisionOptionName =
"precision";
19const std::string GameSolverSettings::absoluteOptionName =
"absolute";
22 std::vector<std::string> gameSolvingTechniques = {
"vi",
"value-iteration",
"pi",
"policy-iteration"};
27 .setDefaultValueString(
"vi")
32 "The maximal number of iterations to perform before iterative solving is aborted.")
33 .setShortName(maximalIterationsOptionShortName)
41 .setDefaultValueDouble(1e-06)
47 "Sets whether the relative or the absolute error is considered for detecting convergence.")
54 if (gameSolvingTechnique ==
"value-iteration" || gameSolvingTechnique ==
"vi") {
55 return storm::solver::GameMethod::ValueIteration;
56 }
else if (gameSolvingTechnique ==
"policy-iteration" || gameSolvingTechnique ==
"pi") {
57 return storm::solver::GameMethod::PolicyIteration;
59 STORM_LOG_THROW(
false, storm::exceptions::IllegalArgumentValueException,
"Unknown game solving technique '" << gameSolvingTechnique <<
"'.");
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.
ConvergenceCriterion getConvergenceCriterion() const
Retrieves the selected convergence criterion.
double getPrecision() const
Retrieves the precision that is used for detecting convergence.
static const std::string moduleName
bool isConvergenceCriterionSet() const
Retrieves whether the convergence criterion has been set.
bool isGameSolvingMethodSetFromDefaultValue() const
Retrieves whether the game solving technique has been set from the default value.
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.
storm::solver::GameMethod getGameSolvingMethod() const
Retrieves the selected game solving technique.
bool isGameSolvingMethodSet() const
Retrieves whether a game solving technique has been set.
bool isPrecisionSet() const
Retrieves whether the precision has been set.
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)