3#include <boost/optional.hpp>
25template<storm::dd::DdType Type,
typename ValueType>
28template<storm::dd::DdType T>
37template<storm::dd::DdType DdType,
typename ValueType>
113 boost::optional<storm::solver::OptimizationDirection>
const& direction = boost::none)
const;
142 MinMaxMethod getMethod(
Environment const& env,
bool isExactMode)
const;
161 template<
typename RationalType,
typename ImpreciseType>
167 template<
typename RationalType,
typename ImpreciseType>
174 template<
typename ImpreciseType>
178 template<
typename ImpreciseType>
182 template<
typename ImpreciseType>
187 template<storm::dd::DdType DdTypePrime,
typename ValueTypePrime>
190 struct ValueIterationResult {
192 : status(status), iterations(iterations), values(values) {
203 uint64_t maximalIterations)
const;
246template<storm::dd::DdType DdType,
typename ValueType>
251 virtual std::unique_ptr<storm::solver::SymbolicMinMaxLinearEquationSolver<DdType, ValueType>>
create(
253 std::set<storm::expressions::Variable>
const& rowMetaVariables, std::set<storm::expressions::Variable>
const& columnMetaVariables,
254 std::set<storm::expressions::Variable>
const& choiceVariables,
255 std::vector<std::pair<storm::expressions::Variable, storm::expressions::Variable>>
const& rowColumnMetaVariablePairs)
const = 0;
262 boost::optional<storm::solver::OptimizationDirection>
const& direction = boost::none)
const;
265 virtual std::unique_ptr<storm::solver::SymbolicMinMaxLinearEquationSolver<DdType, ValueType>>
create()
const = 0;
268template<storm::dd::DdType DdType,
typename ValueType>
271 virtual std::unique_ptr<storm::solver::SymbolicMinMaxLinearEquationSolver<DdType, ValueType>>
create(
273 std::set<storm::expressions::Variable>
const& rowMetaVariables, std::set<storm::expressions::Variable>
const& columnMetaVariables,
274 std::set<storm::expressions::Variable>
const& choiceVariables,
275 std::vector<std::pair<storm::expressions::Variable, storm::expressions::Variable>>
const& rowColumnMetaVariablePairs)
const override;
278 virtual std::unique_ptr<storm::solver::SymbolicMinMaxLinearEquationSolver<DdType, ValueType>>
create()
const override;
virtual std::unique_ptr< storm::solver::SymbolicMinMaxLinearEquationSolver< DdType, ValueType > > create(storm::dd::Add< DdType, ValueType > const &A, storm::dd::Bdd< DdType > const &allRows, storm::dd::Bdd< DdType > const &illegalMask, std::set< storm::expressions::Variable > const &rowMetaVariables, std::set< storm::expressions::Variable > const &columnMetaVariables, std::set< storm::expressions::Variable > const &choiceVariables, std::vector< std::pair< storm::expressions::Variable, storm::expressions::Variable > > const &rowColumnMetaVariablePairs) const override
storm::dd::Bdd< DdType > allRows
SymbolicEquationSolver()=default
An interface that represents an abstract symbolic linear equation solver.
virtual ~SymbolicMinMaxLinearEquationSolverFactory()=default
virtual std::unique_ptr< storm::solver::SymbolicMinMaxLinearEquationSolver< DdType, ValueType > > create(storm::dd::Add< DdType, ValueType > const &A, storm::dd::Bdd< DdType > const &allRows, storm::dd::Bdd< DdType > const &illegalMask, std::set< storm::expressions::Variable > const &rowMetaVariables, std::set< storm::expressions::Variable > const &columnMetaVariables, std::set< storm::expressions::Variable > const &choiceVariables, std::vector< std::pair< storm::expressions::Variable, storm::expressions::Variable > > const &rowColumnMetaVariablePairs) const =0
MinMaxLinearEquationSolverRequirements getRequirements(Environment const &env, bool hasUniqueSolution=false, boost::optional< storm::solver::OptimizationDirection > const &direction=boost::none) const
Retrieves the requirements of the solver that would be created when calling create() right now.
boost::optional< storm::dd::Bdd< DdType > > initialScheduler
bool hasUniqueSolution() const
Retrieves whether the solution to the min max equation system is assumed to be unique.
friend class SymbolicMinMaxLinearEquationSolver
bool hasInitialScheduler() const
Retrieves whether an initial scheduler was set.
void setHasUniqueSolution(bool value=true)
Sets whether the solution to the min max equation system is known to be unique.
virtual storm::dd::Add< DdType, ValueType > multiply(storm::solver::OptimizationDirection const &dir, storm::dd::Add< DdType, ValueType > const &x, storm::dd::Add< DdType, ValueType > const *b=nullptr, uint_fast64_t n=1) const
Performs repeated matrix-vector multiplication, using x[0] = x and x[i + 1] = A*x[i] + b.
virtual storm::dd::Add< DdType, ValueType > solveEquations(Environment const &env, storm::solver::OptimizationDirection const &dir, storm::dd::Add< DdType, ValueType > const &x, storm::dd::Add< DdType, ValueType > const &b) const
Solves the equation system A*x = b.
storm::dd::Add< DdType, ValueType > illegalMaskAdd
storm::dd::Bdd< DdType > illegalMask
bool isSolution(OptimizationDirection dir, storm::dd::Add< DdType, ValueType > const &x, storm::dd::Add< DdType, ValueType > const &b) const
Determines whether the given vector x satisfies x = min/max Ax + b.
void setInitialScheduler(storm::dd::Bdd< DdType > const &scheduler)
Sets an initial scheduler that is required by some solvers (see requirements).
bool isRequirementsCheckedSet() const
Retrieves whether the solver is aware that the requirements were checked.
std::set< storm::expressions::Variable > rowMetaVariables
std::set< storm::expressions::Variable > choiceVariables
storm::dd::Bdd< DdType > const & getInitialScheduler() const
Retrieves the initial scheduler (if there is any).
std::unique_ptr< SymbolicLinearEquationSolverFactory< DdType, ValueType > > linearEquationSolverFactory
storm::dd::Add< DdType, ValueType > A
std::set< storm::expressions::Variable > columnMetaVariables
void setRequirementsChecked(bool value=true)
Notifies the solver that the requirements for solving equations have been checked.
std::vector< std::pair< storm::expressions::Variable, storm::expressions::Variable > > rowColumnMetaVariablePairs
virtual ~SymbolicMinMaxLinearEquationSolver()=default
virtual MinMaxLinearEquationSolverRequirements getRequirements(Environment const &env, boost::optional< storm::solver::OptimizationDirection > const &direction=boost::none) const
Retrieves the requirements of the solver.
static const bool IsExact