diff --git a/src/modelchecker/csl/helper/SparseCtmcCslHelper.cpp b/src/modelchecker/csl/helper/SparseCtmcCslHelper.cpp index 3ffe7bbe8..18a56f5ab 100644 --- a/src/modelchecker/csl/helper/SparseCtmcCslHelper.cpp +++ b/src/modelchecker/csl/helper/SparseCtmcCslHelper.cpp @@ -663,8 +663,8 @@ namespace storm { // Initialize rewards. std::vector totalRewardVector; for (size_t i = 0; i < exitRateVector.size(); ++i) { - if (targetStates[i]) { - // Set reward for target states to 0. + if (targetStates[i] || storm::utility::isZero(exitRateVector[i])) { + // Set reward for target states or states without outgoing transitions to 0. totalRewardVector.push_back(storm::utility::zero()); } else { // Reward is (1 / exitRate). @@ -685,8 +685,8 @@ namespace storm { // Initialize rewards. std::vector totalRewardVector; for (size_t i = 0; i < exitRateVector.size(); ++i) { - if (targetStates[i]) { - // Set reward for target states to 0. + if (targetStates[i] || storm::utility::isZero(exitRateVector[i])) { + // Set reward for target states or states without outgoing transitions to 0. totalRewardVector.push_back(storm::utility::zero()); } else { // Reward is (1 / exitRate).