Browse Source

Some optimisations for approximate model checking on models with deadlocks (could do other operators too).

git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@3876 bbc10eb1-c90d-0410-af57-cb519fbb1720
master
Dave Parker 15 years ago
parent
commit
aca617849b
  1. 6
      prism/src/simulator/sampler/SamplerRewardInstCont.java
  2. 6
      prism/src/simulator/sampler/SamplerRewardInstDisc.java

6
prism/src/simulator/sampler/SamplerRewardInstCont.java

@ -74,6 +74,12 @@ public class SamplerRewardInstCont extends SamplerDouble
value = path.getCurrentStateReward(rewardStructIndex);
}
}
// Or, if we are now at a deadlock
else if (transList != null && transList.isDeadlock()) {
valueKnown = true;
value = path.getCurrentStateReward(rewardStructIndex);
}
// Otherwise, don't know
return valueKnown;
}

6
prism/src/simulator/sampler/SamplerRewardInstDisc.java

@ -66,6 +66,12 @@ public class SamplerRewardInstDisc extends SamplerDouble
valueKnown = true;
value = path.getCurrentStateReward(rewardStructIndex);
}
// Or, if we are now at a deadlock
else if (transList != null && transList.isDeadlock()) {
valueKnown = true;
value = path.getCurrentStateReward(rewardStructIndex);
}
// Otherwise, don't know
return valueKnown;
}

Loading…
Cancel
Save