Browse Source

fixed case where no location variables were provided

tempestpy_adaptions
TimQu 6 years ago
parent
commit
31efde52c2
  1. 4
      src/storm-conv/settings/modules/JaniExportSettings.cpp

4
src/storm-conv/settings/modules/JaniExportSettings.cpp

@ -39,16 +39,18 @@ namespace storm {
}
std::vector<std::pair<std::string, std::string>> JaniExportSettings::getLocationVariables() const {
std::vector<std::pair<std::string, std::string>> result;
if (isLocationVariablesSet()) {
std::string argument = this->getOption(locationVariablesOptionName).getArgumentByName("variables").getValueAsString();
std::vector<std::string> arguments;
boost::split( arguments, argument, boost::is_any_of(","));
std::vector<std::pair<std::string, std::string>> result;
for (auto const& pair : arguments) {
std::vector<std::string> keyvaluepair;
boost::split( keyvaluepair, pair, boost::is_any_of("."));
STORM_LOG_THROW(keyvaluepair.size() == 2, storm::exceptions::IllegalArgumentException, "Expected a name of the form AUTOMATON.VARIABLE (with no further dots) but got " << pair);
result.emplace_back(keyvaluepair.at(0), keyvaluepair.at(1));
}
}
return result;
}

Loading…
Cancel
Save