Storm 1.11.1.1
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
ExplicitParetoCurveCheckResult.cpp
Go to the documentation of this file.
2
7
8namespace storm {
9namespace modelchecker {
10template<typename ValueType>
14
15template<typename ValueType>
17 std::vector<point_type> const& points, polytope_type const& underApproximation,
18 polytope_type const& overApproximation)
19 : ParetoCurveCheckResult<ValueType>(points, underApproximation, overApproximation), state(state) {
20 // Intentionally left empty.
21}
22
23template<typename ValueType>
25 polytope_type&& underApproximation, polytope_type&& overApproximation)
26 : ParetoCurveCheckResult<ValueType>(points, underApproximation, overApproximation), state(state) {
27 // Intentionally left empty.
28}
29
30template<typename ValueType>
32 std::vector<scheduler_type>&& schedulers, polytope_type&& underApproximation,
33 polytope_type&& overApproximation)
34 : ParetoCurveCheckResult<ValueType>(points, underApproximation, overApproximation), state(state), schedulers(schedulers) {}
35
36template<typename ValueType>
37std::unique_ptr<CheckResult> ExplicitParetoCurveCheckResult<ValueType>::clone() const {
38 return std::make_unique<ExplicitParetoCurveCheckResult<ValueType>>(this->state, this->points, this->underApproximation, this->overApproximation);
39}
40
41template<typename ValueType>
45
46template<typename ValueType>
50
51template<typename ValueType>
53 STORM_LOG_THROW(filter.isExplicitQualitativeCheckResult(), storm::exceptions::InvalidOperationException,
54 "Cannot filter explicit check result with non-explicit filter.");
55 STORM_LOG_THROW(filter.isResultForAllStates(), storm::exceptions::InvalidOperationException, "Cannot filter check result with non-complete filter.");
56 ExplicitQualitativeCheckResult const& explicitFilter = filter.asExplicitQualitativeCheckResult();
57 ExplicitQualitativeCheckResult::vector_type const& filterTruthValues = explicitFilter.getTruthValuesVector();
58
59 STORM_LOG_THROW(filterTruthValues.getNumberOfSetBits() == 1 && filterTruthValues.get(state), storm::exceptions::InvalidOperationException,
60 "The check result fails to contain some results referred to by the filter.");
61}
62
63template<typename ValueType>
67
68template<typename ValueType>
70 return schedulers.size() > 0;
71}
72
73template<typename ValueType>
74std::vector<typename ExplicitParetoCurveCheckResult<ValueType>::scheduler_type> const& ExplicitParetoCurveCheckResult<ValueType>::getSchedulers() const {
75 STORM_LOG_THROW(this->hasScheduler(), storm::exceptions::InvalidOperationException, "Unable to retrieve non-existing scheduler.");
76 return schedulers;
77}
78
79template<typename ValueType>
80std::vector<typename ExplicitParetoCurveCheckResult<ValueType>::scheduler_type>& ExplicitParetoCurveCheckResult<ValueType>::getSchedulers() {
81 STORM_LOG_THROW(this->hasScheduler(), storm::exceptions::InvalidOperationException, "Unable to retrieve non-existing scheduler.");
82 return schedulers;
83}
84
87} // namespace modelchecker
88} // namespace storm
storm::storage::sparse::state_type const & getState() const
typename ParetoCurveCheckResult< ValueType >::polytope_type polytope_type
virtual void filter(QualitativeCheckResult const &filter) override
Filters the current result wrt.
virtual std::unique_ptr< CheckResult > clone() const override
std::vector< scheduler_type > const & getSchedulers() const
A bit vector that is internally represented as a vector of 64-bit values.
Definition BitVector.h:16
uint64_t getNumberOfSetBits() const
Returns the number of bits that are set to true in this bit vector.
bool get(uint64_t index) const
Retrieves the truth value of the bit at the given index and performs a bound check.
#define STORM_LOG_THROW(cond, exception, message)
Definition macros.h:30