simplepetrinetprocess.tex 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. %\begin{tikzpicture}[node distance=1.1cm,>=stealth',bend
  2. %angle=45,auto,scale=0.50,transform shape]
  3. \begin{tikzpicture}[node distance=1.1cm,>=stealth',bend
  4. angle=45,auto,scale=1,transform shape]
  5. \tikzstyle{place}=[circle,thick,draw=red!75,fill=red!20,minimum size=5mm]
  6. \tikzstyle{transition}=[rectangle,thick,draw=blue!75,
  7. fill=blue!20,minimum size=4mm]
  8. \tikzstyle{every label}=[black]
  9. \begin{scope}
  10. % Petri net root
  11. \node [place] (ppr1) [tokens=1]{};%,xshift=14.5cm]{};
  12. %\node at (ppr1.west) [inner sep=1mm,label=above:{$p_{ready}$},xshift=-2mm] {};
  13. \node at (ppr1.north) [above, inner sep=2.5mm] {\textbf{P$_{root}$}};
  14. \node [transition] (tpr1) [below of=ppr1] {}
  15. edge [pre] (ppr1)
  16. ;
  17. \node [place] (ppr2) [below of=tpr1] {}
  18. edge [pre] (tpr1)
  19. ;
  20. \node [transition] (tpr2) [below of=ppr2] {}
  21. edge [pre] (ppr2)
  22. ;
  23. \node [place] (ppr3) [below of=tpr2] {}
  24. edge [pre] (tpr2)
  25. ;
  26. % Petri net A
  27. %%\node [place] (p1) [tokens=0,label=right:{$p_{ready}$}] [xshift=-12cm]{}
  28. \node [place] (pa1) [tokens=0,xshift=3cm]{} %[xshift=12.2cm] {};
  29. edge [pre,bend right,dash pattern=on 2pt off 2pt,black!50!black] (tpr1);
  30. \node at (pa1.north) [above, inner sep=3mm] {\textbf{A}};
  31. \node [transition] (ta1) [below of=pa1] {}
  32. edge [pre] (pa1)
  33. ;
  34. %%in order to center tstart transition
  35. \node [place] (p) [below of=ta1,circle,draw=white,fill=white] {};
  36. \node [place] (pa2) [left of=p] {}
  37. edge [pre] (ta1)
  38. ;
  39. \node [place] (pa3) [right of=p] {}
  40. edge [pre] (ta1)
  41. ;
  42. \node at (pa3.west) [left] {{$p_{started}$}};
  43. \node [transition] (ta2) [below of=pa2] {}
  44. edge [pre] (pa2)
  45. ;
  46. \node [place] (pa4) [below of=ta2] {}
  47. edge [post,bend left,dash pattern=on 2pt off 2pt,black!50!black] (tpr2)
  48. edge [pre] (ta2)
  49. ;
  50. % Petri net B
  51. \node [place] (pb1) [tokens=0,xshift=7cm]{}% [xshift=8.9cm]{};
  52. edge [pre,bend right,dash pattern=on 2pt off 2pt,black!50!black] (tpr1);
  53. \node at (pb1.north) [above, inner sep=3mm] {\textbf{B}};
  54. \node [transition] (tb1) [below of=pb1] {}
  55. edge [pre] (pb1);
  56. %%in order to center tstart transition
  57. \node [place] (pp) [below of=tb1,circle,draw=white,fill=white] {};
  58. \node [place] (pb2) [left of=pp] {}
  59. edge [pre] (tb1)
  60. ;
  61. \node [place] (pb3) [right of=pp] {}
  62. edge [pre] (tb1)
  63. ;
  64. \node [transition] (tb2) [below of=pb2] {}
  65. edge [pre] (pb2) ;
  66. \node at (tb2.east) [right] {{$t_{finish}$}};
  67. \path (pa3) edge [post,bend left,green!50!black,thick] node
  68. [xshift=-0.5cm,yshift=-0.5cm,green!50!black]{s2f} (tb2);
  69. \node [place] (pb4) [below of=tb2] {}
  70. edge [post,bend left,dash pattern=on 2pt off 2pt,black!50!black] (tpr2)
  71. edge [pre] (tb2)
  72. ;
  73. %\node[draw,rectangle,inner sep=0.8cm,fit=(pb4) (ppr1) (ppr3)] (proot) {};
  74. \end{scope}
  75. \end{tikzpicture}
  76. %\caption{Complete Process described in the use case}