diff --git a/prism/src/simulator/sampler/SamplerBoundedUntilCont.java b/prism/src/simulator/sampler/SamplerBoundedUntilCont.java index ae97665d..0cd41b07 100644 --- a/prism/src/simulator/sampler/SamplerBoundedUntilCont.java +++ b/prism/src/simulator/sampler/SamplerBoundedUntilCont.java @@ -167,7 +167,7 @@ public class SamplerBoundedUntilCont extends SamplerBoolean @Override public boolean needsBoundedNumSteps() { - // Always bounded (although we don't know the exact num steps, just the time bound) - return true; + // Bounded if there is a non-finite upper-bound (although we don't know the exact num steps, just the time bound) + return ub < Double.POSITIVE_INFINITY; } } diff --git a/prism/src/simulator/sampler/SamplerBoundedUntilDisc.java b/prism/src/simulator/sampler/SamplerBoundedUntilDisc.java index ff922410..b6f421ef 100644 --- a/prism/src/simulator/sampler/SamplerBoundedUntilDisc.java +++ b/prism/src/simulator/sampler/SamplerBoundedUntilDisc.java @@ -137,7 +137,7 @@ public class SamplerBoundedUntilDisc extends SamplerBoolean @Override public boolean needsBoundedNumSteps() { - // Always bounded - return true; + // Bounded if there is an upper bound + return haveUpperBound; } }