Storm
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
PartitionSettings.cpp
Go to the documentation of this file.
2
7
9
11
12const std::string PartitionSettings::moduleName = "partitioning";
13const std::string requestedCoverageOptionName = "terminationCondition";
14const std::string printNoIllustrationOptionName = "noillustration";
15const std::string printFullResultOptionName = "printfullresult";
16
19 .addArgument(storm::settings::ArgumentBuilder::createDoubleArgument("coverage-threshold",
20 "The fraction of unknown area falls below this threshold.")
23 .build())
25 "depth-limit", "(advanced) If given, limits the number of times a region is refined.")
27 .makeOptional()
28 .build())
29 .build());
30 this->addOption(
31 storm::settings::OptionBuilder(moduleName, printNoIllustrationOptionName, false, "If set, no illustration of the result is printed.").build());
32 this->addOption(
33 storm::settings::OptionBuilder(moduleName, printFullResultOptionName, false, "If set, the full result for every region is printed.").build());
34}
35
37 return this->getOption(requestedCoverageOptionName).getArgumentByName("coverage-threshold").getValueAsDouble();
38}
39
41 return this->getOption(requestedCoverageOptionName).getArgumentByName("depth-limit").getHasBeenSet() &&
42 this->getOption(requestedCoverageOptionName).getArgumentByName("depth-limit").getValueAsInteger() >= 0;
43}
44
46 return this->getOption(printNoIllustrationOptionName).getHasOptionBeenSet();
47}
48
50 return this->getOption(printFullResultOptionName).getHasOptionBeenSet();
51}
52
54 int64_t depth = this->getOption(requestedCoverageOptionName).getArgumentByName("depth-limit").getValueAsInteger();
55 STORM_LOG_THROW(depth >= 0, storm::exceptions::InvalidOperationException, "Tried to retrieve the depth limit but it was not set.");
56 return (uint64_t)depth;
57}
58
59} // namespace storm::settings::modules
virtual int_fast64_t getValueAsInteger() const =0
Retrieves the value of this argument as an 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.
static ArgumentBuilder createDoubleArgument(std::string const &name, std::string const &description)
Creates a double argument with the given parameters.
static ArgumentBuilder createIntegerArgument(std::string const &name, std::string const &description)
Creates an integer argument with the given parameters.
static std::shared_ptr< ArgumentValidator< double > > createDoubleRangeValidatorIncluding(double lowerBound, double upperBound)
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.
Definition Option.cpp:79
bool getHasOptionBeenSet() const
Retrieves whether the option has been set.
Definition Option.cpp:125
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.
bool isPrintNoIllustrationSet() const
Retrieves whether no illustration of the result should be printed.
bool isDepthLimitSet() const
Retrieves whether a depth threshold has been set for refinement.
uint64_t getDepthLimit() const
Returns the depth threshold (if set).
double getCoverageThreshold() const
Retrieves the threshold considered for iterative region refinement.
bool isPrintFullResultSet() const
Retrieves whether the full result should be printed.
#define STORM_LOG_THROW(cond, exception, message)
Definition macros.h:30
const std::string printFullResultOptionName
const std::string printNoIllustrationOptionName
const std::string requestedCoverageOptionName
SettingsType const & getModule()
Get module.