From bdb2aa8de97efe0059304bff829ebea96e2d02f2 Mon Sep 17 00:00:00 2001 From: hannah Date: Fri, 16 Jul 2021 16:40:10 +0200 Subject: [PATCH] fixed scheduler output Conflicts: src/storm/storage/Scheduler.cpp --- src/storm/storage/Scheduler.cpp | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/storm/storage/Scheduler.cpp b/src/storm/storage/Scheduler.cpp index 8b8431e24..4dbc1df8f 100644 --- a/src/storm/storage/Scheduler.cpp +++ b/src/storm/storage/Scheduler.cpp @@ -216,11 +216,20 @@ namespace storm { } // Print memory updates + if(!isMemorylessScheduler()) { - out << " "; + stateString << std::setw(30); //todo set width for (auto const& choiceProbPair : choice.getChoiceAsDistribution()) { - for (auto entryIt = model->getTransitionMatrix().getRow(state + choiceProbPair.first).begin(); entryIt < model->getTransitionMatrix().getRow(state + choiceProbPair.first).end(); ++entryIt) { - out << ", model state' = " << entryIt->getColumn() << ": (transition = " << entryIt - model->getTransitionMatrix().begin() << ") -> " << "(m' = "<memoryStructure->getSuccessorMemoryState(memoryState, entryIt - model->getTransitionMatrix().begin()) <<")"; + uint64_t row = model->getTransitionMatrix().getRowGroupIndices()[state] + choiceProbPair.first; + bool firstUpdate = true; + for (auto entryIt = model->getTransitionMatrix().getRow(row).begin(); entryIt < model->getTransitionMatrix().getRow(row).end(); ++entryIt) { + if (firstUpdate) { + firstUpdate = false; + } else { + stateString << ", "; + } + stateString << "model state' = " << entryIt->getColumn() << ": (transition = " << entryIt - model->getTransitionMatrix().begin() << ") -> " << "(m' = "<memoryStructure->getSuccessorMemoryState(memoryState, entryIt - model->getTransitionMatrix().begin()) <<")"; + //out << ", model state' = " << entryIt->getColumn() << ": (transition = " << entryIt - model->getTransitionMatrix().begin() << ") -> " << "(m' = ?) "; } }