Storm
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
NondeterministicModel.h
Go to the documentation of this file.
1#ifndef STORM_MODELS_SPARSE_NONDETERMINISTICMODEL_H_
2#define STORM_MODELS_SPARSE_NONDETERMINISTICMODEL_H_
3
6
7namespace storm {
8
9// Forward declare Scheduler class.
10namespace storage {
11template<typename ValueType>
12class Scheduler;
13}
14
15namespace models {
16namespace sparse {
17
21template<class ValueType, typename RewardModelType = StandardRewardModel<ValueType>>
22class NondeterministicModel : public Model<ValueType, RewardModelType> {
23 public:
32
33 virtual ~NondeterministicModel() = default;
34
40 std::vector<uint_fast64_t> const& getNondeterministicChoiceIndices() const;
41
43
49 uint_fast64_t getNumberOfChoices(uint_fast64_t state) const;
50
51 virtual void reduceToStateBasedRewards() override;
52
56 uint_fast64_t getChoiceIndex(storm::storage::StateActionPair const& stateactPair) const;
64 std::shared_ptr<storm::models::sparse::Model<ValueType, RewardModelType>> applyScheduler(storm::storage::Scheduler<ValueType> const& scheduler,
65 bool dropUnreachableStates = true,
66 bool preserveModelType = false) const;
67
68 virtual void printModelInformationToStream(std::ostream& out) const override;
69
70 virtual void writeDotToStream(std::ostream& outStream, size_t maxWidthLabel = 30, bool includeLabeling = true,
71 storm::storage::BitVector const* subsystem = nullptr, std::vector<ValueType> const* firstValue = nullptr,
72 std::vector<ValueType> const* secondValue = nullptr, std::vector<uint_fast64_t> const* stateColoring = nullptr,
73 std::vector<std::string> const* colors = nullptr, std::vector<uint_fast64_t>* scheduler = nullptr,
74 bool finalizeOutput = true) const override;
75};
76
77} // namespace sparse
78} // namespace models
79} // namespace storm
80
81#endif /* STORM_MODELS_SPARSE_NONDETERMINISTICMODEL_H_ */
Base class for all sparse models.
Definition Model.h:33
virtual uint_fast64_t getNumberOfChoices() const override
Returns the number of choices ine the model.
Definition Model.cpp:172
CRewardModelType RewardModelType
Definition Model.h:36
The base class of sparse nondeterministic models.
std::vector< uint_fast64_t > const & getNondeterministicChoiceIndices() const
Retrieves the vector indicating which matrix rows represent non-deterministic choices of a certain st...
virtual void printModelInformationToStream(std::ostream &out) const override
Prints information about the model to the specified stream.
std::shared_ptr< storm::models::sparse::Model< ValueType, RewardModelType > > applyScheduler(storm::storage::Scheduler< ValueType > const &scheduler, bool dropUnreachableStates=true, bool preserveModelType=false) const
Applies the given scheduler to this model.
virtual void reduceToStateBasedRewards() override
Converts the transition rewards of all reward models to state-based rewards.
virtual void writeDotToStream(std::ostream &outStream, size_t maxWidthLabel=30, bool includeLabeling=true, storm::storage::BitVector const *subsystem=nullptr, std::vector< ValueType > const *firstValue=nullptr, std::vector< ValueType > const *secondValue=nullptr, std::vector< uint_fast64_t > const *stateColoring=nullptr, std::vector< std::string > const *colors=nullptr, std::vector< uint_fast64_t > *scheduler=nullptr, bool finalizeOutput=true) const override
uint_fast64_t getChoiceIndex(storm::storage::StateActionPair const &stateactPair) const
For a state/action pair, get the choice index referring to the state-action pair.
A bit vector that is internally represented as a vector of 64-bit values.
Definition BitVector.h:18
This class defines which action is chosen in a particular state of a non-deterministic model.
Definition Scheduler.h:18
LabParser.cpp.
Definition cli.cpp:18