Storm
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
SymbolicEquationSolver.cpp
Go to the documentation of this file.
2
5
8
9namespace storm {
10namespace solver {
11
12template<storm::dd::DdType DdType, typename ValueType>
14 // Intentionally left empty.
16
17template<storm::dd::DdType DdType, typename ValueType>
19 return this->allRows.getDdManager();
22template<storm::dd::DdType DdType, typename ValueType>
24 this->allRows = allRows;
27template<storm::dd::DdType DdType, typename ValueType>
29 return this->allRows;
32template<storm::dd::DdType DdType, typename ValueType>
34 this->lowerBounds = lowerBounds;
35}
36
37template<storm::dd::DdType DdType, typename ValueType>
39 this->lowerBound = lowerBound;
40}
41
42template<storm::dd::DdType DdType, typename ValueType>
44 this->upperBounds = upperBounds;
46
47template<storm::dd::DdType DdType, typename ValueType>
49 this->upperBound = upperBound;
50}
51
52template<storm::dd::DdType DdType, typename ValueType>
53void SymbolicEquationSolver<DdType, ValueType>::setBounds(ValueType const& lowerBound, ValueType const& upperBound) {
54 setLowerBound(lowerBound);
55 setUpperBound(upperBound);
56}
57
58template<storm::dd::DdType DdType, typename ValueType>
60 storm::dd::Add<DdType, ValueType> const& upperBounds) {
61 setLowerBounds(lowerBounds);
62 setUpperBounds(upperBounds);
63}
64
65template<storm::dd::DdType DdType, typename ValueType>
67 return static_cast<bool>(lowerBound);
68}
69
70template<storm::dd::DdType DdType, typename ValueType>
72 return lowerBound.get();
73}
74
75template<storm::dd::DdType DdType, typename ValueType>
77 return static_cast<bool>(lowerBounds);
78}
79
80template<storm::dd::DdType DdType, typename ValueType>
84
85template<storm::dd::DdType DdType, typename ValueType>
87 return static_cast<bool>(upperBound);
88}
89
90template<storm::dd::DdType DdType, typename ValueType>
92 return upperBound.get();
93}
94
95template<storm::dd::DdType DdType, typename ValueType>
97 return static_cast<bool>(upperBounds);
98}
99
100template<storm::dd::DdType DdType, typename ValueType>
104
105template<storm::dd::DdType DdType, typename ValueType>
107 STORM_LOG_THROW(lowerBound || lowerBounds, storm::exceptions::UnmetRequirementException, "Requiring lower bounds, but did not get any.");
108 if (lowerBounds) {
109 return lowerBounds.get();
110 } else {
111 return this->allRows.ite(this->allRows.getDdManager().getConstant(lowerBound.get()), this->allRows.getDdManager().template getAddZero<ValueType>());
112 }
113}
114
115template<storm::dd::DdType DdType, typename ValueType>
117 STORM_LOG_THROW(upperBound || upperBounds, storm::exceptions::UnmetRequirementException, "Requiring upper bounds, but did not get any.");
118 if (upperBounds) {
119 return upperBounds.get();
120 } else {
121 return this->allRows.ite(this->allRows.getDdManager().getConstant(upperBound.get()), this->allRows.getDdManager().template getAddZero<ValueType>());
122 }
123}
124
127
128#ifdef STORM_HAVE_CARL
131
133#endif
134} // namespace solver
135} // namespace storm
storm::dd::DdManager< DdType > & getDdManager() const
storm::dd::Add< DdType, ValueType > const & getLowerBounds() const
virtual void setUpperBound(ValueType const &lowerBound)
storm::dd::Add< DdType, ValueType > getUpperBoundsVector() const
Retrieves a vector of upper bounds for all values (if any lower bounds are known).
virtual void setLowerBounds(storm::dd::Add< DdType, ValueType > const &lowerBounds)
virtual void setUpperBounds(storm::dd::Add< DdType, ValueType > const &upperBounds)
virtual void setLowerBound(ValueType const &lowerBound)
storm::dd::Bdd< DdType > const & getAllRows() const
void setAllRows(storm::dd::Bdd< DdType > const &allRows)
storm::dd::Add< DdType, ValueType > getLowerBoundsVector() const
Retrieves a vector of lower bounds for all values (if any lower bounds are known).
storm::dd::Add< DdType, ValueType > const & getUpperBounds() const
virtual void setBounds(ValueType const &lowerBound, ValueType const &upperBound)
#define STORM_LOG_THROW(cond, exception, message)
Definition macros.h:30
LabParser.cpp.
Definition cli.cpp:18