From cab08525f82209b24b396c19666b7ee912f743c1 Mon Sep 17 00:00:00 2001 From: TimQu Date: Thu, 16 Feb 2017 08:37:48 +0100 Subject: [PATCH] fix in SymbolicToSparseTransformer --- src/storm/models/sparse/StateLabeling.cpp | 4 ++-- src/storm/transformer/SymbolicToSparseTransformer.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/storm/models/sparse/StateLabeling.cpp b/src/storm/models/sparse/StateLabeling.cpp index 55eaa76d5..df289d439 100644 --- a/src/storm/models/sparse/StateLabeling.cpp +++ b/src/storm/models/sparse/StateLabeling.cpp @@ -61,14 +61,14 @@ namespace storm { void StateLabeling::addLabel(std::string const& label, storage::BitVector const& labeling) { STORM_LOG_THROW(!this->containsLabel(label), storm::exceptions::InvalidArgumentException, "Label '" << label << "' already exists."); - STORM_LOG_THROW(labeling.size() == stateCount, storm::exceptions::InvalidArgumentException, "Labeling vector has invalid size."); + STORM_LOG_THROW(labeling.size() == stateCount, storm::exceptions::InvalidArgumentException, "Labeling vector has invalid size. Expected: " << stateCount << " Actual: " << labeling.size()); nameToLabelingIndexMap.emplace(label, labelings.size()); labelings.push_back(labeling); } void StateLabeling::addLabel(std::string const& label, storage::BitVector&& labeling) { STORM_LOG_THROW(!this->containsLabel(label), storm::exceptions::InvalidArgumentException, "Label '" << label << "' already exists."); - STORM_LOG_THROW(labeling.size() == stateCount, storm::exceptions::InvalidArgumentException, "Labeling vector has invalid size."); + STORM_LOG_THROW(labeling.size() == stateCount, storm::exceptions::InvalidArgumentException, "Labeling vector has invalid size. Expected: " << stateCount << " Actual: " << labeling.size()); nameToLabelingIndexMap.emplace(label, labelings.size()); labelings.emplace_back(std::move(labeling)); } diff --git a/src/storm/transformer/SymbolicToSparseTransformer.cpp b/src/storm/transformer/SymbolicToSparseTransformer.cpp index a8b82133f..5dfbd2b4a 100644 --- a/src/storm/transformer/SymbolicToSparseTransformer.cpp +++ b/src/storm/transformer/SymbolicToSparseTransformer.cpp @@ -32,7 +32,7 @@ namespace storm { } rewardModels.emplace(rewardModelNameAndModel.first,storm::models::sparse::StandardRewardModel(stateRewards, stateActionRewards, transitionRewards)); } - storm::models::sparse::StateLabeling labelling; + storm::models::sparse::StateLabeling labelling(transitionMatrix.getRowGroupCount()); labelling.addLabel("init", symbolicMdp.getInitialStates().toVector(odd)); labelling.addLabel("deadlock", symbolicMdp.getDeadlockStates().toVector(odd));