Storm 1.14.0.1
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
SparseCtmcCslHelper.h
Go to the documentation of this file.
1#pragma once
2
3#include <optional>
4
6
10
12
14
15namespace storm {
16
17class Environment;
18
19namespace modelchecker::helper {
21 public:
22 template<typename ValueType>
24 static std::vector<ValueType> computeBoundedUntilProbabilities(Environment const& env, storm::solver::SolveGoal<ValueType>&& goal,
26 storm::storage::SparseMatrix<ValueType> const& backwardTransitions,
27 storm::storage::BitVector const& phiStates, storm::storage::BitVector const& psiStates,
28 std::vector<ValueType> const& exitRates, bool qualitative, ValueType lowerBound,
29 std::optional<ValueType> const& upperBound);
30
31 template<typename ValueType>
32 static std::vector<ValueType> computeUntilProbabilities(Environment const& env, storm::solver::SolveGoal<ValueType>&& goal,
34 storm::storage::SparseMatrix<ValueType> const& backwardTransitions,
35 std::vector<ValueType> const& exitRateVector, storm::storage::BitVector const& phiStates,
36 storm::storage::BitVector const& psiStates, bool qualitative);
37
38 template<typename ValueType>
39 static std::vector<ValueType> computeAllUntilProbabilities(Environment const& env, storm::solver::SolveGoal<ValueType>&& goal,
41 std::vector<ValueType> const& exitRateVector, storm::storage::BitVector const& initialStates,
42 storm::storage::BitVector const& phiStates, storm::storage::BitVector const& psiStates);
43
44 template<typename ValueType>
45 static std::vector<ValueType> computeNextProbabilities(Environment const& env, storm::storage::SparseMatrix<ValueType> const& rateMatrix,
46 std::vector<ValueType> const& exitRateVector, storm::storage::BitVector const& nextStates);
47
48 template<typename ValueType, typename RewardModelType>
50 static std::vector<ValueType> computeInstantaneousRewards(Environment const& env, storm::solver::SolveGoal<ValueType>&& goal,
52 std::vector<ValueType> const& exitRateVector, RewardModelType const& rewardModel,
53 ValueType timeBound);
54
55 template<typename ValueType, typename RewardModelType>
57 static std::vector<ValueType> computeCumulativeRewards(Environment const& env, storm::solver::SolveGoal<ValueType>&& goal,
59 std::vector<ValueType> const& exitRateVector, RewardModelType const& rewardModel,
60 ValueType timeBound);
61
62 template<typename ValueType, typename RewardModelType>
63 static std::vector<ValueType> computeReachabilityRewards(Environment const& env, storm::solver::SolveGoal<ValueType>&& goal,
65 storm::storage::SparseMatrix<ValueType> const& backwardTransitions,
66 std::vector<ValueType> const& exitRateVector, RewardModelType const& rewardModel,
67 storm::storage::BitVector const& targetStates, bool qualitative);
68
69 template<typename ValueType, typename RewardModelType>
70 static std::vector<ValueType> computeTotalRewards(Environment const& env, storm::solver::SolveGoal<ValueType>&& goal,
72 storm::storage::SparseMatrix<ValueType> const& backwardTransitions,
73 std::vector<ValueType> const& exitRateVector, RewardModelType const& rewardModel, bool qualitative);
74
75 template<typename ValueType>
76 static std::vector<ValueType> computeReachabilityTimes(Environment const& env, storm::solver::SolveGoal<ValueType>&& goal,
78 storm::storage::SparseMatrix<ValueType> const& backwardTransitions,
79 std::vector<ValueType> const& exitRateVector, storm::storage::BitVector const& targetStates,
80 bool qualitative);
81
82 template<typename ValueType>
84 static std::vector<ValueType> computeAllTransientProbabilities(Environment const& env, storm::storage::SparseMatrix<ValueType> const& rateMatrix,
85 storm::storage::BitVector const& initialStates, storm::storage::BitVector const& phiStates,
86 storm::storage::BitVector const& psiStates, std::vector<ValueType> const& exitRates,
87 ValueType timeBound);
88
98 template<typename ValueType>
101 storm::storage::BitVector const& maybeStates, ValueType uniformizationRate,
102 std::vector<ValueType> const& exitRates);
103
118 template<typename ValueType, bool useMixedPoissonProbabilities = false>
120 static std::vector<ValueType> computeTransientProbabilities(Environment const& env, storm::storage::SparseMatrix<ValueType> const& uniformizedMatrix,
121 std::vector<ValueType> const* addVector, ValueType timeBound, ValueType uniformizationRate,
122 std::vector<ValueType> values, ValueType epsilon);
123
131 template<typename ValueType>
133 std::vector<ValueType> const& exitRates);
134
142 template<typename ValueType>
144 std::vector<ValueType> const& exitRates);
145
153 template<typename ValueType>
154 static bool checkAndUpdateTransientProbabilityEpsilon(storm::Environment const& env, ValueType& epsilon, std::vector<ValueType> const& resultVector,
155 storm::storage::BitVector const& relevantPositions);
156};
157} // namespace modelchecker::helper
158} // namespace storm
static std::vector< ValueType > computeReachabilityRewards(Environment const &env, storm::solver::SolveGoal< ValueType > &&goal, storm::storage::SparseMatrix< ValueType > const &rateMatrix, storm::storage::SparseMatrix< ValueType > const &backwardTransitions, std::vector< ValueType > const &exitRateVector, RewardModelType const &rewardModel, storm::storage::BitVector const &targetStates, bool qualitative)
static std::vector< ValueType > computeUntilProbabilities(Environment const &env, storm::solver::SolveGoal< ValueType > &&goal, storm::storage::SparseMatrix< ValueType > const &rateMatrix, storm::storage::SparseMatrix< ValueType > const &backwardTransitions, std::vector< ValueType > const &exitRateVector, storm::storage::BitVector const &phiStates, storm::storage::BitVector const &psiStates, bool qualitative)
static storm::storage::SparseMatrix< ValueType > computeGeneratorMatrix(storm::storage::SparseMatrix< ValueType > const &rateMatrix, std::vector< ValueType > const &exitRates)
Converts the given rate-matrix into the generator matrix.
static std::vector< ValueType > computeCumulativeRewards(Environment const &env, storm::solver::SolveGoal< ValueType > &&goal, storm::storage::SparseMatrix< ValueType > const &rateMatrix, std::vector< ValueType > const &exitRateVector, RewardModelType const &rewardModel, ValueType timeBound)
static storm::storage::SparseMatrix< ValueType > computeProbabilityMatrix(storm::storage::SparseMatrix< ValueType > const &rateMatrix, std::vector< ValueType > const &exitRates)
Converts the given rate-matrix into a time-abstract probability matrix.
static std::vector< ValueType > computeAllUntilProbabilities(Environment const &env, storm::solver::SolveGoal< ValueType > &&goal, storm::storage::SparseMatrix< ValueType > const &rateMatrix, std::vector< ValueType > const &exitRateVector, storm::storage::BitVector const &initialStates, storm::storage::BitVector const &phiStates, storm::storage::BitVector const &psiStates)
static storm::storage::SparseMatrix< ValueType > computeUniformizedMatrix(storm::storage::SparseMatrix< ValueType > const &rateMatrix, storm::storage::BitVector const &maybeStates, ValueType uniformizationRate, std::vector< ValueType > const &exitRates)
Computes the matrix representing the transitions of the uniformized CTMC.
static std::vector< ValueType > computeTransientProbabilities(Environment const &env, storm::storage::SparseMatrix< ValueType > const &uniformizedMatrix, std::vector< ValueType > const *addVector, ValueType timeBound, ValueType uniformizationRate, std::vector< ValueType > values, ValueType epsilon)
Computes the transient probabilities for lambda time steps.
static std::vector< ValueType > computeAllTransientProbabilities(Environment const &env, storm::storage::SparseMatrix< ValueType > const &rateMatrix, storm::storage::BitVector const &initialStates, storm::storage::BitVector const &phiStates, storm::storage::BitVector const &psiStates, std::vector< ValueType > const &exitRates, ValueType timeBound)
static std::vector< ValueType > computeBoundedUntilProbabilities(Environment const &env, storm::solver::SolveGoal< ValueType > &&goal, storm::storage::SparseMatrix< ValueType > const &rateMatrix, storm::storage::SparseMatrix< ValueType > const &backwardTransitions, storm::storage::BitVector const &phiStates, storm::storage::BitVector const &psiStates, std::vector< ValueType > const &exitRates, bool qualitative, ValueType lowerBound, std::optional< ValueType > const &upperBound)
static std::vector< ValueType > computeReachabilityTimes(Environment const &env, storm::solver::SolveGoal< ValueType > &&goal, storm::storage::SparseMatrix< ValueType > const &rateMatrix, storm::storage::SparseMatrix< ValueType > const &backwardTransitions, std::vector< ValueType > const &exitRateVector, storm::storage::BitVector const &targetStates, bool qualitative)
static bool checkAndUpdateTransientProbabilityEpsilon(storm::Environment const &env, ValueType &epsilon, std::vector< ValueType > const &resultVector, storm::storage::BitVector const &relevantPositions)
Checks whether the given result vector is sufficiently precise, according to the provided epsilon and...
static std::vector< ValueType > computeNextProbabilities(Environment const &env, storm::storage::SparseMatrix< ValueType > const &rateMatrix, std::vector< ValueType > const &exitRateVector, storm::storage::BitVector const &nextStates)
static std::vector< ValueType > computeInstantaneousRewards(Environment const &env, storm::solver::SolveGoal< ValueType > &&goal, storm::storage::SparseMatrix< ValueType > const &rateMatrix, std::vector< ValueType > const &exitRateVector, RewardModelType const &rewardModel, ValueType timeBound)
static std::vector< ValueType > computeTotalRewards(Environment const &env, storm::solver::SolveGoal< ValueType > &&goal, storm::storage::SparseMatrix< ValueType > const &rateMatrix, storm::storage::SparseMatrix< ValueType > const &backwardTransitions, std::vector< ValueType > const &exitRateVector, RewardModelType const &rewardModel, bool qualitative)
A bit vector that is internally represented as a vector of 64-bit values.
Definition BitVector.h:16
A class that holds a possibly non-square matrix in the compressed row storage format.
static const bool SupportsExponential