Browse Source

prettified post/pre scheduler json export

tempestpy_adaptions
Thomas Knoll 1 year ago
parent
commit
43f8511678
  1. 2
      src/storm/storage/PostScheduler.cpp
  2. 5
      src/storm/storage/PreScheduler.cpp

2
src/storm/storage/PostScheduler.cpp

@ -160,7 +160,7 @@ namespace storm {
auto choiceOriginCorrectionJson = model->getChoiceOrigins()->getChoiceAsJson(globalChoiceCorrectionIndex); auto choiceOriginCorrectionJson = model->getChoiceOrigins()->getChoiceAsJson(globalChoiceCorrectionIndex);
std::string choiceActionLabel = choiceOriginJson["action-label"]; std::string choiceActionLabel = choiceOriginJson["action-label"];
std::string choiceCorrectionActionLabel = choiceOriginCorrectionJson["action-label"]; std::string choiceCorrectionActionLabel = choiceOriginCorrectionJson["action-label"];
choiceOriginJson["action-label"] = choiceActionLabel.append(": ").append(choiceCorrectionActionLabel);
choiceOriginJson["action-label"] = choiceActionLabel.append(": ").append(choiceCorrectionActionLabel).append("\n");
choiceJson["origin"] = choiceOriginJson; choiceJson["origin"] = choiceOriginJson;
} }
if (model && model->hasChoiceLabeling()) { if (model && model->hasChoiceLabeling()) {

5
src/storm/storage/PreScheduler.cpp

@ -172,7 +172,10 @@ namespace storm {
if (model && model->hasChoiceOrigins() && if (model && model->hasChoiceOrigins() &&
model->getChoiceOrigins()->getIdentifier(globalChoiceIndex) != model->getChoiceOrigins()->getIdentifier(globalChoiceIndex) !=
model->getChoiceOrigins()->getIdentifierForChoicesWithNoOrigin()) { model->getChoiceOrigins()->getIdentifierForChoicesWithNoOrigin()) {
choiceJson["origin"] = model->getChoiceOrigins()->getChoiceAsJson(globalChoiceIndex);
auto choiceOriginJson = model->getChoiceOrigins()->getChoiceAsJson(globalChoiceIndex);
std::string choiceActionLabel = choiceOriginJson["action-label"];
choiceOriginJson["action-label"] = choiceActionLabel.append("\n");
choiceJson["origin"] = choiceOriginJson;
} }
if (model && model->hasChoiceLabeling()) { if (model && model->hasChoiceLabeling()) {
auto choiceLabels = model->getChoiceLabeling().getLabelsOfChoice(globalChoiceIndex); auto choiceLabels = model->getChoiceLabeling().getLabelsOfChoice(globalChoiceIndex);

Loading…
Cancel
Save