From 2accd81aaa5fcb865d8034c3a242dffb5f8bf388 Mon Sep 17 00:00:00 2001 From: dehnert Date: Thu, 16 Jun 2016 23:48:43 +0200 Subject: [PATCH] fixed bug in reward generation for PRISM models Former-commit-id: 72399da7edfb562e7cfcffc29e297dfa0050ac97 --- src/generator/PrismNextStateGenerator.cpp | 2 +- src/models/sparse/StandardRewardModel.cpp | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/generator/PrismNextStateGenerator.cpp b/src/generator/PrismNextStateGenerator.cpp index 9ccec9605..0440074b1 100644 --- a/src/generator/PrismNextStateGenerator.cpp +++ b/src/generator/PrismNextStateGenerator.cpp @@ -389,7 +389,7 @@ namespace storm { if (rewardModel.get().hasStateActionRewards()) { for (auto const& stateActionReward : rewardModel.get().getStateActionRewards()) { if (stateActionReward.getActionIndex() == choice.getActionIndex() && evaluator.asBool(stateActionReward.getStatePredicateExpression())) { - stateActionRewardValue += ValueType(evaluator.asRational(stateActionReward.getRewardValueExpression())) * choice.getTotalMass(); + stateActionRewardValue += ValueType(evaluator.asRational(stateActionReward.getRewardValueExpression())); } } } diff --git a/src/models/sparse/StandardRewardModel.cpp b/src/models/sparse/StandardRewardModel.cpp index 4cab9bbb4..88b88915e 100644 --- a/src/models/sparse/StandardRewardModel.cpp +++ b/src/models/sparse/StandardRewardModel.cpp @@ -67,8 +67,6 @@ namespace storm { this->optionalStateRewardVector.get()[state] = newReward; } - - template bool StandardRewardModel::hasStateActionRewards() const { return static_cast(this->optionalStateActionRewardVector);