13template<
typename ValueType>
19template<
typename ValueType,
typename SolutionType>
24template<
typename ValueType,
typename SolutionType>
30template<
typename ValueType,
typename SolutionType>
35template<
typename ValueType,
typename SolutionType>
42template<
typename ValueType,
typename SolutionType>
44 : optimizationDirection(optimizationDirection), relevantValueVector(
relevantValues) {
48template<
typename ValueType,
typename SolutionType>
50 return static_cast<bool>(optimizationDirection);
53template<
typename ValueType,
typename SolutionType>
55 if (optimizationDirection) {
56 if (optimizationDirection == storm::solver::OptimizationDirection::Minimize) {
57 optimizationDirection = storm::solver::OptimizationDirection::Maximize;
59 optimizationDirection = storm::solver::OptimizationDirection::Minimize;
66 switch (comparisonType.get()) {
83template<
typename ValueType,
typename SolutionType>
85 return optimizationDirection == OptimizationDirection::Minimize;
88template<
typename ValueType,
typename SolutionType>
90 STORM_LOG_THROW(optimizationDirection.has_value(), storm::exceptions::InvalidPropertyException,
"Optimization direction not set.");
91 return optimizationDirection.get();
94template<
typename ValueType,
typename SolutionType>
96 return comparisonType && threshold && relevantValueVector;
99template<
typename ValueType,
typename SolutionType>
104template<
typename ValueType,
typename SolutionType>
109template<
typename ValueType,
typename SolutionType>
111 return uncertaintyResolutionMode;
114template<
typename ValueType,
typename SolutionType>
116 return comparisonType.get();
119template<
typename ValueType,
typename SolutionType>
121 return threshold.get();
124template<
typename ValueType,
typename SolutionType>
126 return static_cast<bool>(relevantValueVector);
129template<
typename ValueType,
typename SolutionType>
131 return relevantValueVector.
get();
134template<
typename ValueType,
typename SolutionType>
136 return relevantValueVector.
get();
139template<
typename ValueType,
typename SolutionType>
141 if (relevantValueVector) {
142 relevantValueVector = relevantValueVector.get() % filter;
146template<
typename ValueType,
typename SolutionType>
148 relevantValueVector = std::move(values);
151template<
typename ValueType,
typename MatrixType,
typename SolutionType>
154 MatrixType&& matrix) {
155 std::unique_ptr<storm::solver::LinearEquationSolver<ValueType>>
solver = factory.
create(env, std::forward<MatrixType>(matrix));
156 if constexpr (!std::is_same_v<ValueType, storm::RationalFunction>) {
157 if (goal.isBounded()) {
159 goal.relevantValues(), goal.boundIsStrict(), goal.thresholdValue(), goal.minimize()));
165template class SolveGoal<double>;
166template class SolveGoal<storm::RationalNumber>;
167template class SolveGoal<storm::RationalFunction>;
168template class SolveGoal<storm::Interval, double>;
169template class SolveGoal<storm::RationalInterval, storm::RationalNumber>;
173template std::unique_ptr<storm::solver::LinearEquationSolver<storm::RationalNumber>>
177template std::unique_ptr<storm::solver::LinearEquationSolver<storm::RationalFunction>>
std::unique_ptr< LinearEquationSolver< ValueType > > create(Environment const &env, storm::storage::SparseMatrix< ValueType > const &matrix) const
Creates a new linear equation solver instance with the given matrix.
bool boundIsStrict() const
UncertaintyResolutionMode getUncertaintyResolutionMode() const
bool boundIsALowerBound() const
void oneMinus()
Flips the comparison type, the direction, and computes the new threshold as 1 - old threshold.
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
OptimizationDirection direction() const
storm::logic::ComparisonType boundComparisonType() const
A bit vector that is internally represented as a vector of 64-bit values.
bool get(uint64_t index) const
Retrieves the truth value of the bit at the given index and performs a bound check.
A class that holds a possibly non-square matrix in the compressed row storage format.
#define STORM_LOG_THROW(cond, exception, message)
std::unique_ptr< storm::solver::LinearEquationSolver< ValueType > > configureLinearEquationSolver(Environment const &env, SolveGoal< ValueType, SolutionType > &&goal, storm::solver::LinearEquationSolverFactory< ValueType > const &factory, MatrixType &&matrix)
UncertaintyResolutionMode
carl::RationalFunction< Polynomial, true > RationalFunction