5#include <boost/optional.hpp>
17template<
typename ValueType>
23template<
typename ValueType>
28template<
typename FormulaType,
typename ValueType>
33template<
typename ValueType,
typename RewardModelType>
39template<
typename ValueType>
42template<
typename ValueType,
typename SolutionType = ValueType>
47 template<
typename RewardModelType,
typename FormulaType>
101 boost::optional<OptimizationDirection> optimizationDirection;
103 boost::optional<storm::logic::ComparisonType> comparisonType;
104 boost::optional<SolutionType> threshold;
105 boost::optional<storm::storage::BitVector> relevantValueVector;
109template<
typename ValueType,
typename MatrixType,
typename SolutionType>
113 std::unique_ptr<storm::solver::MinMaxLinearEquationSolver<ValueType, SolutionType>>
solver = factory.
create(env, std::forward<MatrixType>(matrix));
115 :
convert(optimizationDirectionSetting));
116 if (goal.isBounded()) {
117 if (goal.boundIsALowerBound()) {
119 goal.relevantValues(), goal.boundIsStrict(), goal.thresholdValue(),
true));
122 goal.relevantValues(), goal.boundIsStrict(), goal.thresholdValue(),
false));
125 if (goal.hasRelevantValues()) {
126 solver->setRelevantValues(std::move(goal.relevantValues()));
131template<
typename ValueType,
typename MatrixType,
typename SolutionType>
134 MatrixType&& matrix) {
135 std::unique_ptr<storm::solver::LinearEquationSolver<ValueType>>
solver = factory.
create(env, std::forward<MatrixType>(matrix));
136 if (goal.isBounded()) {
138 goal.thresholdValue(), goal.minimize()));
143template<
typename MatrixType>
146 MatrixType&& matrix) {
147 std::unique_ptr<storm::solver::LinearEquationSolver<storm::RationalFunction>>
solver = factory.
create(env, std::forward<MatrixType>(matrix));
bool isBoundSet() const
Retrieves whether there is a bound with which the values for the states will be compared.
ValueType getBoundThreshold() const
Retrieves the value of the bound (if set).
storm::logic::ComparisonType const & getBoundComparisonType() const
Retrieves the comparison type of the bound (if set).
bool isOptimizationDirectionSet() const
Retrieves whether an optimization direction was set.
storm::OptimizationDirection const & getOptimizationDirection() const
Retrieves the optimization direction (if set).
bool isOnlyInitialStatesRelevantSet() const
Retrieves whether only the initial states are relevant in the computation.
UncertaintyResolutionMode getUncertaintyResolutionMode() const
Retrieves the mode which decides how the uncertainty will be resolved.
Base class for all sparse models.
storm::storage::BitVector const & getInitialStates() const
Retrieves the initial states of the model.
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.
An interface that represents an abstract linear equation solver.
std::unique_ptr< MinMaxLinearEquationSolver< ValueType, SolutionType > > create(Environment const &env, storm::storage::SparseMatrix< ValueType > const &matrix) const
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
SolveGoal(storm::models::sparse::Model< ValueType, RewardModelType > const &model, storm::modelchecker::CheckTask< FormulaType, SolutionType > const &checkTask)
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.
A class that holds a possibly non-square matrix in the compressed row storage format.
OptimizationDirection convert(OptimizationDirectionSetting s)
std::unique_ptr< storm::solver::MinMaxLinearEquationSolver< ValueType, SolutionType > > configureMinMaxLinearEquationSolver(Environment const &env, SolveGoal< ValueType, SolutionType > &&goal, storm::solver::MinMaxLinearEquationSolverFactory< ValueType, SolutionType > const &factory, MatrixType &&matrix, OptimizationDirectionSetting optimizationDirectionSetting=OptimizationDirectionSetting::Unset)
bool constexpr minimize(OptimizationDirection d)
OptimizationDirectionSetting
std::unique_ptr< storm::solver::LinearEquationSolver< ValueType > > configureLinearEquationSolver(Environment const &env, SolveGoal< ValueType, SolutionType > &&goal, storm::solver::LinearEquationSolverFactory< ValueType > const &factory, MatrixType &&matrix)
UncertaintyResolutionMode