Browse Source

fixed bug in reward generation for PRISM models

Former-commit-id: 72399da7ed
tempestpy_adaptions
dehnert 9 years ago
parent
commit
2accd81aaa
  1. 2
      src/generator/PrismNextStateGenerator.cpp
  2. 2
      src/models/sparse/StandardRewardModel.cpp

2
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()));
}
}
}

2
src/models/sparse/StandardRewardModel.cpp

@ -67,8 +67,6 @@ namespace storm {
this->optionalStateRewardVector.get()[state] = newReward;
}
template<typename ValueType>
bool StandardRewardModel<ValueType>::hasStateActionRewards() const {
return static_cast<bool>(this->optionalStateActionRewardVector);

Loading…
Cancel
Save