Browse Source

Prism NSG correctly sets player indices of unsynced actions

tempestpy_adaptions
Stefan Pranger 3 years ago
parent
commit
776dd502ac
  1. 7
      src/storm/generator/PrismNextStateGenerator.cpp

7
src/storm/generator/PrismNextStateGenerator.cpp

@ -548,7 +548,6 @@ namespace storm {
// Iterate over all commands.
for (uint_fast64_t j = 0; j < module.getNumberOfCommands(); ++j) {
storm::prism::Command const& command = module.getCommand(j);
// Only consider commands that are not possibly synchronizing.
if (isCommandPotentiallySynchronizing(command)) continue;
@ -615,10 +614,16 @@ namespace storm {
}
if (program.getModelType() == storm::prism::Program::ModelType::SMG) {
if(command.getActionName() != "") {
storm::storage::PlayerIndex const& playerOfAction = actionIndexToPlayerIndexMap.at(command.getActionIndex());
STORM_LOG_THROW(playerOfAction != storm::storage::INVALID_PLAYER_INDEX, storm::exceptions::WrongFormatException, "Command " << command.getActionName() << " is not owned by any player.");
choice.setPlayerIndex(playerOfAction);
} else {
storm::storage::PlayerIndex const& playerOfModule = moduleIndexToPlayerIndexMap.at(i);
STORM_LOG_THROW(playerOfModule != storm::storage::INVALID_PLAYER_INDEX, storm::exceptions::WrongFormatException, "Module " << module.getName() << " is not owned by any player but has at least one enabled, unlabeled command.");
choice.setPlayerIndex(playerOfModule);
}
}
if (this->options.isExplorationChecksSet()) {
// Check that the resulting distribution is in fact a distribution.

Loading…
Cancel
Save