Browse Source

JaniNextStateGenerator: Fixed an issue related to CTMCs without state-action rewards

tempestpy_adaptions
TimQu 6 years ago
parent
commit
c622f463ad
  1. 2
      src/storm/generator/JaniNextStateGenerator.cpp

2
src/storm/generator/JaniNextStateGenerator.cpp

@ -495,9 +495,11 @@ namespace storm {
std::vector<ValueType> stateActionRewards(rewardExpressions.size(), storm::utility::zero<ValueType>()); std::vector<ValueType> stateActionRewards(rewardExpressions.size(), storm::utility::zero<ValueType>());
for (auto const& choice : allChoices) { for (auto const& choice : allChoices) {
if (hasStateActionRewards) {
for (uint_fast64_t rewardVariableIndex = 0; rewardVariableIndex < rewardExpressions.size(); ++rewardVariableIndex) { for (uint_fast64_t rewardVariableIndex = 0; rewardVariableIndex < rewardExpressions.size(); ++rewardVariableIndex) {
stateActionRewards[rewardVariableIndex] += choice.getRewards()[rewardVariableIndex] * choice.getTotalMass() / totalExitRate; stateActionRewards[rewardVariableIndex] += choice.getRewards()[rewardVariableIndex] * choice.getTotalMass() / totalExitRate;
} }
}
if (this->options.isBuildChoiceOriginsSet() && choice.hasOriginData()) { if (this->options.isBuildChoiceOriginsSet() && choice.hasOriginData()) {
globalChoice.addOriginData(choice.getOriginData()); globalChoice.addOriginData(choice.getOriginData());

Loading…
Cancel
Save