Storm 2.0.0.3
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
environment.cpp
Go to the documentation of this file.
1#include "environment.h"
2
7
9
13
14std::unique_ptr<EnvironmentFactory> EnvironmentFactory::clone() const {
15 return std::make_unique<EnvironmentFactory>(*this);
16}
17
21 solver.setForceSoundness(true); // The same as --sound from the CLI
22
23 // The linear equation solver type and the min-max method default to topological, which is sound and thus kept.
24 // Instead, the solvers underlying the topological solver are set.
25 solver.topological().setUnderlyingEquationSolverType(storm::solver::EquationSolverType::Native, true);
26 solver.topological().setUnderlyingMinMaxMethod(storm::solver::MinMaxMethod::OptimisticValueIteration, true);
27 solver.native().setMethod(storm::solver::NativeLinearEquationSolverMethod::OptimisticValueIteration, true);
28 solver.eigen().setMethod(storm::solver::EigenLinearEquationSolverMethod::SparseLU, true);
29 solver.game().setMethod(storm::solver::GameMethod::PolicyIteration, true);
30 solver.lra().setDetLraMethod(storm::solver::LraMethod::ValueIteration, true);
31 solver.lra().setNondetLraMethod(storm::solver::LraMethod::ValueIteration, true);
32 // Corresponds to the choice for the automatic steady state distribution algorithm
34 return env;
35}
36
37std::unique_ptr<EnvironmentFactory> SoundEnvironmentFactory::clone() const {
38 return std::make_unique<SoundEnvironmentFactory>(*this);
39}
40
44
48 solver.setForceExact(true); // The same as --exact from the CLI
49
50 // The linear equation solver type and the min-max method default to topological, which supports exact computations and is thus kept.
51 // Instead, the solvers underlying the topological solver are set.
52 solver.topological().setUnderlyingEquationSolverType(storm::solver::EquationSolverType::Eigen, true);
53 solver.topological().setUnderlyingMinMaxMethod(storm::solver::MinMaxMethod::PolicyIteration, true);
54 solver.native().setMethod(storm::solver::NativeLinearEquationSolverMethod::RationalSearch, true);
55 solver.eigen().setMethod(storm::solver::EigenLinearEquationSolverMethod::SparseLU, true);
56 solver.game().setMethod(storm::solver::GameMethod::PolicyIteration, true);
57 solver.lra().setDetLraMethod(storm::solver::LraMethod::GainBiasEquations, true);
58 solver.lra().setNondetLraMethod(storm::solver::LraMethod::LinearProgramming, true);
59 // Exact LP solving
60 solver.setLpSolverType(storm::solver::LpSolverType::Z3, true);
61 return env;
62}
63
64std::unique_ptr<EnvironmentFactory> ExactEnvironmentFactory::clone() const {
65 return std::make_unique<ExactEnvironmentFactory>(*this);
66}
67
71
72} // namespace storm::utility::environment
SolverEnvironment & solver()
ModelCheckerEnvironment & modelchecker()
void setSteadyStateDistributionAlgorithm(SteadyStateDistributionAlgorithm value)
virtual std::unique_ptr< EnvironmentFactory > clone() const
virtual storm::Environment create() const
Creates a new environment with default values.
virtual std::unique_ptr< EnvironmentFactory > clone() const override
virtual storm::Environment create() const override
Creates a new environment which enforces exact computations.
virtual std::unique_ptr< EnvironmentFactory > clone() const override
virtual storm::Environment create() const override
Creates a new environment which enforces sound computations.
storm::Environment getExactEnvironment()
Creates a new environment which enforces exact computations (via ExactEnvironmentFactory).
storm::Environment getSoundEnvironment()
Creates a new environment which enforces sound computations (via SoundEnvironmentFactory).