Storm 1.11.1.1
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
SolveGoal.cpp
Go to the documentation of this file.
2
9
10namespace storm {
11namespace storage {
12template<typename ValueType>
13class SparseMatrix;
14}
15
16namespace solver {
17
18template<typename ValueType, typename SolutionType>
20 // Intentionally left empty.
21}
22
23template<typename ValueType, typename SolutionType>
26 // Intentionally left empty.
27}
28
29template<typename ValueType, typename SolutionType>
30SolveGoal<ValueType, SolutionType>::SolveGoal(OptimizationDirection optimizationDirection) : optimizationDirection(optimizationDirection) {
31 // Intentionally left empty.
32}
33
34template<typename ValueType, typename SolutionType>
36 SolutionType const& boundThreshold, storm::storage::BitVector const& relevantValues)
37 : optimizationDirection(optimizationDirection), comparisonType(boundComparisonType), threshold(boundThreshold), relevantValueVector(relevantValues) {
38 // Intentionally left empty.
39}
40
41template<typename ValueType, typename SolutionType>
43 : optimizationDirection(optimizationDirection), relevantValueVector(relevantValues) {
44 // Intentionally left empty.
45}
46
47template<typename ValueType, typename SolutionType>
49 return static_cast<bool>(optimizationDirection);
50}
51
52template<typename ValueType, typename SolutionType>
54 if (optimizationDirection) {
55 if (optimizationDirection == storm::solver::OptimizationDirection::Minimize) {
56 optimizationDirection = storm::solver::OptimizationDirection::Maximize;
57 } else {
58 optimizationDirection = storm::solver::OptimizationDirection::Minimize;
59 }
60 }
61 if (threshold) {
62 this->threshold = storm::utility::one<SolutionType>() - this->threshold.get();
63 }
64 if (comparisonType) {
65 switch (comparisonType.get()) {
68 break;
71 break;
74 break;
77 break;
78 }
79 }
80}
81
82template<typename ValueType, typename SolutionType>
84 return optimizationDirection == OptimizationDirection::Minimize;
85}
86
87template<typename ValueType, typename SolutionType>
89 return optimizationDirection.get();
90}
91
92template<typename ValueType, typename SolutionType>
94 return comparisonType && threshold && relevantValueVector;
95}
96
97template<typename ValueType, typename SolutionType>
101
102template<typename ValueType, typename SolutionType>
104 return (comparisonType.get() == storm::logic::ComparisonType::Greater || comparisonType.get() == storm::logic::ComparisonType::Less);
105}
106
107template<typename ValueType, typename SolutionType>
109 return robustAgainstUncertainty;
110}
111
112template<typename ValueType, typename SolutionType>
114 return threshold.get();
115}
116
117template<typename ValueType, typename SolutionType>
119 return static_cast<bool>(relevantValueVector);
120}
121
122template<typename ValueType, typename SolutionType>
124 return relevantValueVector.get();
125}
126
127template<typename ValueType, typename SolutionType>
131
132template<typename ValueType, typename SolutionType>
134 if (relevantValueVector) {
135 relevantValueVector = relevantValueVector.get() % filter;
136 }
137}
138
139template<typename ValueType, typename SolutionType>
141 relevantValueVector = std::move(values);
142}
143
144template class SolveGoal<double>;
148
149} // namespace solver
150} // namespace storm
bool boundIsALowerBound() const
Definition SolveGoal.cpp:98
void oneMinus()
Flips the comparison type, the direction, and computes the new threshold as 1 - old threshold.
Definition SolveGoal.cpp:53
SolutionType const & thresholdValue() const
bool hasRelevantValues() const
void restrictRelevantValues(storm::storage::BitVector const &filter)
storm::storage::BitVector & relevantValues()
void setRelevantValues(storm::storage::BitVector &&values)
bool hasDirection() const
Definition SolveGoal.cpp:48
OptimizationDirection direction() const
Definition SolveGoal.cpp:88
A bit vector that is internally represented as a vector of 64-bit values.
Definition BitVector.h:16
bool get(uint64_t index) const
Retrieves the truth value of the bit at the given index and performs a bound check.
bool constexpr minimize(OptimizationDirection d)