From 20665eb862299bbb1538fde5cb9e846122e845fc Mon Sep 17 00:00:00 2001 From: Tim Quatmann Date: Fri, 2 Oct 2020 12:48:35 +0200 Subject: [PATCH] multi-objective: Aborting time-bounded reachability computation when termination signal is received. --- .../multiobjective/pcaa/StandardMaPcaaWeightVectorChecker.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/storm/modelchecker/multiobjective/pcaa/StandardMaPcaaWeightVectorChecker.cpp b/src/storm/modelchecker/multiobjective/pcaa/StandardMaPcaaWeightVectorChecker.cpp index a60ecc012..7a3455778 100644 --- a/src/storm/modelchecker/multiobjective/pcaa/StandardMaPcaaWeightVectorChecker.cpp +++ b/src/storm/modelchecker/multiobjective/pcaa/StandardMaPcaaWeightVectorChecker.cpp @@ -7,6 +7,7 @@ #include "storm/models/sparse/StandardRewardModel.h" #include "storm/utility/macros.h" #include "storm/utility/vector.h" +#include "storm/utility/SignalHandler.h" #include "storm/logic/Formulas.h" #include "storm/solver/SolverSelectionOptions.h" @@ -113,7 +114,7 @@ namespace storm { auto upperTimeBoundIt = upperTimeBounds.begin(); uint_fast64_t currentEpoch = upperTimeBounds.empty() ? 0 : upperTimeBoundIt->first; - while (true) { + while (!storm::utility::resources::isTerminate()) { // Update the objectives that are considered at the current time epoch as well as the (weighted) reward vectors. updateDataToCurrentEpoch(MS, PS, *minMax, consideredObjectives, currentEpoch, weightVector, upperTimeBoundIt, upperTimeBounds); @@ -129,6 +130,7 @@ namespace storm { break; } } + STORM_LOG_WARN_COND(!storm::utility::resources::isTerminate(), "Time-bounded reachability computation aborted."); // compose the results from MS and PS storm::utility::vector::setVectorValues(this->weightedResult, MS.states, MS.weightedSolutionVector);