From d062e658e036d3f3ff1f0f07a7b5685a8f9c1632 Mon Sep 17 00:00:00 2001 From: Matthias Volk Date: Thu, 22 Nov 2018 13:22:44 +0100 Subject: [PATCH] Output progress for DFT exploration --- src/storm-dft/builder/ExplicitDFTModelBuilder.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/storm-dft/builder/ExplicitDFTModelBuilder.cpp b/src/storm-dft/builder/ExplicitDFTModelBuilder.cpp index 93e1170be..695fd7c55 100644 --- a/src/storm-dft/builder/ExplicitDFTModelBuilder.cpp +++ b/src/storm-dft/builder/ExplicitDFTModelBuilder.cpp @@ -7,6 +7,7 @@ #include "storm/utility/constants.h" #include "storm/utility/vector.h" #include "storm/utility/bitoperations.h" +#include "storm/utility/ProgressMeasurement.h" #include "storm/exceptions/UnexpectedException.h" #include "storm/settings/SettingsManager.h" #include "storm/logic/AtomicLabelFormula.h" @@ -319,6 +320,8 @@ namespace storm { void ExplicitDFTModelBuilder::exploreStateSpace(double approximationThreshold) { size_t nrExpandedStates = 0; size_t nrSkippedStates = 0; + storm::utility::ProgressMeasurement progress("explored states"); + progress.startNewMeasurement(0); // TODO Matthias: do not empty queue every time but break before while (!explorationQueue.empty()) { // Get the first state in the queue @@ -416,6 +419,10 @@ namespace storm { matrixBuilder.finishRow(); } } + // Output number of currently explored states + if (nrExpandedStates % 100 == 0) { + progress.updateProgress(nrExpandedStates); + } } // end exploration STORM_LOG_INFO("Expanded " << nrExpandedStates << " states");