Browse Source

Fixed error that matrix dimensions were to small if last columns have only 0 entries

tempestpy_adaptions
Alexander Bork 5 years ago
parent
commit
584dc6caa7
  1. 6
      src/storm/transformer/NonMarkovianChainTransformer.cpp

6
src/storm/transformer/NonMarkovianChainTransformer.cpp

@ -166,10 +166,11 @@ namespace storm {
}
}
uint64_t newStateCount = ma->getNumberOfStates() - eliminationMapping.size();
// Build the new MA
storm::storage::SparseMatrix<ValueType> newTransitionMatrix;
storm::models::sparse::StateLabeling newStateLabeling(
ma->getNumberOfStates() - eliminationMapping.size());
newStateCount);
storm::storage::BitVector newMarkovianStates(ma->getNumberOfStates() - eliminationMapping.size(),
false);
std::vector<ValueType> newExitRates;
@ -230,7 +231,8 @@ namespace storm {
++currentRow;
}
}
newTransitionMatrix = matrixBuilder.build();
// explicitly force dimensions of the matrix in case a column is missing
newTransitionMatrix = matrixBuilder.build(newStateCount, newStateCount, newStateCount);
storm::storage::sparse::ModelComponents<ValueType, RewardModelType> newComponents = storm::storage::sparse::ModelComponents<ValueType, RewardModelType>(
std::move(newTransitionMatrix), std::move(newStateLabeling));

Loading…
Cancel
Save