From 315bd550a79b173d894f2ba4330b8812c6e5cfee Mon Sep 17 00:00:00 2001 From: sjunges Date: Mon, 10 Oct 2016 20:09:51 +0200 Subject: [PATCH] better dot output for gspns thanks to michael Former-commit-id: ed58341b7c1bd079cef22692c707280f0d6a384c [formerly 1ecaaab24b4efaa15d66b46a012117b1e15670f1] Former-commit-id: 6d3360236954501403360e31fdd234dabb3bcac4 --- src/storage/gspn/GSPN.cpp | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/storage/gspn/GSPN.cpp b/src/storage/gspn/GSPN.cpp index 40f15007a..108991162 100644 --- a/src/storage/gspn/GSPN.cpp +++ b/src/storage/gspn/GSPN.cpp @@ -101,26 +101,25 @@ namespace storm { // print transitions with weight/rate outStream << "\t" << "node [shape=box]" << std::endl; for (auto& trans : this->getImmediateTransitions()) { - outStream << "\t" << trans->getName() << " [label=\"" << trans->getName(); - outStream << "(immediate:" << trans->getWeight() << ")\"];" << std::endl; + outStream << "\t" << trans->getName() << " [fontcolor=white, style=filled, fillcolor=black, label=\"" << trans->getName() << "\"];" << std::endl; } for (auto& trans : this->getTimedTransitions()) { outStream << "\t" << trans->getName() << " [label=\"" << trans->getName(); - outStream << "(timed:" << trans->getRate() << ")\"];" << std::endl; + outStream << " (" << trans->getRate() << ")\"];" << std::endl; } // print arcs for (auto& trans : this->getImmediateTransitions()) { for (auto &placePtr : trans->getInputPlaces()) { - outStream << "\t" << placePtr->getName() << " -> " << trans->getName() << "[label=\"normal:" << + outStream << "\t" << placePtr->getName() << " -> " << trans->getName() << "[label=\"" << trans->getInputArcMultiplicity(*placePtr); outStream << "\"];" << std::endl; } for (auto &placePtr : trans->getInhibitionPlaces()) { - outStream << "\t" << placePtr->getName() << " -> " << trans->getName() << "[label=\"inhibition:" << + outStream << "\t" << placePtr->getName() << " -> " << trans->getName() << "[arrowhead=\"dot\", label=\"" << trans->getInhibitionArcMultiplicity(*placePtr); outStream << "\"];" << std::endl; } @@ -134,13 +133,13 @@ namespace storm { for (auto& trans : this->getTimedTransitions()) { for (auto &placePtr : trans->getInputPlaces()) { - outStream << "\t" << placePtr->getName() << " -> " << trans->getName() << "[label=\"normal:" << + outStream << "\t" << placePtr->getName() << " -> " << trans->getName() << "[label=\"" << trans->getInputArcMultiplicity(*placePtr); outStream << "\"];" << std::endl; } for (auto &placePtr : trans->getInhibitionPlaces()) { - outStream << "\t" << placePtr->getName() << " -> " << trans->getName() << "[label=\"inhibition:" << + outStream << "\t" << placePtr->getName() << " -> " << trans->getName() << "[arrowhead=\"dot\", label=\"" << trans->getInhibitionArcMultiplicity(*placePtr); outStream << "\"];" << std::endl; } @@ -154,7 +153,7 @@ namespace storm { outStream << "}" << std::endl; } - + void GSPN::setName(std::string const& name) { this->name = name; }