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) {
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>
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;
84 for (
auto const& e : this->getRewardModels()) {
85 newRewardModels.emplace(e.first, e.second.template toValueType<NewValueType>());
88 auto newLabelToBddMap = this->getLabelToBddMap();
89 newLabelToBddMap.erase(
"init");
90 newLabelToBddMap.erase(
"deadlock");
92 return std::make_shared<StochasticTwoPlayerGame<Type, NewValueType>>(
93 this->getManagerAsSharedPointer(), this->getReachableStates(), this->getInitialStates(), this->getDeadlockStates(),
94 this->getTransitionMatrix().template toValueType<NewValueType>(), this->getRowVariables(), this->getColumnVariables(),
95 this->getRowColumnMetaVariablePairs(), this->getPlayer1Variables(), this->getPlayer2Variables(), this->getNondeterminismVariables(), newLabelToBddMap,
99template<storm::dd::DdType Type,
typename ValueType>
101 return this->getQualitativeTransitionMatrix().existsAbstract(this->getColumnVariables()).getNonZeroCount();
109template std::shared_ptr<StochasticTwoPlayerGame<storm::dd::DdType::Sylvan, double>>