Storm
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
MarkovAutomaton.h
Go to the documentation of this file.
1#ifndef STORM_MODELS_SPARSE_MARKOVAUTOMATON_H_
2#define STORM_MODELS_SPARSE_MARKOVAUTOMATON_H_
3
7
8namespace storm {
9namespace models {
10namespace sparse {
11
15template<class ValueType, typename RewardModelType = StandardRewardModel<ValueType>>
16class MarkovAutomaton : public NondeterministicModel<ValueType, RewardModelType> {
17 public:
31 storm::storage::BitVector const& markovianStates,
32 std::unordered_map<std::string, RewardModelType> const& rewardModels = std::unordered_map<std::string, RewardModelType>());
33
47 storm::storage::BitVector&& markovianStates,
48 std::unordered_map<std::string, RewardModelType>&& rewardModels = std::unordered_map<std::string, RewardModelType>());
49
57
60
63
69 bool isClosed() const;
70
77 bool containsZenoCycle() const;
78
86
94
102
108 std::vector<ValueType> const& getExitRates() const;
109
115 std::vector<ValueType>& getExitRates();
116
124
131
138
142 void close();
143
147 bool isConvertibleToCtmc() const;
148
149 bool hasOnlyTrivialNondeterminism() const;
150
156 std::shared_ptr<storm::models::sparse::Ctmc<ValueType, RewardModelType>> convertToCtmc() const;
157
158 virtual void printModelInformationToStream(std::ostream& out) const override;
159
160 private:
167 void turnRatesToProbabilities();
168
172 bool checkIsClosed() const;
173
179 bool checkContainsZenoCycle() const;
180
181 // A bit vector representing the set of Markovian states.
182 storm::storage::BitVector markovianStates;
183
184 // A vector storing the exit rates of all states of the model.
185 std::vector<ValueType> exitRates;
186
187 // A flag indicating whether the Markov automaton has been closed, which is typically a prerequisite for model checking.
188 bool closed;
189
190 // A flag indicating whether the Markov automaton contains Zeno cycles.
191 mutable boost::optional<bool> hasZenoCycle;
192};
193
194} // namespace sparse
195} // namespace models
196} // namespace storm
197
198#endif /* STORM_MODELS_SPARSE_MARKOVAUTOMATON_H_ */
This class represents a Markov automaton.
void close()
Closes the Markov automaton.
bool containsZenoCycle() const
Retrieves whether the Markov automaton contains Zeno cycles.
bool isClosed() const
Retrieves whether the Markov automaton is closed.
std::shared_ptr< storm::models::sparse::Ctmc< ValueType, RewardModelType > > convertToCtmc() const
Convert the MA to a CTMC.
MarkovAutomaton & operator=(MarkovAutomaton< ValueType, RewardModelType > &&other)=default
bool isProbabilisticState(storm::storage::sparse::state_type state) const
Retrieves whether the given state is a probabilistic state.
MarkovAutomaton & operator=(MarkovAutomaton< ValueType, RewardModelType > const &other)=default
bool isMarkovianState(storm::storage::sparse::state_type state) const
Retrieves whether the given state is a Markovian state.
bool isConvertibleToCtmc() const
Determines whether the Markov automaton can be converted to a CTMC without changing any measures.
virtual void printModelInformationToStream(std::ostream &out) const override
Prints information about the model to the specified stream.
std::vector< ValueType > const & getExitRates() const
Retrieves the vector representing the exit rates of the states.
storm::storage::BitVector const & getMarkovianStates() const
Retrieves the set of Markovian states of the model.
ValueType const & getExitRate(storm::storage::sparse::state_type state) const
Retrieves the exit rate of the given state.
ValueType getMaximalExitRate() const
Retrieves the maximal exit rate over all states of the model.
MarkovAutomaton(MarkovAutomaton< ValueType, RewardModelType > const &other)=default
MarkovAutomaton(MarkovAutomaton< ValueType, RewardModelType > &&other)=default
bool isHybridState(storm::storage::sparse::state_type state) const
Retrieves whether the given state is a hybrid state, i.e.
The base class of sparse nondeterministic models.
This class manages the labeling of the state space with a number of (atomic) labels.
A bit vector that is internally represented as a vector of 64-bit values.
Definition BitVector.h:18
A class that holds a possibly non-square matrix in the compressed row storage format.
LabParser.cpp.
Definition cli.cpp:18