Browse Source

fix in SymbolicToSparseTransformer

tempestpy_adaptions
TimQu 8 years ago
parent
commit
cab08525f8
  1. 4
      src/storm/models/sparse/StateLabeling.cpp
  2. 2
      src/storm/transformer/SymbolicToSparseTransformer.cpp

4
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));
}

2
src/storm/transformer/SymbolicToSparseTransformer.cpp

@ -32,7 +32,7 @@ namespace storm {
}
rewardModels.emplace(rewardModelNameAndModel.first,storm::models::sparse::StandardRewardModel<ValueType>(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));

Loading…
Cancel
Save