Browse Source

Fixed export in DRN format: parameters could occur multiple times

tempestpy_adaptions
Matthias Volk 5 years ago
parent
commit
729dda163d
  1. 8
      src/storm/utility/DirectEncodingExporter.cpp

8
src/storm/utility/DirectEncodingExporter.cpp

@ -180,13 +180,9 @@ namespace storm {
std::vector<std::string> getParameters(std::shared_ptr<storm::models::sparse::Model<storm::RationalFunction>> sparseModel) { std::vector<std::string> getParameters(std::shared_ptr<storm::models::sparse::Model<storm::RationalFunction>> sparseModel) {
std::vector<std::string> parameters; std::vector<std::string> parameters;
std::set<storm::RationalFunctionVariable> parametersProb = storm::models::sparse::getProbabilityParameters(*sparseModel); std::set<storm::RationalFunctionVariable> parametersProb = storm::models::sparse::getProbabilityParameters(*sparseModel);
for (auto const& parameter : parametersProb) {
std::stringstream stream;
stream << parameter;
parameters.push_back(stream.str());
}
std::set<storm::RationalFunctionVariable> parametersReward = storm::models::sparse::getRewardParameters(*sparseModel); std::set<storm::RationalFunctionVariable> parametersReward = storm::models::sparse::getRewardParameters(*sparseModel);
for (auto const& parameter : parametersReward) {
parametersProb.insert(parametersReward.begin(), parametersReward.end());
for (auto const& parameter : parametersProb) {
std::stringstream stream; std::stringstream stream;
stream << parameter; stream << parameter;
parameters.push_back(stream.str()); parameters.push_back(stream.str());

Loading…
Cancel
Save