From 3b9a48136c8192376839fd08c3e09ce77b77fdc3 Mon Sep 17 00:00:00 2001 From: Mavo Date: Sat, 9 Jan 2016 11:53:46 +0100 Subject: [PATCH] Sort transitions before building them Former-commit-id: eba930f0b65ac3a44b3acf527f1836d21e576dce --- src/builder/ExplicitDFTModelBuilder.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/builder/ExplicitDFTModelBuilder.cpp b/src/builder/ExplicitDFTModelBuilder.cpp index b561bb716..c0c596b02 100644 --- a/src/builder/ExplicitDFTModelBuilder.cpp +++ b/src/builder/ExplicitDFTModelBuilder.cpp @@ -1,6 +1,7 @@ #include "src/builder/ExplicitDFTModelBuilder.h" #include #include +#include namespace storm { namespace builder { @@ -74,7 +75,7 @@ namespace storm { template void ExplicitDFTModelBuilder::exploreStates(std::queue>& stateQueue, storm::storage::SparseMatrixBuilder& transitionMatrixBuilder) { - std::vector> outgoingTransitions; + std::map outgoingTransitions; while (!stateQueue.empty()) { // Initialization @@ -149,7 +150,8 @@ namespace storm { // Set transition ValueType prob = nextBE.first->activeFailureRate(); - outgoingTransitions.push_back(std::make_pair(it->getId(), prob)); + auto resultInsert = outgoingTransitions.insert(std::make_pair(it->getId(), prob)); + assert(resultInsert.second); sum += prob; } // end while failing BE