|
|
@ -12,24 +12,25 @@ namespace storm { |
|
|
|
|
|
|
|
template<storm::dd::DdType Type, typename ValueType> |
|
|
|
StochasticTwoPlayerGame<Type, ValueType>::StochasticTwoPlayerGame(std::shared_ptr<storm::dd::DdManager<Type>> manager, |
|
|
|
storm::dd::Bdd<Type> reachableStates, |
|
|
|
storm::dd::Bdd<Type> initialStates, |
|
|
|
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::shared_ptr<storm::adapters::AddExpressionAdapter<Type, ValueType>> columnExpressionAdapter, |
|
|
|
std::vector<std::pair<storm::expressions::Variable, storm::expressions::Variable>> const& rowColumnMetaVariablePairs, |
|
|
|
std::set<storm::expressions::Variable> const& player1Variables, |
|
|
|
std::set<storm::expressions::Variable> const& player2Variables, |
|
|
|
std::set<storm::expressions::Variable> const& nondeterminismVariables, |
|
|
|
std::map<std::string, storm::expressions::Expression> labelToExpressionMap, |
|
|
|
std::unordered_map<std::string, RewardModelType> const& rewardModels) |
|
|
|
: NondeterministicModel<Type, ValueType>(storm::models::ModelType::S2pg, manager, reachableStates, initialStates, transitionMatrix, rowVariables, rowExpressionAdapter, columnVariables, columnExpressionAdapter, rowColumnMetaVariablePairs, nondeterminismVariables, labelToExpressionMap, rewardModels), player1Variables(player1Variables), player2Variables(player2Variables) { |
|
|
|
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::shared_ptr<storm::adapters::AddExpressionAdapter<Type, ValueType>> columnExpressionAdapter, |
|
|
|
std::vector<std::pair<storm::expressions::Variable, storm::expressions::Variable>> const& rowColumnMetaVariablePairs, |
|
|
|
std::set<storm::expressions::Variable> const& player1Variables, |
|
|
|
std::set<storm::expressions::Variable> const& player2Variables, |
|
|
|
std::set<storm::expressions::Variable> const& nondeterminismVariables, |
|
|
|
std::map<std::string, storm::expressions::Expression> labelToExpressionMap, |
|
|
|
std::unordered_map<std::string, RewardModelType> const& rewardModels) |
|
|
|
: NondeterministicModel<Type, ValueType>(storm::models::ModelType::S2pg, manager, reachableStates, initialStates, deadlockStates, transitionMatrix, rowVariables, rowExpressionAdapter, columnVariables, columnExpressionAdapter, rowColumnMetaVariablePairs, nondeterminismVariables, labelToExpressionMap, rewardModels), player1Variables(player1Variables), player2Variables(player2Variables) { |
|
|
|
|
|
|
|
// Compute legal player 1 mask.
|
|
|
|
illegalPlayer1Mask = transitionMatrix.notZero().existsAbstract(this->getColumnVariables()).existsAbstract(this->getPlayer2Variables()); |
|
|
|
|
|
|
|
|
|
|
|
// Correct the mask for player 2. This is necessary, because it is not yet restricted to the legal choices of player 1.
|
|
|
|
this->illegalMask &= illegalPlayer1Mask; |
|
|
|
|
|
|
|