From 43f851167861c0c43ec8b33e4375626e27664125 Mon Sep 17 00:00:00 2001 From: Thomas Knoll Date: Wed, 16 Aug 2023 15:58:07 +0200 Subject: [PATCH] prettified post/pre scheduler json export --- src/storm/storage/PostScheduler.cpp | 2 +- src/storm/storage/PreScheduler.cpp | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/storm/storage/PostScheduler.cpp b/src/storm/storage/PostScheduler.cpp index 420b4b4e7..dd8fb3d1f 100644 --- a/src/storm/storage/PostScheduler.cpp +++ b/src/storm/storage/PostScheduler.cpp @@ -160,7 +160,7 @@ namespace storm { auto choiceOriginCorrectionJson = model->getChoiceOrigins()->getChoiceAsJson(globalChoiceCorrectionIndex); std::string choiceActionLabel = choiceOriginJson["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; } if (model && model->hasChoiceLabeling()) { diff --git a/src/storm/storage/PreScheduler.cpp b/src/storm/storage/PreScheduler.cpp index bc3e6e833..41508064b 100644 --- a/src/storm/storage/PreScheduler.cpp +++ b/src/storm/storage/PreScheduler.cpp @@ -172,7 +172,10 @@ namespace storm { if (model && model->hasChoiceOrigins() && model->getChoiceOrigins()->getIdentifier(globalChoiceIndex) != 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()) { auto choiceLabels = model->getChoiceLabeling().getLabelsOfChoice(globalChoiceIndex);