Storm 1.11.1.1
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
NondeterministicModel.h
Go to the documentation of this file.
1#pragma once
2
5
6namespace storm {
7
8// Forward declare Scheduler class.
9namespace storage {
10template<typename ValueType>
11class Scheduler;
12}
13
14namespace models {
15namespace sparse {
16
20template<class ValueType, typename RewardModelType = StandardRewardModel<ValueType>>
21class NondeterministicModel : public Model<ValueType, RewardModelType> {
22 public:
31
32 virtual ~NondeterministicModel() = default;
33
39 std::vector<uint_fast64_t> const& getNondeterministicChoiceIndices() const;
40
42
48 uint_fast64_t getNumberOfChoices(uint_fast64_t state) const;
49
50 virtual void reduceToStateBasedRewards() override;
51
55 uint_fast64_t getChoiceIndex(storm::storage::StateActionPair const& stateactPair) const;
63 std::shared_ptr<storm::models::sparse::Model<ValueType, RewardModelType>> applyScheduler(storm::storage::Scheduler<ValueType> const& scheduler,
64 bool dropUnreachableStates = true,
65 bool preserveModelType = false) const;
66
67 virtual void printModelInformationToStream(std::ostream& out) const override;
68
69 virtual void writeDotToStream(std::ostream& outStream, size_t maxWidthLabel = 30, bool includeLabeling = true,
70 storm::storage::BitVector const* subsystem = nullptr, std::vector<ValueType> const* firstValue = nullptr,
71 std::vector<ValueType> const* secondValue = nullptr, std::vector<uint_fast64_t> const* stateColoring = nullptr,
72 std::vector<std::string> const* colors = nullptr, std::vector<uint_fast64_t>* scheduler = nullptr,
73 bool finalizeOutput = true) const override;
74};
75
76} // namespace sparse
77} // namespace models
78} // namespace storm
Base class for all sparse models.
Definition Model.h:32
virtual uint_fast64_t getNumberOfChoices() const override
Returns the number of choices ine the model.
Definition Model.cpp:172
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:16
This class defines which action is chosen in a particular state of a non-deterministic model.
Definition Scheduler.h:18