Storm
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
DsMpiUpperRewardBoundsComputer.h
Go to the documentation of this file.
1#pragma once
2
3#include <cstdint>
4#include <vector>
5
6namespace storm {
7namespace storage {
8template<typename ValueType>
9class SparseMatrix;
10}
11
12namespace modelchecker {
13namespace helper {
14
15template<typename ValueType>
16class DsMpiDtmcPriorityLess;
17
18template<typename ValueType>
20 public:
30 std::vector<ValueType> const& oneStepTargetProbabilities);
31
33
37 std::vector<ValueType> computeUpperBounds();
38
39 protected:
43 virtual void sweep();
44
48 virtual ValueType computeLambda() const;
49
53 ValueType computeLambdaForChoice(uint64_t choice) const;
54
58 virtual uint64_t getStateForChoice(uint64_t choice) const;
59
60 // References to input data.
62 std::vector<ValueType> const& originalRewards;
63 std::vector<ValueType> const& originalOneStepTargetProbabilities;
64
65 // Derived from input data.
67
68 // Data that the algorithm uses internally.
69 std::vector<ValueType> p;
70 std::vector<ValueType> w;
71 std::vector<ValueType> rewards;
72 std::vector<ValueType> targetProbabilities;
73
74 friend class DsMpiDtmcPriorityLess<ValueType>;
75};
76
77template<typename ValueType>
79
80template<typename ValueType>
82 public:
92 std::vector<ValueType> const& oneStepTargetProbabilities);
93
94 private:
95 virtual void sweep() override;
96 virtual ValueType computeLambda() const override;
97 virtual uint64_t getStateForChoice(uint64_t choice) const override;
98 uint64_t getChoiceInState(uint64_t state) const;
99 void setChoiceInState(uint64_t state, uint64_t choice);
100
101 std::vector<uint64_t> choiceToState;
102 std::vector<uint64_t> policy;
103
104 friend class DsMpiMdpPriorityLess<ValueType>;
105};
106} // namespace helper
107} // namespace modelchecker
108} // namespace storm
virtual ValueType computeLambda() const
Computes the lambda used for the estimation.
ValueType computeLambdaForChoice(uint64_t choice) const
Computes the lambda just for the provided choice.
std::vector< ValueType > computeUpperBounds()
Computes upper bounds on the expected rewards.
virtual uint64_t getStateForChoice(uint64_t choice) const
Retrieves the state associated with the given choice.
A class that holds a possibly non-square matrix in the compressed row storage format.
LabParser.cpp.
Definition cli.cpp:18