15const std::string LongRunAverageSolverSettings::detLraMethodOptionName =
"detmethod";
16const std::string LongRunAverageSolverSettings::nondetLraMethodOptionName =
"nondetmethod";
17const std::string LongRunAverageSolverSettings::maximalIterationsOptionName =
"maxiter";
18const std::string LongRunAverageSolverSettings::maximalIterationsOptionShortName =
"i";
19const std::string LongRunAverageSolverSettings::precisionOptionName =
"precision";
20const std::string LongRunAverageSolverSettings::absoluteOptionName =
"absolute";
21const std::string LongRunAverageSolverSettings::aperiodicFactorOptionName =
"aperiodicfactor";
24 std::vector<std::string>
detLraMethods = {
"gb",
"gain-bias-equations",
"distr",
"lra-distribution-equations",
"vi",
"value-iteration"};
26 "Sets which method is preferred for computing long run averages on deterministic models.")
34 std::vector<std::string>
nondetLraMethods = {
"vi",
"value-iteration",
"linear-programming",
"lp"};
36 "Sets which method is preferred for computing long run averages on models with nondeterminism.")
45 "The maximal number of iterations to perform before iterative solving is aborted.")
46 .setShortName(maximalIterationsOptionShortName)
60 "Sets whether the relative or the absolute error is considered for detecting convergence.")
65 "If required by the selected method (e.g. vi), this factor controls how the system is made aperiodic")
77 return storm::solver::LraMethod::GainBiasEquations;
80 return storm::solver::LraMethod::LraDistributionEquations;
83 return storm::solver::LraMethod::ValueIteration;
85 STORM_LOG_THROW(
false, storm::exceptions::IllegalArgumentValueException,
86 "Unknown lra solving technique for deterministic models:'" <<
lraMethodString <<
"'.");
97 return storm::solver::LraMethod::ValueIteration;
99 return storm::solver::LraMethod::LinearProgramming;
101 STORM_LOG_THROW(
false, storm::exceptions::IllegalArgumentValueException,
102 "Unknown lra solving technique for nondeterministic models:'" <<
lraMethodString <<
"'.");
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 isPrecisionSet() const
Retrieves whether the precision has been set.
storm::solver::LraMethod getDetLraMethod() const
Retrieves the selected long run average method for deterministic models.
double getAperiodicFactor() const
Retrieves a factor that describes how the system is made aperiodic (if necessary by the method)
LongRunAverageSolverSettings()
bool isDetLraMethodSetFromDefaultValue() const
Retrieves whether the LraMethod for deterministic models was set from a default value.
bool isMaximalIterationCountSet() const
Retrieves whether a maximal iteration count for iterative methods was set.
uint_fast64_t getMaximalIterationCount() const
Retrieves the maximal number of iterations to perform until giving up on converging.
static const std::string moduleName
double getPrecision() const
Retrieves the precision that is used for detecting convergence.
storm::solver::LraMethod getNondetLraMethod() const
Retrieves the selected long run average method for nondeterministic models.
bool isNondetLraMethodSetFromDefaultValue() const
Retrieves whether the LraMethod for nondeterministic models was set from a default value.
bool isRelativePrecision() const
Retrieves whether the convergence criterion has been set to relative.
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)
SettingsType const & getModule()
Get module.