Browse Source

accumulation: Fix reward construction UNTESTED

accumulation-v4.7
Joachim Klein 5 years ago
parent
commit
ac1ea31b4f
  1. 7
      prism/src/explicit/AccumulationTransformation.java

7
prism/src/explicit/AccumulationTransformation.java

@ -116,11 +116,8 @@ public class AccumulationTransformation<M extends ModelExplicit> implements Mode
for (int i=0; i < accexp.getFunctions().size(); i++) {
Object rewardIndex = accexp.getFunctions().get(i).getRewardIndex();
RewardStruct rewStruct = ExpressionReward.getRewardStructByIndexObject(rewardIndex, mc.modulesFile, originalModel.getConstantValues());
ConstructRewards constructRewards = new ConstructRewards();
constructRewards.allowNegativeRewards();
Rewards reward = constructRewards.buildRewardStructure(originalModel, rewStruct, mc.getConstantValues());
int rewStructIndex = ExpressionReward.getRewardStructIndexByIndexObject(rewardIndex, mc.modulesFile, originalModel.getConstantValues());
Rewards reward = ((ProbModelChecker)mc).constructRewards(originalModel, rewStructIndex, true /* allow negative rewards */);
rewards.put(rewardIndex,reward);
}

Loading…
Cancel
Save