Browse Source

param/exact: Transitions that fix a deadlock don't earn transition rewards

Same fix as in the explicit engine (eeb8016184), for issue #29.

This change can currently not be detected by any of the properties supported by the exact/parametric engine.
master
Joachim Klein 8 years ago
parent
commit
759d588ae3
  1. 6
      prism/src/param/ParamModelChecker.java

6
prism/src/param/ParamModelChecker.java

@ -1124,6 +1124,12 @@ final public class ParamModelChecker extends PrismComponent
String action = rewStruct.getSynch(rewItem);
boolean isTransitionReward = rewStruct.getRewardStructItem(rewItem).isTransitionReward();
for (int state = 0; state < numStates; state++) {
if (isTransitionReward && model.isDeadlockState(state)) {
// As state is a deadlock state, any outgoing transition
// was added to "fix" the deadlock and thus does not get a reward.
// Skip to next state
continue;
}
if (guard.evaluateExact(constantValues, statesList.get(state)).toBoolean()) {
int[] varMap = new int[statesList.get(0).varValues.length];
for (int i = 0; i < varMap.length; i++) {

Loading…
Cancel
Save