Browse Source

MDP reachability in explicit engine: do not do numerical solution unless needed.

git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@6912 bbc10eb1-c90d-0410-af57-cb519fbb1720
master
Dave Parker 13 years ago
parent
commit
b8969df87e
  1. 8
      prism/src/explicit/MDPModelChecker.java

8
prism/src/explicit/MDPModelChecker.java

@ -408,7 +408,8 @@ public class MDPModelChecker extends ProbModelChecker
} }
} }
// Compute probabilities
// Compute probabilities (if needed)
if (numYes + numNo < n) {
switch (mdpSolnMethod) { switch (mdpSolnMethod) {
case VALUE_ITERATION: case VALUE_ITERATION:
res = computeReachProbsValIter(mdp, no, yes, min, init, known, strat); res = computeReachProbsValIter(mdp, no, yes, min, init, known, strat);
@ -425,6 +426,11 @@ public class MDPModelChecker extends ProbModelChecker
default: default:
throw new PrismException("Unknown MDP solution method " + mdpSolnMethod.fullName()); throw new PrismException("Unknown MDP solution method " + mdpSolnMethod.fullName());
} }
} else {
res = new ModelCheckerResult();
res.soln = Utils.bitsetToDoubleArray(yes, n);
return res;
}
// Finished probabilistic reachability // Finished probabilistic reachability
timer = System.currentTimeMillis() - timer; timer = System.currentTimeMillis() - timer;

Loading…
Cancel
Save