From 239b1d53809d14dd4dea64b8ef3c37de2ef39d2a Mon Sep 17 00:00:00 2001 From: Ben Plummer <dev@ben-plummer.com> Date: Wed, 7 Dec 2022 10:35:53 +0000 Subject: [PATCH] Implement missing methods --- prism/src/cex/CexPathAsBDDs.java | 20 +++++++++++++++++++- prism/src/cex/CexPathStates.java | 16 ++++++++++++++++ prism/src/simulator/SimulatorEngine.java | 12 ++++++++++++ 3 files changed, 47 insertions(+), 1 deletion(-) diff --git a/prism/src/cex/CexPathAsBDDs.java b/prism/src/cex/CexPathAsBDDs.java index 803e77bec..c0d37e85e 100644 --- a/prism/src/cex/CexPathAsBDDs.java +++ b/prism/src/cex/CexPathAsBDDs.java @@ -138,7 +138,25 @@ public class CexPathAsBDDs implements PathFullInfo { return 0.0; } - + + @Override + public double getTransitionResource(int step) + { + return 0.0; + } + + @Override + public double getCumulativeResource(int step) + { + return 0.0; + } + + @Override + public double getStateResource(int step) + { + return 0.0; + } + @Override public boolean isLooping() { diff --git a/prism/src/cex/CexPathStates.java b/prism/src/cex/CexPathStates.java index a632c4203..4eb60cff4 100644 --- a/prism/src/cex/CexPathStates.java +++ b/prism/src/cex/CexPathStates.java @@ -102,7 +102,23 @@ public class CexPathStates implements PathFullInfo { return 0.0; } + @Override + public double getTransitionResource(int step) + { + return 0.0; + } + @Override + public double getCumulativeResource(int step) + { + return 0.0; + } + + @Override + public double getStateResource(int step) + { + return 0.0; + } @Override public double getTime(int step) { diff --git a/prism/src/simulator/SimulatorEngine.java b/prism/src/simulator/SimulatorEngine.java index 45104245f..88d001959 100644 --- a/prism/src/simulator/SimulatorEngine.java +++ b/prism/src/simulator/SimulatorEngine.java @@ -1499,6 +1499,17 @@ public class SimulatorEngine extends PrismComponent exportPath(file, false, false); } + /** + * Export the current path to a file in a simple space separated format. + * (Not applicable for on-the-fly paths) + * @param file File to which the path should be exported to (mainLog if null). + * @param showRewards Export reward information with the path + */ + public void exportPath(File file, boolean showRewards) throws PrismException + { + exportPath(file, false, showRewards, false, " ", null); + } + /** * Export the current path to a file in a simple space separated format. * (Not applicable for on-the-fly paths) @@ -2000,6 +2011,7 @@ public class SimulatorEngine extends PrismComponent } } + /** * Halt the sampling algorithm in its tracks (not implemented). */ -- GitLab