Browse Source

Explicit bug fig (from qar/Anvesh) - can now reset rewards in MDPRewardsSimple to 0.

git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@4046 bbc10eb1-c90d-0410-af57-cb519fbb1720
master
Dave Parker 14 years ago
parent
commit
3bfb5929bb
  1. 6
      prism/src/explicit/rewards/MDPRewardsSimple.java

6
prism/src/explicit/rewards/MDPRewardsSimple.java

@ -61,9 +61,6 @@ public class MDPRewardsSimple implements MDPRewards
*/ */
public void setStateReward(int s, double r) public void setStateReward(int s, double r)
{ {
// Nothing to do for zero reward
if (r == 0.0)
return;
// If no rewards array created yet, create it // If no rewards array created yet, create it
if (stateRewards == null) { if (stateRewards == null) {
stateRewards = new ArrayList<Double>(numStates); stateRewards = new ArrayList<Double>(numStates);
@ -80,9 +77,6 @@ public class MDPRewardsSimple implements MDPRewards
public void setTransitionReward(int s, int i, double r) public void setTransitionReward(int s, int i, double r)
{ {
List<Double> list; List<Double> list;
// Nothing to do for zero reward
if (r == 0.0)
return;
// If no rewards array created yet, create it // If no rewards array created yet, create it
if (transRewards == null) { if (transRewards == null) {
transRewards = new ArrayList<List<Double>>(numStates); transRewards = new ArrayList<List<Double>>(numStates);

Loading…
Cancel
Save