Storm 1.14.0.1
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
ParetoCurveCheckResult.cpp
Go to the documentation of this file.
2
6
7namespace storm {
8namespace modelchecker {
9
10template<typename ValueType>
12 // Intentionally left empty.
13}
14
15template<typename ValueType>
19 // Intentionally left empty.
21
22template<typename ValueType>
26 // Intentionally left empty.
27}
29template<typename ValueType>
32 requires(!std::is_same_v<ExtendedPointType, point_type>)
34 this->points.reserve(points.size());
35 for (auto const& point : points) {
36 this->points.push_back(storm::utility::widen(point_type(point)));
37 }
38}
39
40template<typename ValueType>
44
45template<typename ValueType>
46std::vector<typename ParetoCurveCheckResult<ValueType>::ExtendedPointType> const& ParetoCurveCheckResult<ValueType>::getPoints() const {
47 return points;
48}
49
50template<typename ValueType>
54
55template<typename ValueType>
59
60template<typename ValueType>
62 STORM_LOG_ASSERT(hasUnderApproximation(), "Requested under approx. of Pareto curve although it does not exist.");
63 return underApproximation;
64}
65
66template<typename ValueType>
68 STORM_LOG_ASSERT(hasUnderApproximation(), "Requested over approx. of Pareto curve although it does not exist.");
69 return overApproximation;
70}
71
72template<typename ValueType>
73std::ostream& ParetoCurveCheckResult<ValueType>::writeToStream(std::ostream& out) const {
74 out << '\n';
76 out << "Underapproximation of achievable values: " << underApproximation->toString() << '\n';
77 }
79 out << "Overapproximation of achievable values: " << overApproximation->toString() << '\n';
80 }
81 out << points.size() << " Pareto optimal points found:\n";
82 for (auto const& p : points) {
83 out << " (";
84 for (auto it = p.begin(); it != p.end(); ++it) {
85 if (it != p.begin()) {
86 out << ", ";
87 }
88 out << std::setw(storm::NumberTraits<ValueType>::IsExact ? 20 : 11) << *it;
89 }
90 out << " )";
92 out << " approx. ";
93 out << " (";
94 for (auto it = p.begin(); it != p.end(); ++it) {
95 if (it != p.begin()) {
96 out << ", ";
97 }
98 out << std::setw(11) << storm::utility::convertNumber<double>(*it);
99 }
100 out << " )";
101 }
102 out << '\n';
103 }
104 return out;
105}
106
107template class ParetoCurveCheckResult<double>;
109} // namespace modelchecker
110} // namespace storm
std::vector< ExtendedPointType > const & getPoints() const
std::shared_ptr< storm::storage::geometry::Polytope< ValueType > > polytope_type
virtual std::ostream & writeToStream(std::ostream &out) const override
#define STORM_LOG_ASSERT(cond, message)
Definition macros.h:9
std::vector< ExtendedValueType< ValueType > > widen(std::vector< ValueType > &&values)
Widens a vector of finite values into the extended value type.
static const bool IsExact