diff --git a/src/storm/modelchecker/multiobjective/rewardbounded/MultiDimensionalRewardUnfolding.cpp b/src/storm/modelchecker/multiobjective/rewardbounded/MultiDimensionalRewardUnfolding.cpp index f100f1415..c6bdeeca7 100644 --- a/src/storm/modelchecker/multiobjective/rewardbounded/MultiDimensionalRewardUnfolding.cpp +++ b/src/storm/modelchecker/multiobjective/rewardbounded/MultiDimensionalRewardUnfolding.cpp @@ -202,7 +202,7 @@ namespace storm { storm::storage::SparseMatrix const& allTransitions = modelMemoryProduct->getTransitionMatrix(); std::shared_ptr result = std::make_shared(); - storm::storage::BitVector rewardChoices(allTransitions.getRowCount(), false); + result->rewardChoices = storm::storage::BitVector(allTransitions.getRowCount(), false); result->epochSteps.resize(modelMemoryProduct->getNumberOfChoices()); for (uint64_t modelState = 0; modelState < model.getNumberOfStates(); ++modelState) { uint64_t numChoices = model.getTransitionMatrix().getRowGroupSize(modelState); @@ -220,14 +220,14 @@ namespace storm { uint64_t productChoice = allTransitions.getRowGroupIndices()[productState] + choiceOffset; assert(productChoice < allTransitions.getRowGroupIndices()[productState + 1]); result->epochSteps[productChoice] = step; - rewardChoices.set(productChoice, true); + result->rewardChoices.set(productChoice, true); } } } } - result->rewardTransitions = allTransitions.filterEntries(rewardChoices); - result->intermediateTransitions = allTransitions.filterEntries(~rewardChoices); + result->rewardTransitions = allTransitions.filterEntries(result->rewardChoices); + result->intermediateTransitions = allTransitions.filterEntries(~result->rewardChoices); result->objectiveRewards = computeObjectiveRewardsForEpoch(epoch, modelMemoryProduct); diff --git a/src/storm/modelchecker/multiobjective/rewardbounded/MultiDimensionalRewardUnfolding.h b/src/storm/modelchecker/multiobjective/rewardbounded/MultiDimensionalRewardUnfolding.h index 7a8ef0b20..c87846979 100644 --- a/src/storm/modelchecker/multiobjective/rewardbounded/MultiDimensionalRewardUnfolding.h +++ b/src/storm/modelchecker/multiobjective/rewardbounded/MultiDimensionalRewardUnfolding.h @@ -24,6 +24,7 @@ namespace storm { struct EpochModel { storm::storage::SparseMatrix rewardTransitions; storm::storage::SparseMatrix intermediateTransitions; + storm::storage::BitVector rewardChoices; std::vector> epochSteps; std::vector> objectiveRewards; std::vector objectiveRewardFilter;