13template<storm::dd::DdType Type,
typename ValueType>
18 std::vector<std::pair<storm::expressions::Variable, storm::expressions::Variable>>
const& rowColumnMetaVariablePairs,
19 std::set<storm::expressions::Variable>
const& player1Variables, std::set<storm::expressions::Variable>
const& player2Variables,
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)
23 rowVariables, rowExpressionAdapter, columnVariables, rowColumnMetaVariablePairs, nondeterminismVariables,
24 labelToExpressionMap, rewardModels),
25 player1Variables(player1Variables),
26 player2Variables(player2Variables) {
30template<storm::dd::DdType Type,
typename ValueType>
34 std::set<storm::expressions::Variable>
const& columnVariables,
35 std::vector<std::pair<storm::expressions::Variable, storm::expressions::Variable>>
const& rowColumnMetaVariablePairs,
36 std::set<storm::expressions::Variable>
const& player1Variables, std::set<storm::expressions::Variable>
const& player2Variables,
37 std::set<storm::expressions::Variable>
const& nondeterminismVariables, std::map<std::string,
storm::dd::Bdd<Type>> labelToBddMap,
38 std::unordered_map<std::string, RewardModelType>
const& rewardModels)
40 rowVariables, columnVariables, rowColumnMetaVariablePairs, nondeterminismVariables, labelToBddMap, rewardModels),
41 player1Variables(player1Variables),
42 player2Variables(player2Variables) {
46template<storm::dd::DdType Type,
typename ValueType>
47void StochasticTwoPlayerGame<Type, ValueType>::createIllegalMasks() {
49 this->illegalPlayer1Mask = this->getTransitionMatrix().notZero().existsAbstract(this->getColumnVariables()).existsAbstract(this->getPlayer2Variables());
52 illegalPlayer2Mask = this->getIllegalMask() && this->illegalPlayer1Mask;
55 this->illegalPlayer1Mask = !illegalPlayer1Mask && this->getReachableStates();
58template<storm::dd::DdType Type,
typename ValueType>
60 return illegalPlayer1Mask;
63template<storm::dd::DdType Type,
typename ValueType>
65 return illegalPlayer2Mask;
68template<storm::dd::DdType Type,
typename ValueType>
70 return player1Variables;
73template<storm::dd::DdType Type,
typename ValueType>
75 return player2Variables;
78template<storm::dd::DdType Type,
typename ValueType>
79template<
typename NewValueType>
82 std::unordered_map<std::string, NewRewardModelType> newRewardModels;
88 auto newLabelToBddMap = this->getLabelToBddMap();
89 newLabelToBddMap.erase(
"init");
90 newLabelToBddMap.erase(
"deadlock");
92 return std::make_shared<StochasticTwoPlayerGame<Type, NewValueType>>(
99template<storm::dd::DdType Type,
typename ValueType>
109template std::shared_ptr<StochasticTwoPlayerGame<storm::dd::DdType::Sylvan, double>>
Bdd< LibraryType > existsAbstract(std::set< storm::expressions::Variable > const &metaVariables) const
Existentially abstracts from the given meta variables.
storm::dd::Add< Type, ValueType > const & getTransitionMatrix() const
storm::dd::Bdd< Type > const & getDeadlockStates() const
std::set< storm::expressions::Variable > const & getColumnVariables() const
std::shared_ptr< storm::dd::DdManager< Type > > const & getManagerAsSharedPointer() const
storm::dd::Bdd< Type > const & getInitialStates() const
storm::dd::Add< Type, ValueType > transitionMatrix
std::vector< std::pair< storm::expressions::Variable, storm::expressions::Variable > > const & getRowColumnMetaVariablePairs() const
std::set< storm::expressions::Variable > const & getRowVariables() const
std::unordered_map< std::string, RewardModelType > & getRewardModels()
storm::dd::Bdd< Type > const & getReachableStates() const
virtual std::set< storm::expressions::Variable > const & getNondeterminismVariables() const override
Model< Type, ValueType >::RewardModelType RewardModelType
NondeterministicModel(NondeterministicModel< Type, double > const &other)=default
std::shared_ptr< StochasticTwoPlayerGame< Type, NewValueType > > toValueType() const
std::set< storm::expressions::Variable > const & getPlayer1Variables() const
Retrieeves the set of meta variables used to encode the nondeterministic choices of player 1.
std::set< storm::expressions::Variable > const & getPlayer2Variables() const
Retrieeves the set of meta variables used to encode the nondeterministic choices of player 2.
storm::dd::Bdd< Type > getIllegalPlayer1Mask() const
Retrieves a BDD characterizing all illegal player 1 choice encodings in the model.
uint64_t getNumberOfPlayer2States() const
Retrieves the number of player 2 states in the game.
storm::dd::Bdd< Type > getIllegalPlayer2Mask() const
Retrieves a BDD characterizing all illegal player 2 choice encodings in the model.
StochasticTwoPlayerGame(StochasticTwoPlayerGame< Type, ValueType > const &other)=default
storm::dd::Bdd< Type > Model< Type, ValueType >::getQualitativeTransitionMatrix(bool) const