Storm 1.11.1.1
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
MultiObjectiveModelCheckerEnvironment.cpp
Go to the documentation of this file.
2
7
9namespace storm {
10
12 auto const& multiobjectiveSettings = storm::settings::getModule<storm::settings::modules::MultiObjectiveSettings>();
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 useLexicographicModelChecking = multiobjectiveSettings.isLexicographicModelCheckingSet();
55}
56
60
61storm::modelchecker::multiobjective::MultiObjectiveMethod const& MultiObjectiveModelCheckerEnvironment::getMethod() const {
62 return this->method;
63}
64
65void MultiObjectiveModelCheckerEnvironment::setMethod(storm::modelchecker::multiobjective::MultiObjectiveMethod value) {
66 this->method = value;
67}
68
70 return this->plotPathUnderApprox.is_initialized() || this->plotPathOverApprox.is_initialized() || this->plotPathParetoPoints.is_initialized();
71}
72
74 return plotPathUnderApprox;
75}
76
78 plotPathUnderApprox = path;
79}
80
82 plotPathUnderApprox = boost::none;
83}
84
86 return plotPathOverApprox;
87}
88
90 plotPathOverApprox = path;
91}
92
94 plotPathOverApprox = boost::none;
95}
96
98 return plotPathParetoPoints;
99}
100
102 plotPathParetoPoints = path;
103}
104
106 plotPathParetoPoints = boost::none;
107}
108
109storm::RationalNumber const& MultiObjectiveModelCheckerEnvironment::getPrecision() const {
110 return precision;
111}
112
113void MultiObjectiveModelCheckerEnvironment::setPrecision(storm::RationalNumber const& value) {
114 precision = value;
115}
116
120
122 precisionType = value;
123}
124
128
130 encodingType = value;
131}
132
134 return indicatorConstraints;
135}
137 indicatorConstraints = value;
138}
139
141 return bsccOrderEncoding;
142}
144 bsccOrderEncoding = value;
145}
146
148 return redundantBsccConstraints;
149}
150
152 redundantBsccConstraints = value;
153}
154
156 return approximationTradeoff.is_initialized();
157}
158
160 return approximationTradeoff.get();
161}
162
164 approximationTradeoff = value;
165}
166
168 approximationTradeoff = boost::none;
169}
170
172 return maxSteps.is_initialized();
173}
174
176 return maxSteps.get();
177}
178
180 maxSteps = value;
181}
182
184 maxSteps = boost::none;
185}
186
188 return schedulerRestriction.is_initialized();
189}
190
194
198
200 schedulerRestriction = boost::none;
201}
202
204 return printResults;
205}
206
208 printResults = value;
209}
210
212 return useLexicographicModelChecking;
213}
214
216 useLexicographicModelChecking = value;
217}
218} // 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:11
#define STORM_LOG_THROW(cond, exception, message)
Definition macros.h:30