Storm 1.14.0.1
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
MultiObjectiveModelCheckerEnvironment.cpp
Go to the documentation of this file.
2
7
9namespace storm {
10
13 method = multiobjectiveSettings.getMultiObjectiveMethod();
14 if (multiobjectiveSettings.isExportPlotSet()) {
15 plotPathUnderApprox = multiobjectiveSettings.getExportPlotDirectory() + "underapproximation.csv";
16 plotPathOverApprox = multiobjectiveSettings.getExportPlotDirectory() + "overapproximation.csv";
17 plotPathParetoPoints = multiobjectiveSettings.getExportPlotDirectory() + "paretopoints.csv";
18 }
19
20 precision = storm::utility::convertNumber<storm::RationalNumber>(multiobjectiveSettings.getPrecision());
21 if (multiobjectiveSettings.getPrecisionAbsolute()) {
22 precisionType = PrecisionType::Absolute;
23 } else if (multiobjectiveSettings.getPrecisionRelativeToDiff()) {
24 precisionType = PrecisionType::RelativeToDiff;
25 } else {
26 STORM_LOG_THROW(false, storm::exceptions::IllegalArgumentException, "Unhandled precision type.");
27 }
28
29 if (multiobjectiveSettings.isAutoEncodingSet()) {
30 encodingType = EncodingType::Auto;
31 } else if (multiobjectiveSettings.isClassicEncodingSet()) {
32 encodingType = EncodingType::Classic;
33 } else if (multiobjectiveSettings.isFlowEncodingSet()) {
34 encodingType = EncodingType::Flow;
35 }
36 STORM_LOG_ASSERT(multiobjectiveSettings.isBsccDetectionViaOrderConstraintsSet() || multiobjectiveSettings.isBsccDetectionViaFlowConstraintsSet(),
37 "Unexpected settings.");
38 bsccOrderEncoding = multiobjectiveSettings.isBsccDetectionViaOrderConstraintsSet();
39 STORM_LOG_ASSERT(multiobjectiveSettings.isIndicatorConstraintsSet() || multiobjectiveSettings.isBigMConstraintsSet(), "Unexpected settings.");
40 indicatorConstraints = multiobjectiveSettings.isIndicatorConstraintsSet();
41 redundantBsccConstraints = multiobjectiveSettings.isRedundantBsccConstraintsSet();
42
43 if (multiobjectiveSettings.isWeightedSumApproximationTradeoffSet()) {
44 approximationTradeoff = storm::utility::convertNumber<storm::RationalNumber>(multiobjectiveSettings.getWeightedSumApproximationTradeoff());
45 }
46 if (multiobjectiveSettings.isMaxStepsSet()) {
47 maxSteps = multiobjectiveSettings.getMaxSteps();
48 }
49 if (multiobjectiveSettings.hasSchedulerRestriction()) {
50 schedulerRestriction = multiobjectiveSettings.getSchedulerRestriction();
51 }
52
53 printResults = multiobjectiveSettings.isPrintResultsSet();
54}
55
59
60storm::modelchecker::multiobjective::MultiObjectiveMethod const& MultiObjectiveModelCheckerEnvironment::getMethod() const {
61 return this->method;
62}
63
64void MultiObjectiveModelCheckerEnvironment::setMethod(storm::modelchecker::multiobjective::MultiObjectiveMethod value) {
65 this->method = value;
66}
67
69 return this->plotPathUnderApprox.is_initialized() || this->plotPathOverApprox.is_initialized() || this->plotPathParetoPoints.is_initialized();
70}
71
73 return plotPathUnderApprox;
74}
75
77 plotPathUnderApprox = path;
78}
79
81 plotPathUnderApprox = boost::none;
82}
83
85 return plotPathOverApprox;
86}
87
89 plotPathOverApprox = path;
90}
91
93 plotPathOverApprox = boost::none;
94}
95
97 return plotPathParetoPoints;
98}
99
101 plotPathParetoPoints = path;
102}
103
105 plotPathParetoPoints = boost::none;
106}
107
108storm::RationalNumber const& MultiObjectiveModelCheckerEnvironment::getPrecision() const {
109 return precision;
110}
111
112void MultiObjectiveModelCheckerEnvironment::setPrecision(storm::RationalNumber const& value) {
113 precision = value;
114}
115
119
121 precisionType = value;
122}
123
127
129 encodingType = value;
130}
131
133 return indicatorConstraints;
134}
136 indicatorConstraints = value;
137}
138
140 return bsccOrderEncoding;
141}
143 bsccOrderEncoding = value;
144}
145
147 return redundantBsccConstraints;
148}
149
151 redundantBsccConstraints = value;
152}
153
155 return approximationTradeoff.is_initialized();
156}
157
159 return approximationTradeoff.get();
160}
161
163 approximationTradeoff = value;
164}
165
167 approximationTradeoff = boost::none;
168}
169
171 return maxSteps.is_initialized();
172}
173
175 return maxSteps.get();
176}
177
179 maxSteps = value;
180}
181
183 maxSteps = boost::none;
184}
185
187 return schedulerRestriction.is_initialized();
188}
189
193
197
199 schedulerRestriction = boost::none;
200}
201
203 return printResults;
204}
205
207 printResults = value;
208}
209
210} // namespace storm
storm::modelchecker::multiobjective::MultiObjectiveMethod const & getMethod() const
void setMethod(storm::modelchecker::multiobjective::MultiObjectiveMethod value)
bool isApproximationTradeoffSet() const
Configure approximation tradeoff between accuracy of weighted sum optimization vs.
void setSchedulerRestriction(storm::storage::SchedulerClass const &value)
storm::storage::SchedulerClass const & getSchedulerRestriction() const
#define STORM_LOG_ASSERT(cond, message)
Definition macros.h:9
#define STORM_LOG_THROW(cond, exception, message)
Definition macros.h:28
SettingsType const & getModule()
Get module.
TargetType convertNumber(SourceType const &number)