Storm
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
LinearEquationSolverRequirements.cpp
Go to the documentation of this file.
2
5
6namespace storm {
7namespace solver {
8
12
14 acyclicRequirement.enable(critical);
15 return *this;
16}
17
19 lowerBoundsRequirement.enable(critical);
20 return *this;
21}
22
24 upperBoundsRequirement.enable(critical);
25 return *this;
26}
27
33
35 return acyclicRequirement;
36}
37
39 return lowerBoundsRequirement;
40}
41
43 return upperBoundsRequirement;
44}
45
47 switch (element) {
49 return acyclic();
51 return lowerBounds();
53 return upperBounds();
54 }
55 STORM_LOG_THROW(false, storm::exceptions::IllegalArgumentException, "Unknown ElementType");
56}
57
59 acyclicRequirement.clear();
60}
61
63 lowerBoundsRequirement.clear();
64}
65
67 upperBoundsRequirement.clear();
68}
69
71 return acyclicRequirement || lowerBoundsRequirement || upperBoundsRequirement;
72}
73
75 return acyclicRequirement.isCritical() || lowerBoundsRequirement.isCritical() || upperBoundsRequirement.isCritical();
76}
77
79 std::string res = "[";
80 bool first = true;
81 if (acyclic()) {
82 if (!first) {
83 res += ", ";
84 } else {
85 first = false;
86 }
87 res += "acyclic";
88 if (acyclic().isCritical()) {
89 res += "(mandatory)";
90 }
91 }
92 if (lowerBounds()) {
93 if (!first) {
94 res += ", ";
95 } else {
96 first = false;
97 }
98 res += "lowerBounds";
99 if (lowerBounds().isCritical()) {
100 res += "(mandatory)";
101 }
102 }
103 if (upperBounds()) {
104 if (!first) {
105 res += ", ";
106 } else {
107 first = false;
108 }
109 res += "upperBounds";
110 if (upperBounds().isCritical()) {
111 res += "(mandatory)";
112 }
113 }
114 res += "]";
115 return res;
116}
117
118} // namespace solver
119} // namespace storm
LinearEquationSolverRequirements & requireLowerBounds(bool critical=true)
LinearEquationSolverRequirements & requireAcyclic(bool critical=true)
std::string getEnabledRequirementsAsString() const
Checks whether there are no critical requirements left.
SolverRequirement const & get(Element const &element) const
LinearEquationSolverRequirements & requireBounds(bool critical=true)
LinearEquationSolverRequirements & requireUpperBounds(bool critical=true)
bool isCritical() const
Returns true if the solver fails in case this requirement is not met.
void enable(bool critical=true)
Enables this requirement.
void clear()
Clears this requirement.
#define STORM_LOG_THROW(cond, exception, message)
Definition macros.h:30
LabParser.cpp.
Definition cli.cpp:18