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
11
13
15
16namespace storm {
17
18class Environment;
19
20namespace modelchecker::helper {
22 public:
23 template<typename ValueType>
25 static std::vector<ValueType> computeBoundedUntilProbabilities(Environment const& env, storm::solver::SolveGoal<ValueType>&& goal,
27 storm::storage::SparseMatrix<ValueType> const& backwardTransitions,
28 storm::storage::BitVector const& phiStates, storm::storage::BitVector const& psiStates,
29 std::vector<ValueType> const& exitRates, bool qualitative, ValueType lowerBound,
30 std::optional<ValueType> const& upperBound);
31
32 template<typename ValueType>
33 static std::vector<ValueType> computeUntilProbabilities(Environment const& env, storm::solver::SolveGoal<ValueType>&& goal,
35 storm::storage::SparseMatrix<ValueType> const& backwardTransitions,
36 std::vector<ValueType> const& exitRateVector, storm::storage::BitVector const& phiStates,
37 storm::storage::BitVector const& psiStates, bool qualitative);
38
39 template<typename ValueType>
40 static std::vector<ValueType> computeAllUntilProbabilities(Environment const& env, storm::solver::SolveGoal<ValueType>&& goal,
42 std::vector<ValueType> const& exitRateVector, storm::storage::BitVector const& initialStates,
43 storm::storage::BitVector const& phiStates, storm::storage::BitVector const& psiStates);
44
45 template<typename ValueType>
46 static std::vector<ValueType> computeNextProbabilities(Environment const& env, storm::storage::SparseMatrix<ValueType> const& rateMatrix,
47 std::vector<ValueType> const& exitRateVector, storm::storage::BitVector const& nextStates);
48
49 template<typename ValueType, typename RewardModelType>
51 static std::vector<ValueType> computeInstantaneousRewards(Environment const& env, storm::solver::SolveGoal<ValueType>&& goal,
53 std::vector<ValueType> const& exitRateVector, RewardModelType const& rewardModel,
54 ValueType timeBound);
55
56 template<typename ValueType, typename RewardModelType>
58 static std::vector<ValueType> computeCumulativeRewards(Environment const& env, storm::solver::SolveGoal<ValueType>&& goal,
60 std::vector<ValueType> const& exitRateVector, RewardModelType const& rewardModel,
61 ValueType timeBound);
62
63 template<typename ValueType, typename RewardModelType>
64 static std::vector<storm::utility::ExtendedValueType<ValueType>> computeReachabilityRewards(
66 storm::storage::SparseMatrix<ValueType> const& backwardTransitions, 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<storm::utility::ExtendedValueType<ValueType>> computeTotalRewards(Environment const& env, storm::solver::SolveGoal<ValueType>&& goal,
72 storm::storage::SparseMatrix<ValueType> const& backwardTransitions,
73 std::vector<ValueType> const& exitRateVector,
74 RewardModelType const& rewardModel, bool qualitative);
75
76 template<typename ValueType>
77 static std::vector<storm::utility::ExtendedValueType<ValueType>> computeReachabilityTimes(
79 storm::storage::SparseMatrix<ValueType> const& backwardTransitions, std::vector<ValueType> const& exitRateVector,
80 storm::storage::BitVector const& targetStates, 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 > 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< storm::utility::ExtendedValueType< 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 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< storm::utility::ExtendedValueType< 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 > 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 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< storm::utility::ExtendedValueType< 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)
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)
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