From 26764137f5cbc3a22181ab4e243d265f1943d03d Mon Sep 17 00:00:00 2001 From: Tim Quatmann Date: Wed, 8 Apr 2020 12:30:39 +0200 Subject: [PATCH] Fix for --unfold-belief-mdp setting --- src/storm-pomdp-cli/storm-pomdp.cpp | 4 +++- src/storm-pomdp/modelchecker/ApproximatePOMDPModelchecker.cpp | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/storm-pomdp-cli/storm-pomdp.cpp b/src/storm-pomdp-cli/storm-pomdp.cpp index 181c5c31f..19e139d1d 100644 --- a/src/storm-pomdp-cli/storm-pomdp.cpp +++ b/src/storm-pomdp-cli/storm-pomdp.cpp @@ -109,7 +109,9 @@ namespace storm { options.refinementPrecision = storm::utility::convertNumber(gridSettings.getRefinementPrecision()); options.numericPrecision = storm::utility::convertNumber(gridSettings.getNumericPrecision()); options.cacheSubsimplices = gridSettings.isCacheSimplicesSet(); - options.beliefMdpSizeThreshold = gridSettings.getUnfoldBeliefMdpSizeThreshold(); + if (gridSettings.isUnfoldBeliefMdpSizeThresholdSet()) { + options.beliefMdpSizeThreshold = gridSettings.getUnfoldBeliefMdpSizeThreshold(); + } if (storm::NumberTraits::IsExact) { if (gridSettings.isNumericPrecisionSetFromDefault()) { STORM_LOG_WARN_COND(storm::utility::isZero(options.numericPrecision), "Setting numeric precision to zero because exact arithmethic is used."); diff --git a/src/storm-pomdp/modelchecker/ApproximatePOMDPModelchecker.cpp b/src/storm-pomdp/modelchecker/ApproximatePOMDPModelchecker.cpp index 070279ac4..622e63512 100644 --- a/src/storm-pomdp/modelchecker/ApproximatePOMDPModelchecker.cpp +++ b/src/storm-pomdp/modelchecker/ApproximatePOMDPModelchecker.cpp @@ -35,7 +35,7 @@ namespace storm { refinementPrecision = storm::utility::convertNumber(1e-4); numericPrecision = storm::NumberTraits::IsExact ? storm::utility::zero() : storm::utility::convertNumber(1e-9); cacheSubsimplices = false; - beliefMdpSizeThreshold = 0ull; + beliefMdpSizeThreshold = boost::none; } template @@ -190,7 +190,7 @@ namespace storm { manager->setRewardModel(rewardModelName); } auto approx = std::make_shared(manager, lowerPomdpValueBounds, upperPomdpValueBounds); - if (options.beliefMdpSizeThreshold) { + if (options.beliefMdpSizeThreshold && options.beliefMdpSizeThreshold.get() > 0) { underApproxSizeThreshold = options.beliefMdpSizeThreshold.get(); } if (underApproxSizeThreshold == 0) {