From fcbce6052c044b4f57e4ef71e62d939058cbda59 Mon Sep 17 00:00:00 2001 From: Tim Quatmann Date: Wed, 6 May 2020 10:09:46 +0200 Subject: [PATCH] Fixed getting invalid bounds if we abort during the initial approximation step. --- src/storm-pomdp/modelchecker/ApproximatePOMDPModelchecker.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/storm-pomdp/modelchecker/ApproximatePOMDPModelchecker.cpp b/src/storm-pomdp/modelchecker/ApproximatePOMDPModelchecker.cpp index 788c96225..77d76f47b 100644 --- a/src/storm-pomdp/modelchecker/ApproximatePOMDPModelchecker.cpp +++ b/src/storm-pomdp/modelchecker/ApproximatePOMDPModelchecker.cpp @@ -253,7 +253,7 @@ namespace storm { overApproxHeuristicPar.sizeThreshold = options.sizeThresholdInit == 0 ? std::numeric_limits::max() : options.sizeThresholdInit; overApproxHeuristicPar.optimalChoiceValueEpsilon = options.optimalChoiceValueThresholdInit; buildOverApproximation(targetObservations, min, rewardModelName.is_initialized(), false, overApproxHeuristicPar, observationResolutionVector, overApproxBeliefManager, overApproximation); - if (!overApproximation->hasComputedValues()) { + if (!overApproximation->hasComputedValues() || storm::utility::resources::isTerminate()) { return; } ValueType const& newValue = overApproximation->getComputedValueAtInitialState(); @@ -280,7 +280,7 @@ namespace storm { underApproxHeuristicPar.sizeThreshold = pomdp.getNumberOfStates() * pomdp.getMaxNrStatesWithSameObservation(); } buildUnderApproximation(targetObservations, min, rewardModelName.is_initialized(), false, underApproxHeuristicPar, underApproxBeliefManager, underApproximation); - if (!underApproximation->hasComputedValues()) { + if (!underApproximation->hasComputedValues() || storm::utility::resources::isTerminate()) { return; } ValueType const& newValue = underApproximation->getComputedValueAtInitialState();