Browse Source

fix exporting POMDPs with rewards & observations

tempestpy_adaptions
Sebastian Junges 5 years ago
parent
commit
c4c680438f
  1. 9
      src/storm/utility/DirectEncodingExporter.cpp

9
src/storm/utility/DirectEncodingExporter.cpp

@ -81,6 +81,11 @@ namespace storm {
writeValue(os, exitRates.at(group), placeholders);
}
if (sparseModel->getType() == storm::models::ModelType::Pomdp) {
os << " {" << sparseModel->template as<storm::models::sparse::Pomdp<ValueType>>()->getObservation(group) << "}";
}
// Write state rewards
bool first = true;
for (auto const& rewardModelEntry : sparseModel->getRewardModels()) {
@ -102,10 +107,6 @@ namespace storm {
os << "]";
}
if (sparseModel->getType() == storm::models::ModelType::Pomdp) {
os << " {" << sparseModel->template as<storm::models::sparse::Pomdp<ValueType>>()->getObservation(group) << "}";
}
// Write labels. Only labels with a whitespace are put in (double) quotation marks.
for (auto const& label : sparseModel->getStateLabeling().getLabelsOfState(group)) {
STORM_LOG_THROW(std::count(label.begin(), label.end(), '\"') == 0, storm::exceptions::NotSupportedException,

Loading…
Cancel
Save