Browse Source

Fix for --unfold-belief-mdp setting

tempestpy_adaptions
Tim Quatmann 5 years ago
parent
commit
26764137f5
  1. 2
      src/storm-pomdp-cli/storm-pomdp.cpp
  2. 4
      src/storm-pomdp/modelchecker/ApproximatePOMDPModelchecker.cpp

2
src/storm-pomdp-cli/storm-pomdp.cpp

@ -109,7 +109,9 @@ namespace storm {
options.refinementPrecision = storm::utility::convertNumber<ValueType>(gridSettings.getRefinementPrecision());
options.numericPrecision = storm::utility::convertNumber<ValueType>(gridSettings.getNumericPrecision());
options.cacheSubsimplices = gridSettings.isCacheSimplicesSet();
if (gridSettings.isUnfoldBeliefMdpSizeThresholdSet()) {
options.beliefMdpSizeThreshold = gridSettings.getUnfoldBeliefMdpSizeThreshold();
}
if (storm::NumberTraits<ValueType>::IsExact) {
if (gridSettings.isNumericPrecisionSetFromDefault()) {
STORM_LOG_WARN_COND(storm::utility::isZero(options.numericPrecision), "Setting numeric precision to zero because exact arithmethic is used.");

4
src/storm-pomdp/modelchecker/ApproximatePOMDPModelchecker.cpp

@ -35,7 +35,7 @@ namespace storm {
refinementPrecision = storm::utility::convertNumber<ValueType>(1e-4);
numericPrecision = storm::NumberTraits<ValueType>::IsExact ? storm::utility::zero<ValueType>() : storm::utility::convertNumber<ValueType>(1e-9);
cacheSubsimplices = false;
beliefMdpSizeThreshold = 0ull;
beliefMdpSizeThreshold = boost::none;
}
template<typename PomdpModelType, typename BeliefValueType>
@ -190,7 +190,7 @@ namespace storm {
manager->setRewardModel(rewardModelName);
}
auto approx = std::make_shared<ExplorerType>(manager, lowerPomdpValueBounds, upperPomdpValueBounds);
if (options.beliefMdpSizeThreshold) {
if (options.beliefMdpSizeThreshold && options.beliefMdpSizeThreshold.get() > 0) {
underApproxSizeThreshold = options.beliefMdpSizeThreshold.get();
}
if (underApproxSizeThreshold == 0) {

Loading…
Cancel
Save