petrinetmmodel.tex 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. %\begin{tikzpicture}[scale=0.7,transform shape]
  2. \begin{tikzpicture}[scale=1.0,transform shape]
  3. \begin{class}{PetriNet}{2,-0.5}
  4. \attribute{name : String}
  5. \end{class}
  6. \begin{class}[text width=2.5cm]{Arc}{1,3}
  7. \attribute{kind : ArcKind}
  8. \attribute{weight : Int}
  9. \end{class}
  10. \begin{abstractclass}{Node}{-5,0.7}
  11. \attribute{name : String}
  12. \end{abstractclass}
  13. \begin{class}{Place}{-2,-1}
  14. \inherit{Node}
  15. \attribute{marking : Int}
  16. \end{class}
  17. \begin{class}{Transition}{-8,-1}
  18. \inherit{Node}
  19. %\attribute{min\_time : Int}
  20. %\attribute{max\_time : Int}
  21. \end{class}
  22. \begin{enum}{ArcKind}{-7,3}
  23. \attribute{normal}
  24. \attribute{read\_arc}
  25. \end{enum}
  26. \composition{PetriNet}{nodes}{*}{Node}
  27. \unidirectionalAssociation{Node}{net}{1}{PetriNet}
  28. \composition{PetriNet}{arcs}{*}{Arc}
  29. \unidirectionalAssociation{Arc}{net}{1}{PetriNet}
  30. %\association{Arc}{source}{1}{Node}{0..*}{outgoings}
  31. \myassociation{Node}{source}{1}{Arc}{*}{outgoings}{-3,2.1}{0}
  32. %\association{Arc}{target}{1}{Node}{0..*}{incomings}
  33. \myassociation{Node}{target}{1}{Arc}{*}{incomings}{-2,0.8}{1}
  34. \end{tikzpicture}