|
@ -243,6 +243,11 @@ namespace storm { |
|
|
|
|
|
|
|
|
// Then compute the state reward vector to use in the computation.
|
|
|
// Then compute the state reward vector to use in the computation.
|
|
|
storm::dd::Add<DdType, ValueType> subvector = rewardModel.getTotalRewardVector(maybeStatesAdd, submatrix, model.getColumnVariables()); |
|
|
storm::dd::Add<DdType, ValueType> subvector = rewardModel.getTotalRewardVector(maybeStatesAdd, submatrix, model.getColumnVariables()); |
|
|
|
|
|
if (!rewardModel.hasStateActionRewards() && !rewardModel.hasTransitionRewards()) { |
|
|
|
|
|
// If the reward model neither has state-action nor transition rewards, we need to multiply
|
|
|
|
|
|
// it with the legal nondetermism encodings in each state.
|
|
|
|
|
|
subvector *= transitionMatrixBdd.existsAbstract(model.getColumnVariables()).template toAdd<ValueType>(); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
// Since we are cutting away target and infinity states, we need to account for this by giving
|
|
|
// Since we are cutting away target and infinity states, we need to account for this by giving
|
|
|
// choices the value infinity that have some successor contained in the infinity states.
|
|
|
// choices the value infinity that have some successor contained in the infinity states.
|
|
@ -250,7 +255,7 @@ namespace storm { |
|
|
subvector = choicesWithInfinitySuccessor.ite(model.getManager().template getInfinity<ValueType>(), subvector); |
|
|
subvector = choicesWithInfinitySuccessor.ite(model.getManager().template getInfinity<ValueType>(), subvector); |
|
|
|
|
|
|
|
|
// Before cutting the non-maybe columns, we need to compute the sizes of the row groups.
|
|
|
// Before cutting the non-maybe columns, we need to compute the sizes of the row groups.
|
|
|
storm::dd::Add<DdType, uint_fast64_t> stateActionAdd = (submatrix.notZero().existsAbstract(model.getColumnVariables()) || subvector.notZero()).template toAdd<uint_fast64_t>(); |
|
|
|
|
|
|
|
|
storm::dd::Add<DdType, uint_fast64_t> stateActionAdd = submatrix.notZero().existsAbstract(model.getColumnVariables()).template toAdd<uint_fast64_t>(); |
|
|
std::vector<uint_fast64_t> rowGroupSizes = stateActionAdd.sumAbstract(model.getNondeterminismVariables()).toVector(odd); |
|
|
std::vector<uint_fast64_t> rowGroupSizes = stateActionAdd.sumAbstract(model.getNondeterminismVariables()).toVector(odd); |
|
|
|
|
|
|
|
|
// Finally cut away all columns targeting non-maybe states.
|
|
|
// Finally cut away all columns targeting non-maybe states.
|
|
|