From d1e4de5fb3ba7369fc51884ce86c92b3e809e31a Mon Sep 17 00:00:00 2001 From: Dave Parker Date: Thu, 28 Jun 2012 20:32:34 +0000 Subject: [PATCH] Make "rewards" option of simpath consistent with others. git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@5396 bbc10eb1-c90d-0410-af57-cb519fbb1720 --- prism/src/simulator/GenerateSimulationPath.java | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/prism/src/simulator/GenerateSimulationPath.java b/prism/src/simulator/GenerateSimulationPath.java index e1a38b1c..62d0fa27 100644 --- a/prism/src/simulator/GenerateSimulationPath.java +++ b/prism/src/simulator/GenerateSimulationPath.java @@ -224,9 +224,15 @@ public class GenerateSimulationPath } catch (NumberFormatException e) { throw new PrismException("Value for \"snapshot\" option must be a positive double"); } - } else if (ss[i].equals("rewards")) { - // display rewards - simPathShowRewards = true; + } else if (ss[i].equals("rewards=")) { + // display rewards? + String bool = ss[i].substring(8).toLowerCase(); + if (bool.equals("true")) + simPathShowRewards = true; + else if (bool.equals("true")) + simPathShowRewards = true; + else + throw new PrismException("Value for \"rewards\" option must \"true\" or \"false\""); } else { // path of fixed number of steps simPathType = PathType.SIM_PATH_NUM_STEPS;