13template<storm::dd::DdType Type,
typename ValueType>
18 std::set<storm::expressions::Variable>
const& columnVariables,
19 std::vector<std::pair<storm::expressions::Variable, storm::expressions::Variable>>
const& rowColumnMetaVariablePairs,
20 std::set<storm::expressions::Variable>
const& nondeterminismVariables, std::map<std::string, storm::expressions::Expression> labelToExpressionMap,
21 std::unordered_map<std::string, RewardModelType>
const& rewardModels)
22 :
Model<Type,
ValueType>(modelType, manager, reachableStates, initialStates, deadlockStates, transitionMatrix, rowVariables, rowExpressionAdapter,
23 columnVariables, rowColumnMetaVariablePairs, labelToExpressionMap, rewardModels),
24 nondeterminismVariables(nondeterminismVariables) {
28template<storm::dd::DdType Type,
typename ValueType>
32 std::set<storm::expressions::Variable>
const& rowVariables, std::set<storm::expressions::Variable>
const& columnVariables,
33 std::vector<std::pair<storm::expressions::Variable, storm::expressions::Variable>>
const& rowColumnMetaVariablePairs,
34 std::set<storm::expressions::Variable>
const& nondeterminismVariables, std::map<std::string,
storm::dd::Bdd<Type>> labelToBddMap,
35 std::unordered_map<std::string, RewardModelType>
const& rewardModels)
36 :
Model<Type,
ValueType>(modelType, manager, reachableStates, initialStates, deadlockStates, transitionMatrix, rowVariables, columnVariables,
37 rowColumnMetaVariablePairs, labelToBddMap, rewardModels),
38 nondeterminismVariables(nondeterminismVariables) {
42template<storm::dd::DdType Type,
typename ValueType>
44 std::set<storm::expressions::Variable> rowAndNondeterminismVariables;
45 std::set_union(this->getNondeterminismVariables().begin(), this->getNondeterminismVariables().end(), this->getRowVariables().begin(),
46 this->getRowVariables().end(), std::inserter(rowAndNondeterminismVariables, rowAndNondeterminismVariables.begin()));
50 .existsAbstract(this->getColumnVariables())
51 .template toAdd<uint_fast64_t>()
52 .sumAbstract(rowAndNondeterminismVariables);
56template<storm::dd::DdType Type,
typename ValueType>
58 return nondeterminismVariables;
61template<storm::dd::DdType Type,
typename ValueType>
66template<storm::dd::DdType Type,
typename ValueType>
69 return !transitionMatrixBdd && transitionMatrixBdd.
existsAbstract(this->getColumnVariables());
72template<storm::dd::DdType Type,
typename ValueType>
74 this->printModelInformationHeaderToStream(out);
75 out <<
"Choices: \t" << this->getNumberOfChoices() <<
'\n';
76 this->printModelInformationFooterToStream(out);
79template<storm::dd::DdType Type,
typename ValueType>
81 uint_fast64_t nondeterminismVariableCount = 0;
82 for (
auto const& metaVariable : this->getNondeterminismVariables()) {
83 nondeterminismVariableCount += this->getManager().getMetaVariable(metaVariable).getNumberOfDdVariables();
86 out <<
", nondeterminism: " << this->getNondeterminismVariables().size() <<
" meta variables (" << nondeterminismVariableCount <<
" DD variables)";
89template<storm::dd::DdType Type,
typename ValueType>
91 for (
auto& rewardModel : this->getRewardModels()) {
92 rewardModel.second.reduceToStateBasedRewards(this->getTransitionMatrix(), this->getRowVariables(), this->getColumnVariables(),
false);
96template<storm::dd::DdType Type,
typename ValueType>
99 illegalMask = !(this->getTransitionMatrix().notZero().existsAbstract(this->getColumnVariables())) && this->getReachableStates();
102template<storm::dd::DdType Type,
typename ValueType>
104 if (!keepNondeterminism) {
105 return this->getTransitionMatrix().notZero().
existsAbstract(this->getNondeterminismVariables());
ValueType getValue(std::map< storm::expressions::Variable, int_fast64_t > const &metaVariableToValueMap=std::map< storm::expressions::Variable, int_fast64_t >()) const
Retrieves the value of the function when all meta variables are assigned the values of the given mapp...
Bdd< LibraryType > notZero() const
Computes a BDD that represents the function in which all assignments with a function value unequal to...
Bdd< LibraryType > existsAbstract(std::set< storm::expressions::Variable > const &metaVariables) const
Existentially abstracts from the given meta variables.
Base class for all symbolic models.
virtual void printDdVariableInformationToStream(std::ostream &out) const
Prints information about the DD variables to the specified stream.
virtual storm::dd::Bdd< Type > getQualitativeTransitionMatrix(bool keepNondeterminism=true) const
Retrieves the matrix qualitatively (i.e.
Base class for all nondeterministic symbolic models.
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.
virtual void printModelInformationToStream(std::ostream &out) const override
Prints information about the model to the specified stream.
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.
virtual void reduceToStateBasedRewards() override
Converts the transition rewards of all reward models to state-based rewards.
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.