Browse Source

Set correct edge id for JSON export

tempestpy_adaptions
Matthias Volk 8 years ago
parent
commit
ade2b96903
  1. 4
      src/storm-dft/storage/dft/DftJsonExporter.cpp

4
src/storm-dft/storage/dft/DftJsonExporter.cpp

@ -97,7 +97,9 @@ namespace storm {
template<typename ValueType> template<typename ValueType>
modernjson::json DftJsonExporter<ValueType>::translateEdge(std::shared_ptr<DFTGate<ValueType> const> const& gate, DFTElementCPointer const& child, size_t index) { modernjson::json DftJsonExporter<ValueType>::translateEdge(std::shared_ptr<DFTGate<ValueType> const> const& gate, DFTElementCPointer const& child, size_t index) {
modernjson::json nodeData; modernjson::json nodeData;
nodeData["id"] = currentId;
std::stringstream stream;
stream << gate->id() << "e" << child->id();
nodeData["id"] = stream.str();
++currentId; ++currentId;
nodeData["source"] = gate->id(); nodeData["source"] = gate->id();
nodeData["target"] = child->id(); nodeData["target"] = child->id();

Loading…
Cancel
Save