Storm 1.14.0.1
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
BeliefExplorationSettings.cpp
Go to the documentation of this file.
2
5
7
8const std::string BeliefExplorationSettings::moduleName = "beliefExploration";
9
10const std::string explorationTimeLimitOption = "exploration-time";
11const std::string resolutionOption = "resolution";
12const std::string clipGridResolutionOption = "clip-resolution";
13const std::string sizeThresholdOption = "size-threshold";
14const std::string triangulationModeOption = "triangulationmode";
15const std::string clippingOption = "use-clipping";
16const std::string cutZeroGapOption = "cut-zero-gap";
17const std::string inexactPreprocessingOption = "inexact-preprocessing";
18const std::string beliefMdpNumberTypeOption = "belief-mdp-number-type";
19
21 this->addOption(
22 storm::settings::OptionBuilder(moduleName, explorationTimeLimitOption, false, "Sets after which time no further states shall be explored.")
23 .addArgument(storm::settings::ArgumentBuilder::createUnsignedIntegerArgument("time", "In seconds.").setDefaultValueUnsignedInteger(0).build())
24 .build());
25
26 this->addOption(storm::settings::OptionBuilder(moduleName, resolutionOption, false, "Sets the resolution of the discretization")
27 .addArgument(storm::settings::ArgumentBuilder::createUnsignedIntegerArgument("resolution", "the resolution (higher means more precise)")
28 .setDefaultValueUnsignedInteger(2)
30 .build())
31 .build());
32
33 this->addOption(storm::settings::OptionBuilder(moduleName, clipGridResolutionOption, false, "Sets the resolution of the clipping grid")
34 .addArgument(storm::settings::ArgumentBuilder::createUnsignedIntegerArgument("resolution", "the resolution (higher means more precise)")
35 .setDefaultValueUnsignedInteger(2)
37 .build())
38 .build());
39
41 "Sets how many beliefs are explored in the unfolding before approximations are applied.")
43 "threshold", "number of beliefs to explore (higher means more precise, 0 means automatic/heuristic choice)")
44 .setDefaultValueUnsignedInteger(0)
45 .build())
46 .build());
47
48 this->addOption(storm::settings::OptionBuilder(moduleName, triangulationModeOption, false, "Sets how to triangulate beliefs when discretizing.")
49 .setIsAdvanced()
50 .addArgument(storm::settings::ArgumentBuilder::createStringArgument("value", "the triangulation mode")
51 .setDefaultValueString("dynamic")
52 .addValidatorString(storm::settings::ArgumentValidatorFactory::createMultipleChoiceValidator({"dynamic", "static"}))
53 .build())
54 .build());
55 this->addOption(
57 "If set, unfolding uses grid clipping in addition to cut-offs. Not supported for reward-bounded POMDP properties.")
58 .build());
59 this->addOption(
60 storm::settings::OptionBuilder(moduleName, cutZeroGapOption, false, "Cut beliefs where the gap between over- and underapproximation is 0.").build());
63 "If this is set, the POMDP will be analysed using floating point arithmetic for preprocessing, even in exact mode. This speeds "
64 "up computations, but can lead to inaccurate results.")
65 .build());
66 std::vector<std::string> const beliefMdpNumberTypes = {"double", "rational", "match"};
67 this->addOption(storm::settings::OptionBuilder(moduleName, beliefMdpNumberTypeOption, false, "Sets the number type to use for generated belief MDPs")
68 .addArgument(storm::settings::ArgumentBuilder::createStringArgument("type", "Type to use.")
69 .addValidatorString(ArgumentValidatorFactory::createMultipleChoiceValidator(beliefMdpNumberTypes))
70 .setDefaultValueString("match")
71 .build())
72 .build());
73}
74
76 return this->getOption(explorationTimeLimitOption).getArgumentByName("time").getValueAsUnsignedInteger();
77}
78
80 return this->getOption(resolutionOption).getArgumentByName("resolution").getValueAsUnsignedInteger();
81}
82
84 return this->getOption(clipGridResolutionOption).getArgumentByName("resolution").getValueAsUnsignedInteger();
85}
86
88 return this->getOption(sizeThresholdOption).getArgumentByName("threshold").getValueAsUnsignedInteger();
89}
90
92 return this->getOption(triangulationModeOption).getArgumentByName("value").getValueAsString() == "dynamic";
93}
95 return this->getOption(triangulationModeOption).getArgumentByName("value").getValueAsString() == "static";
96}
97
99 return this->getOption(beliefMdpNumberTypeOption).getArgumentByName("type").getValueAsString() == "double";
100}
101
103 return this->getOption(beliefMdpNumberTypeOption).getArgumentByName("type").getValueAsString() == "rational";
104}
105
107 return this->getOption(beliefMdpNumberTypeOption).getArgumentByName("type").getValueAsString() == "match";
108}
109
111 return this->getOption(clippingOption).getHasOptionBeenSet();
112}
113
115 return this->getOption(cutZeroGapOption).getHasOptionBeenSet();
116}
117
119 return this->getOption(inexactPreprocessingOption).getHasOptionBeenSet();
120}
121} // namespace storm::settings::modules
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.
static ArgumentBuilder createUnsignedIntegerArgument(std::string const &name, std::string const &description)
Creates an unsigned integer 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< uint64_t > > createUnsignedGreaterValidator(uint64_t lowerBound)
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.
Definition Option.cpp:79
bool getHasOptionBeenSet() const
Retrieves whether the option has been set.
Definition Option.cpp:125
uint64_t getClippingGridResolution() const
Clipping Grid Resolution.
BeliefExplorationSettings()
Creates a new set of POMDP settings.
uint64_t getSizeThresholdInit() const
The maximal number of newly expanded MDP states in a refinement step.
bool isUseClippingSet() const
Controls if grid clipping is to be used.
uint64_t getResolutionInit() const
Discretization Resolution.
ModuleSettings(std::string const &moduleName)
Constructs a new settings object.
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.