19template<storm::dd::DdType DdType,
typename ValueType>
25template<storm::dd::DdType DdType,
typename ValueType>
46template<storm::dd::DdType DdType,
typename ValueType>
47MinMaxMethod SymbolicMinMaxLinearEquationSolver<DdType, ValueType>::getMethod(
Environment const& env,
bool isExactMode)
const {
51 if (isExactMode && method != MinMaxMethod::RationalSearch) {
54 "Selecting 'rational search' as the solution technique to guarantee exact results. If you want to override this, please explicitly specify a "
56 method = MinMaxMethod::RationalSearch;
58 STORM_LOG_WARN(
"The selected solution method does not guarantee exact results.");
61 if (method != MinMaxMethod::ValueIteration && method != MinMaxMethod::PolicyIteration && method != MinMaxMethod::RationalSearch) {
62 STORM_LOG_WARN(
"Selected method is not supported for this solver, switching to value iteration.");
63 method = MinMaxMethod::ValueIteration;
69template<storm::dd::DdType DdType,
typename ValueType>
75 "The requirements of the solver have not been marked as checked. Please provide the appropriate check or mark the requirements "
76 "as checked (if applicable).");
78 switch (getMethod(env, std::is_same<ValueType, storm::RationalNumber>::value)) {
79 case MinMaxMethod::ValueIteration:
80 return solveEquationsValueIteration(env, dir, x, b);
82 case MinMaxMethod::PolicyIteration:
83 return solveEquationsPolicyIteration(env, dir, x, b);
85 case MinMaxMethod::RationalSearch:
86 return solveEquationsRationalSearch(env, dir, x, b);
89 STORM_LOG_THROW(
false, storm::exceptions::InvalidEnvironmentException,
"The selected min max technique is not supported by this solver.");
94template<storm::dd::DdType DdType,
typename ValueType>
95typename SymbolicMinMaxLinearEquationSolver<DdType, ValueType>::ValueIterationResult
99 bool relativeTerminationCriterion, uint64_t maximalIterations)
const {
102 uint64_t iterations = 0;
112 if (dir == storm::solver::OptimizationDirection::Minimize) {
113 tmp += illegalMaskAdd;
136 return SymbolicMinMaxLinearEquationSolver<DdType, ValueType>::ValueIterationResult(status, iterations, localX);
139template<storm::dd::DdType DdType,
typename ValueType>
146 if (dir == storm::solver::OptimizationDirection::Minimize) {
156template<storm::dd::DdType DdType,
typename ValueType>
157template<
typename RationalType,
typename ImpreciseType>
163 for (uint64_t p = 1; p < precision; ++p) {
165 isSolution = rationalSolver.
isSolution(dir, sharpenedX, rationalB);
175template<storm::dd::DdType DdType,
typename ValueType>
176template<
typename RationalType,
typename ImpreciseType>
177storm::dd::Add<DdType, RationalType> SymbolicMinMaxLinearEquationSolver<DdType, ValueType>::solveEquationsRationalSearchHelper(
180 storm::dd::Add<DdType, ImpreciseType>
const& x, storm::dd::Add<DdType, ImpreciseType>
const& b)
const {
182 storm::dd::Add<DdType, RationalType> sharpenedX;
183 storm::dd::Add<DdType, ImpreciseType> currentX = x;
186 uint64_t overallIterations = 0;
187 uint64_t valueIterationInvocations = 0;
189 uint64_t maxIter = env.solver().minMax().getMaximalNumberOfIterations();
190 bool relative = env.solver().minMax().getRelativeTerminationCriterion();
193 typename SymbolicMinMaxLinearEquationSolver<DdType, ImpreciseType>::ValueIterationResult viResult =
196 ++valueIterationInvocations;
197 STORM_LOG_TRACE(
"Completed " << valueIterationInvocations <<
" value iteration invocations, the last one with precision " << precision
198 <<
" completed in " << viResult.iterations <<
" iterations.");
201 overallIterations += viResult.iterations;
207 bool isSolution =
false;
208 sharpenedX = sharpen<RationalType, ImpreciseType>(dir, p, rationalSolver, viResult.values, rationalB, isSolution);
213 currentX = viResult.values;
226 STORM_LOG_INFO(
"Iterative solver (rational search) converged in " << overallIterations <<
" iterations.");
228 STORM_LOG_WARN(
"Iterative solver (rational search) did not converge in " << overallIterations <<
" iterations.");
234template<storm::dd::DdType DdType,
typename ValueType>
235template<
typename ImpreciseType>
237SymbolicMinMaxLinearEquationSolver<DdType, ValueType>::solveEquationsRationalSearchHelper(Environment
const& env,
239 storm::dd::Add<DdType, ValueType>
const& x,
240 storm::dd::Add<DdType, ValueType>
const& b)
const {
241 return solveEquationsRationalSearchHelper<ValueType, ValueType>(env, dir, *
this, *
this, b, this->getLowerBoundsVector(), b);
244template<storm::dd::DdType DdType,
typename ValueType>
245template<
typename ImpreciseType>
247SymbolicMinMaxLinearEquationSolver<DdType, ValueType>::solveEquationsRationalSearchHelper(Environment
const& env,
249 storm::dd::Add<DdType, ValueType>
const& x,
250 storm::dd::Add<DdType, ValueType>
const& b)
const {
251 if constexpr (storm::dd::BackendTraits<DdType>::template supportsValueType<storm::RationalNumber>) {
252 storm::dd::Add<DdType, storm::RationalNumber> rationalB = b.template toValueType<storm::RationalNumber>();
254 this->A.template toValueType<storm::RationalNumber>(), this->allRows, this->illegalMask, this->rowMetaVariables, this->columnMetaVariables,
255 this->choiceVariables, this->rowColumnMetaVariablePairs,
258 storm::dd::Add<DdType, storm::RationalNumber> rationalResult = solveEquationsRationalSearchHelper<storm::RationalNumber, ImpreciseType>(
259 env, dir, rationalSolver, *
this, rationalB, this->getLowerBoundsVector(), b);
260 return rationalResult.template toValueType<ValueType>();
263 "Rational search is not supported, as the selected DD library does not support rational numbers.");
267template<storm::dd::DdType DdType,
typename ValueType>
268template<
typename ImpreciseType>
269typename std::enable_if<!std::is_same<ValueType, ImpreciseType>::value, storm::dd::Add<DdType, ValueType>>::type
270SymbolicMinMaxLinearEquationSolver<DdType, ValueType>::solveEquationsRationalSearchHelper(Environment
const& env,
272 storm::dd::Add<DdType, ValueType>
const& x,
273 storm::dd::Add<DdType, ValueType>
const& b)
const {
275 storm::dd::Add<DdType, ValueType> rationalResult;
276 storm::dd::Add<DdType, ImpreciseType> impreciseX;
278 impreciseX = this->getLowerBoundsVector().template toValueType<ImpreciseType>();
279 storm::dd::Add<DdType, ImpreciseType> impreciseB = b.template toValueType<ImpreciseType>();
281 this->A.template toValueType<ImpreciseType>(), this->allRows, this->illegalMask, this->rowMetaVariables, this->columnMetaVariables,
284 rationalResult = solveEquationsRationalSearchHelper<ValueType, ImpreciseType>(env, dir, *
this, impreciseSolver, b, impreciseX, impreciseB);
285 }
catch (storm::exceptions::PrecisionExceededException
const&) {
286 STORM_LOG_WARN(
"Precision of value type was exceeded, trying to recover by switching to rational arithmetic.");
289 rationalResult = solveEquationsRationalSearchHelper<ValueType, ValueType>(env, dir, *
this, *
this, b, impreciseX.template toValueType<ValueType>(), b);
291 return rationalResult.template toValueType<ValueType>();
294template<storm::dd::DdType DdType,
typename ValueType>
295storm::dd::Add<DdType, ValueType> SymbolicMinMaxLinearEquationSolver<DdType, ValueType>::solveEquationsRationalSearch(
297 storm::dd::Add<DdType, ValueType>
const& b)
const {
298 return solveEquationsRationalSearchHelper<double>(env, dir, x, b);
301template<storm::dd::DdType DdType,
typename ValueType>
302storm::dd::Add<DdType, ValueType> SymbolicMinMaxLinearEquationSolver<DdType, ValueType>::solveEquationsValueIteration(
304 storm::dd::Add<DdType, ValueType>
const& b)
const {
306 storm::dd::Add<DdType, ValueType> localX;
308 if (this->hasUniqueSolution()) {
312 if (this->hasInitialScheduler()) {
314 std::unique_ptr<storm::Environment> environmentOfSolverStorage;
315 auto precOfSolver = env.solver().getPrecisionOfLinearEquationSolver(env.solver().getLinearEquationSolverType());
317 bool changePrecision = precOfSolver.first && precOfSolver.first.get() > env.solver().minMax().getPrecision();
318 bool changeRelative = precOfSolver.second && !precOfSolver.second.get() && env.solver().minMax().getRelativeTerminationCriterion();
319 if (changePrecision || changeRelative) {
320 environmentOfSolverStorage = std::make_unique<storm::Environment>(env);
321 boost::optional<storm::RationalNumber> newPrecision;
322 boost::optional<bool> newRelative;
323 if (changePrecision) {
324 newPrecision = env.solver().minMax().getPrecision();
326 if (changeRelative) {
329 environmentOfSolverStorage->solver().setLinearEquationSolverPrecision(newPrecision, newRelative);
332 storm::Environment
const& environmentOfSolver = environmentOfSolverStorage ? *environmentOfSolverStorage : env;
333 localX = solveEquationsWithScheduler(environmentOfSolver, this->getInitialScheduler(), x, b);
335 localX = this->getLowerBoundsVector();
340 ValueIterationResult viResult = performValueIteration(dir, localX, b, precision, env.solver().minMax().getRelativeTerminationCriterion(),
341 env.solver().minMax().getMaximalNumberOfIterations());
344 STORM_LOG_INFO(
"Iterative solver (value iteration) converged in " << viResult.iterations <<
" iterations.");
346 STORM_LOG_WARN(
"Iterative solver (value iteration) did not converge in " << viResult.iterations <<
" iterations.");
349 return viResult.values;
352template<storm::dd::DdType DdType,
typename ValueType>
353storm::dd::Add<DdType, ValueType> SymbolicMinMaxLinearEquationSolver<DdType, ValueType>::solveEquationsWithScheduler(
354 Environment
const& env, storm::dd::Bdd<DdType>
const& scheduler, storm::dd::Add<DdType, ValueType>
const& x,
355 storm::dd::Add<DdType, ValueType>
const& b)
const {
356 std::unique_ptr<SymbolicLinearEquationSolver<DdType, ValueType>> solver =
357 linearEquationSolverFactory->create(env, this->allRows, this->rowMetaVariables, this->columnMetaVariables, this->rowColumnMetaVariablePairs);
358 this->forwardBounds(*solver);
360 storm::dd::Add<DdType, ValueType> diagonal =
362 return solveEquationsWithScheduler(env, *solver, scheduler, x, b, diagonal);
365template<storm::dd::DdType DdType,
typename ValueType>
366storm::dd::Add<DdType, ValueType> SymbolicMinMaxLinearEquationSolver<DdType, ValueType>::solveEquationsWithScheduler(
368 storm::dd::Add<DdType, ValueType>
const& x, storm::dd::Add<DdType, ValueType>
const& b, storm::dd::Add<DdType, ValueType>
const& diagonal)
const {
370 storm::dd::Add<DdType, ValueType> schedulerA =
371 scheduler.
ite(this->A, scheduler.
getDdManager().template getAddZero<ValueType>()).sumAbstract(this->choiceVariables);
373 schedulerA = diagonal - schedulerA;
376 storm::dd::Add<DdType, ValueType> schedulerB =
377 scheduler.
ite(b, scheduler.
getDdManager().template getAddZero<ValueType>()).sumAbstract(this->choiceVariables);
380 solver.setMatrix(schedulerA);
383 storm::dd::Add<DdType, ValueType> schedulerX = solver.solveEquations(env, x, schedulerB);
388template<storm::dd::DdType DdType,
typename ValueType>
389storm::dd::Add<DdType, ValueType> SymbolicMinMaxLinearEquationSolver<DdType, ValueType>::solveEquationsPolicyIteration(
391 storm::dd::Add<DdType, ValueType>
const& b)
const {
393 storm::dd::Add<DdType, ValueType> currentSolution = x;
394 storm::dd::Add<DdType, ValueType> diagonal =
396 uint_fast64_t iterations = 0;
397 bool converged =
false;
400 storm::dd::Bdd<DdType> scheduler =
401 this->hasInitialScheduler()
402 ? this->getInitialScheduler()
403 : (this->A.sumAbstract(this->columnMetaVariables).notZero() || b.notZero()).existsAbstractRepresentative(this->choiceVariables);
407 std::unique_ptr<storm::Environment> environmentOfSolverStorage;
408 auto precOfSolver = env.solver().getPrecisionOfLinearEquationSolver(env.solver().getLinearEquationSolverType());
410 bool changePrecision = precOfSolver.first && precOfSolver.first.get() > env.solver().minMax().getPrecision();
411 bool changeRelative = precOfSolver.second && !precOfSolver.second.get() && env.solver().minMax().getRelativeTerminationCriterion();
412 if (changePrecision || changeRelative) {
413 environmentOfSolverStorage = std::make_unique<storm::Environment>(env);
414 boost::optional<storm::RationalNumber> newPrecision;
415 boost::optional<bool> newRelative;
416 if (changePrecision) {
417 newPrecision = env.solver().minMax().getPrecision();
419 if (changeRelative) {
422 environmentOfSolverStorage->solver().setLinearEquationSolverPrecision(newPrecision, newRelative);
425 storm::Environment
const& environmentOfSolver = environmentOfSolverStorage ? *environmentOfSolverStorage : env;
427 std::unique_ptr<SymbolicLinearEquationSolver<DdType, ValueType>> linearEquationSolver = linearEquationSolverFactory->create(
428 environmentOfSolver, this->allRows, this->rowMetaVariables, this->columnMetaVariables, this->rowColumnMetaVariablePairs);
429 this->forwardBounds(*linearEquationSolver);
432 uint64_t maxIter = env.solver().minMax().getMaximalNumberOfIterations();
433 while (!converged && iterations < maxIter) {
434 storm::dd::Add<DdType, ValueType> schedulerX =
435 solveEquationsWithScheduler(environmentOfSolver, *linearEquationSolver, scheduler, currentSolution, b, diagonal);
438 storm::dd::Add<DdType, ValueType> choiceValues =
439 this->A.multiplyMatrix(schedulerX.
swapVariables(this->rowColumnMetaVariablePairs), this->columnMetaVariables) + b;
441 storm::dd::Bdd<DdType> nextScheduler;
442 if (dir == storm::solver::OptimizationDirection::Minimize) {
443 choiceValues += illegalMaskAdd;
445 storm::dd::Add<DdType, ValueType> newStateValues = choiceValues.
minAbstract(this->choiceVariables);
446 storm::dd::Bdd<DdType> improvedStates = newStateValues.
less(schedulerX);
450 storm::dd::Add<DdType, ValueType> newStateValues = choiceValues.
maxAbstract(this->choiceVariables);
451 storm::dd::Bdd<DdType> improvedStates = newStateValues.
greater(schedulerX);
457 converged = nextScheduler == scheduler;
461 scheduler = nextScheduler;
464 currentSolution = schedulerX;
469 STORM_LOG_INFO(
"Iterative solver (policy iteration) converged in " << iterations <<
" iterations.");
471 STORM_LOG_WARN(
"Iterative solver (policy iteration) did not converge in " << iterations <<
" iterations.");
474 return currentSolution;
477template<storm::dd::DdType DdType,
typename ValueType>
481 uint_fast64_t n)
const {
485 for (uint_fast64_t i = 0; i < n; ++i) {
492 if (dir == storm::solver::OptimizationDirection::Minimize) {
505template<storm::dd::DdType DdType,
typename ValueType>
510template<storm::dd::DdType DdType,
typename ValueType>
515template<storm::dd::DdType DdType,
typename ValueType>
520template<storm::dd::DdType DdType,
typename ValueType>
522 Environment const& env, boost::optional<storm::solver::OptimizationDirection>
const& direction)
const {
525 auto method = getMethod(env, std::is_same<ValueType, storm::RationalNumber>::value);
526 if (method == MinMaxMethod::PolicyIteration) {
530 }
else if (method == MinMaxMethod::ValueIteration) {
532 if (!direction || direction.get() == storm::solver::OptimizationDirection::Maximize) {
535 if (!direction || direction.get() == storm::solver::OptimizationDirection::Minimize) {
539 }
else if (method == MinMaxMethod::RationalSearch) {
547 STORM_LOG_THROW(
false, storm::exceptions::InvalidEnvironmentException,
"The selected min max technique is not supported by this solver.");
553template<storm::dd::DdType DdType,
typename ValueType>
558template<storm::dd::DdType DdType,
typename ValueType>
563template<storm::dd::DdType DdType,
typename ValueType>
568template<storm::dd::DdType DdType,
typename ValueType>
573template<storm::dd::DdType DdType,
typename ValueType>
575 if (this->hasLowerBound()) {
576 solver.setLowerBound(this->getLowerBound());
578 if (this->hasLowerBounds()) {
579 solver.setLowerBounds(this->getLowerBounds());
581 if (this->hasUpperBound()) {
584 if (this->hasUpperBounds()) {
589template<storm::dd::DdType DdType,
typename ValueType>
591 Environment const& env,
bool hasUniqueSolution, boost::optional<storm::solver::OptimizationDirection>
const& direction)
const {
592 std::unique_ptr<storm::solver::SymbolicMinMaxLinearEquationSolver<DdType, ValueType>>
solver = this->
create();
593 solver->setHasUniqueSolution(hasUniqueSolution);
594 return solver->getRequirements(env, direction);
597template<storm::dd::DdType DdType,
typename ValueType>
598std::unique_ptr<storm::solver::SymbolicMinMaxLinearEquationSolver<DdType, ValueType>>
601 std::set<storm::expressions::Variable>
const& rowMetaVariables, std::set<storm::expressions::Variable>
const& columnMetaVariables,
602 std::set<storm::expressions::Variable>
const& choiceVariables,
603 std::vector<std::pair<storm::expressions::Variable, storm::expressions::Variable>>
const& rowColumnMetaVariablePairs)
const {
604 return std::make_unique<SymbolicMinMaxLinearEquationSolver<DdType, ValueType>>(
605 A, allRows, illegalMask, rowMetaVariables, columnMetaVariables, choiceVariables, rowColumnMetaVariablePairs,
606 std::make_unique<GeneralSymbolicLinearEquationSolverFactory<DdType, ValueType>>());
609template<storm::dd::DdType DdType,
typename ValueType>
610std::unique_ptr<storm::solver::SymbolicMinMaxLinearEquationSolver<DdType, ValueType>>
612 return std::make_unique<SymbolicMinMaxLinearEquationSolver<DdType, ValueType>>();
615template class SymbolicMinMaxLinearEquationSolver<storm::dd::DdType::CUDD, double>;
616template class SymbolicMinMaxLinearEquationSolver<storm::dd::DdType::Sylvan, double>;
617template class SymbolicMinMaxLinearEquationSolver<storm::dd::DdType::Sylvan, storm::RationalNumber>;
619template class GeneralSymbolicMinMaxLinearEquationSolverFactory<storm::dd::DdType::CUDD, double>;
620template class GeneralSymbolicMinMaxLinearEquationSolverFactory<storm::dd::DdType::Sylvan, double>;
621template class GeneralSymbolicMinMaxLinearEquationSolverFactory<storm::dd::DdType::Sylvan, storm::RationalNumber>;
SolverEnvironment & solver()
bool const & isMethodSetFromDefault() const
storm::solver::MinMaxMethod const & getMethod() const
MinMaxSolverEnvironment & minMax()
Add< LibraryType, ValueType > swapVariables(std::vector< std::pair< storm::expressions::Variable, storm::expressions::Variable > > const &metaVariablePairs) const
Swaps the given pairs of meta variables in the ADD.
Bdd< LibraryType > greater(Add< LibraryType, ValueType > const &other) const
Retrieves the function that maps all evaluations to one whose function value in the first ADD are gre...
Add< LibraryType, storm::RationalNumber > sharpenKwekMehlhorn(uint64_t precision) const
Retrieves the function that sharpens all values in the current ADD with the Kwek-Mehlhorn algorithm.
Add< LibraryType, ValueType > maxAbstract(std::set< storm::expressions::Variable > const &metaVariables) const
Max-abstracts from the given meta variables.
Bdd< LibraryType > minAbstractRepresentative(std::set< storm::expressions::Variable > const &metaVariables) const
Similar to minAbstract, but does not abstract from the variables but rather picks a valuation of each...
Add< LibraryType, ValueType > minAbstract(std::set< storm::expressions::Variable > const &metaVariables) const
Min-abstracts from the given meta variables.
Add< LibraryType, ValueType > multiplyMatrix(Add< LibraryType, ValueType > const &otherMatrix, std::set< storm::expressions::Variable > const &summationMetaVariables) const
Multiplies the current ADD (representing a matrix) with the given matrix by summing over the given me...
bool equalModuloPrecision(Add< LibraryType, ValueType > const &other, ValueType const &precision, bool relative=true) const
Checks whether the current and the given ADD represent the same function modulo some given precision.
Bdd< LibraryType > maxAbstractRepresentative(std::set< storm::expressions::Variable > const &metaVariables) const
Similar to maxAbstract, but does not abstract from the variables but rather picks a valuation of each...
Bdd< LibraryType > less(Add< LibraryType, ValueType > const &other) const
Retrieves the function that maps all evaluations to one whose function value in the first ADD are les...
Bdd< LibraryType > ite(Bdd< LibraryType > const &thenBdd, Bdd< LibraryType > const &elseBdd) const
Performs an if-then-else with the given operands, i.e.
DdManager< LibraryType > & getDdManager() const
Retrieves the manager that is responsible for this DD.
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
MinMaxLinearEquationSolverRequirements & requireUniqueSolution(bool critical=true)
MinMaxLinearEquationSolverRequirements & requireLowerBounds(bool critical=true)
MinMaxLinearEquationSolverRequirements & requireValidInitialScheduler(bool critical=true)
storm::dd::DdManager< DdType > & getDdManager() const
virtual void setUpperBound(ValueType const &lowerBound)
virtual void setUpperBounds(storm::dd::Add< DdType, ValueType > const &upperBounds)
storm::dd::Bdd< DdType > allRows
SymbolicEquationSolver()=default
An interface that represents an abstract symbolic linear equation solver.
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.
An interface that represents an abstract symbolic linear equation solver.
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 MinMaxLinearEquationSolverRequirements getRequirements(Environment const &env, boost::optional< storm::solver::OptimizationDirection > const &direction=boost::none) const
Retrieves the requirements of the solver.
#define STORM_LOG_INFO(message)
#define STORM_LOG_WARN(message)
#define STORM_LOG_TRACE(message)
#define STORM_LOG_THROW_UNCONDITIONALLY(exception, message)
#define STORM_LOG_THROW(cond, exception, message)
#define STORM_LOG_WARN_COND_DEBUG(cond, message)
SFTBDDChecker::ValueType ValueType
@ MaximalIterationsExceeded
storm::dd::Bdd< Type > getRowColumnDiagonal(storm::dd::DdManager< Type > const &ddManager, std::vector< std::pair< storm::expressions::Variable, storm::expressions::Variable > > const &rowColumnMetaVariablePairs)
bool isTerminate()
Check whether the program should terminate (due to some abort signal).
ValueType ceil(ValueType const &number)
ValueType log10(ValueType const &number)
TargetType convertNumber(SourceType const &number)
The contract of a DD backend.
static const bool IsExact