Storm 1.13.0.1
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
NondeterministicModel.h
Go to the documentation of this file.
1#pragma once
2
4
5namespace storm {
6namespace models {
7namespace symbolic {
8
12template<storm::dd::DdType Type, typename ValueType = double>
13class NondeterministicModel : public Model<Type, ValueType> {
14 public:
16
19
22
41 NondeterministicModel(storm::models::ModelType const& modelType, std::shared_ptr<storm::dd::DdManager<Type>> manager, storm::dd::Bdd<Type> reachableStates,
43 std::set<storm::expressions::Variable> const& rowVariables,
44 std::shared_ptr<storm::adapters::AddExpressionAdapter<Type, ValueType>> rowExpressionAdapter,
45 std::set<storm::expressions::Variable> const& columnVariables,
46 std::vector<std::pair<storm::expressions::Variable, storm::expressions::Variable>> const& rowColumnMetaVariablePairs,
47 std::set<storm::expressions::Variable> const& nondeterminismVariables,
48 std::map<std::string, storm::expressions::Expression> labelToExpressionMap = std::map<std::string, storm::expressions::Expression>(),
49 std::unordered_map<std::string, RewardModelType> const& rewardModels = std::unordered_map<std::string, RewardModelType>());
50
67 NondeterministicModel(storm::models::ModelType const& modelType, std::shared_ptr<storm::dd::DdManager<Type>> manager, storm::dd::Bdd<Type> reachableStates,
69 std::set<storm::expressions::Variable> const& rowVariables, std::set<storm::expressions::Variable> const& columnVariables,
70 std::vector<std::pair<storm::expressions::Variable, storm::expressions::Variable>> const& rowColumnMetaVariablePairs,
71 std::set<storm::expressions::Variable> const& nondeterminismVariables,
72 std::map<std::string, storm::dd::Bdd<Type>> labelToBddMap = std::map<std::string, storm::dd::Bdd<Type>>(),
73 std::unordered_map<std::string, RewardModelType> const& rewardModels = std::unordered_map<std::string, RewardModelType>());
74
80 virtual uint_fast64_t getNumberOfChoices() const override;
81
87 virtual std::set<storm::expressions::Variable> const& getNondeterminismVariables() const override;
88
95
102
110 virtual storm::dd::Bdd<Type> getQualitativeTransitionMatrix(bool keepNondeterminism = true) const override;
111
112 virtual void printModelInformationToStream(std::ostream& out) const override;
113
114 virtual void reduceToStateBasedRewards() override;
115
116 protected:
117 virtual void printDdVariableInformationToStream(std::ostream& out) const override;
118
119 // A mask that characterizes all illegal nondeterministic choices.
121
122 private:
123 void createIllegalMask();
124
125 // The meta variables encoding the nondeterminism in the model.
126 std::set<storm::expressions::Variable> nondeterminismVariables;
127};
128
129} // namespace symbolic
130} // namespace models
131} // namespace storm
Model(Model< Type, ValueType > const &other)=default
storm::dd::Add< Type, ValueType > transitionMatrix
Definition Model.h:393
StandardRewardModel< Type, ValueType > RewardModelType
Definition Model.h:47
NondeterministicModel(NondeterministicModel< Type, ValueType > &&other)=default
virtual uint_fast64_t getNumberOfChoices() const override
Retrieves the number of nondeterministic choices in the model.
virtual std::set< storm::expressions::Variable > const & getNondeterminismVariables() const override
Retrieves the meta variables used to encode the nondeterminism in the model.
NondeterministicModel(storm::models::ModelType const &modelType, std::shared_ptr< storm::dd::DdManager< Type > > manager, storm::dd::Bdd< Type > reachableStates, storm::dd::Bdd< Type > initialStates, storm::dd::Bdd< Type > deadlockStates, storm::dd::Add< Type, ValueType > transitionMatrix, std::set< storm::expressions::Variable > const &rowVariables, std::set< storm::expressions::Variable > const &columnVariables, std::vector< std::pair< storm::expressions::Variable, storm::expressions::Variable > > const &rowColumnMetaVariablePairs, std::set< storm::expressions::Variable > const &nondeterminismVariables, std::map< std::string, storm::dd::Bdd< Type > > labelToBddMap=std::map< std::string, storm::dd::Bdd< Type > >(), std::unordered_map< std::string, RewardModelType > const &rewardModels=std::unordered_map< std::string, RewardModelType >())
Constructs a model from the given data.
virtual void printModelInformationToStream(std::ostream &out) const override
Prints information about the model to the specified stream.
Model< Type, ValueType >::RewardModelType RewardModelType
storm::dd::Bdd< Type > const & getIllegalMask() const
Retrieves a BDD characterizing all illegal nondeterminism encodings in the model.
storm::dd::Bdd< Type > getIllegalSuccessorMask() const
Retrieves a BDD characterizing the illegal successors for each choice.
NondeterministicModel & operator=(NondeterministicModel< Type, ValueType > const &other)=default
NondeterministicModel & operator=(NondeterministicModel< Type, ValueType > &&other)=default
virtual void reduceToStateBasedRewards() override
Converts the transition rewards of all reward models to state-based rewards.
NondeterministicModel(storm::models::ModelType const &modelType, std::shared_ptr< storm::dd::DdManager< Type > > manager, storm::dd::Bdd< Type > reachableStates, storm::dd::Bdd< Type > initialStates, storm::dd::Bdd< Type > deadlockStates, storm::dd::Add< Type, ValueType > transitionMatrix, std::set< storm::expressions::Variable > const &rowVariables, std::shared_ptr< storm::adapters::AddExpressionAdapter< Type, ValueType > > rowExpressionAdapter, std::set< storm::expressions::Variable > const &columnVariables, std::vector< std::pair< storm::expressions::Variable, storm::expressions::Variable > > const &rowColumnMetaVariablePairs, std::set< storm::expressions::Variable > const &nondeterminismVariables, std::map< std::string, storm::expressions::Expression > labelToExpressionMap=std::map< std::string, storm::expressions::Expression >(), std::unordered_map< std::string, RewardModelType > const &rewardModels=std::unordered_map< std::string, RewardModelType >())
Constructs a model from the given data.
virtual void printDdVariableInformationToStream(std::ostream &out) const override
Prints information about the DD variables to the specified stream.
NondeterministicModel(NondeterministicModel< Type, ValueType > const &other)=default
virtual storm::dd::Bdd< Type > getQualitativeTransitionMatrix(bool keepNondeterminism=true) const override
Retrieves the matrix qualitatively (i.e.