petrinetusecase.tex 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211
  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 angle=45,auto,transform shape]
  4. %\begin{tikzpicture}[node distance=1.1cm,>=stealth',bend angle=45,auto,scale=0.9,transform shape]
  5. \begin{tikzpicture}[node distance=1.1cm,>=stealth',bend angle=45,auto,scale=1.0,transform shape]
  6. \tikzstyle{place}=[circle,thick,draw=red!75,fill=red!20,minimum size=5mm]
  7. \tikzstyle{transition}=[rectangle,thick,draw=blue!75,
  8. fill=blue!20,minimum size=4mm]
  9. \tikzstyle{every label}=[black]
  10. \begin{scope}
  11. %% \begin{scope} %% at (5cm, 0) %%
  12. % Petri net C
  13. \node [place] (pc1) [tokens=0,draw=red!45,fill=red!10] [xshift=0cm]{}
  14. ;
  15. \node at (pc1.north) [above, inner sep=3mm] {\textbf{C}};
  16. \node [transition] (tc1) [below of=pc1,draw=blue!45,fill=blue!10] {}
  17. edge [pre,black!45] (pc1)
  18. ;
  19. %%in order to center tstart transition
  20. \node [place] (ppp) [below of=tc1,circle,draw=white,fill=white] {};
  21. \node [place] (pc2) [left of=ppp,draw=red!45,fill=red!10] {}
  22. edge [pre,black!45] (tc1)
  23. ;
  24. \node [place] (pc3) [right of=ppp,draw=red!45,fill=red!10] {}
  25. edge [pre,black!45] (tc1)
  26. ;
  27. \node [transition] (tc2) [below of=pc2,draw=blue!45,fill=blue!10] {}
  28. edge [pre,black!45] (pc2)
  29. ;
  30. %\node [place] (pc4) [below of=tc2,draw=red!45,fill=red!10,label=right:{$p_{finished}$}] {}
  31. \node [place] (pc4) [below of=tc2,draw=red!45,fill=red!10] {}
  32. edge [pre,black!45] (tc2)
  33. ;
  34. \node at (pc4.east) [right] {{$p_{finished}$}};
  35. %% \end{scope}
  36. %% \begin{scope}%% at (5cm, 0) %% [xshift=3cm]
  37. % Petri netD
  38. \node [place] (pd1) [tokens=0,draw=red!45,fill=red!10] [xshift=3.3cm]{}
  39. ;
  40. \node at (pd1.north) [above, inner sep=3mm] {\textbf{D}};
  41. \node [transition] (td1) [below of=pd1,draw=blue!45,fill=blue!10] {}
  42. edge [pre,black!45] (pd1)
  43. % edge [pre,bend right,green!45!black!45] (pc4)
  44. ;
  45. \node at (td1.east) [right] {{$t_{start}$}};
  46. \path (td1) edge [pre,bend right,green!45!black!45,thick] node [below,green!45!black!45]{f2s} (pc4);
  47. %%in order to center tstart transition
  48. \node [place] (pppp) [below of=td1,circle,draw=white,fill=white] {};
  49. \node [place] (pd2) [left of=pppp,draw=red!45,fill=red!10] {}
  50. edge [pre,black!45] (td1)
  51. ;
  52. \node [place] (pd3) [right of=pppp,draw=red!45,fill=red!10] {}
  53. edge [pre,black!45] (td1)
  54. ;
  55. \node [transition] (td2) [below of=pd2,draw=blue!45,fill=blue!10] {}
  56. edge [pre,black!45] (pd2)
  57. ;
  58. \node [place] (pd4) [below of=td2,draw=red!45,fill=red!10] {}
  59. edge [pre,black!45] (td2)
  60. ;
  61. % Petri net child
  62. \node [place] (ppc1) [tokens=0,draw=red!45,fill=red!10] [xshift=5.6cm]{}
  63. %,label=left:{$p_{started}$}]
  64. ;
  65. %\node at (ppc1.west) [inner sep=0.5mm,label=above:{$p_{ready}$},xshift=-3mm] {};
  66. \node at (ppc1.west) [inner sep=0.5mm,above,xshift=-3mm,yshift=1mm] {{$p_{ready}$}};
  67. \node at (ppc1.north) [above, inner sep=3mm] {\textbf{P$_{child}$}};
  68. \node [transition] (tpc1) [below of=ppc1,draw=blue!45,fill=blue!10] {}
  69. edge [pre,black!45] (ppc1)
  70. edge [post,bend right,dash pattern=on 2pt off 2pt,black!50!black] (pc1)
  71. edge [post,bend right,dash pattern=on 2pt off 2pt,black!50!black] (pd1)
  72. ;
  73. \node [place] (ppc2) [below of=tpc1,draw=red!45,fill=red!10] {}
  74. edge [pre,black!45] (tpc1)
  75. ;
  76. \node [transition] (tpc2) [below of=ppc2,draw=blue!45,fill=blue!10] {}
  77. edge [pre,black!45] (ppc2)
  78. %% edge [pre,bend right,green!50!black] (pc4)
  79. edge [pre,bend right,dash pattern=on 2pt off 2pt,black!50!black] (pc4)
  80. edge [pre,bend right,dash pattern=on 2pt off 2pt,black!50!black] (pd4)
  81. ;
  82. %\node [place] (ppc3) [below of=tpc2,draw=red!45,fill=red!10,label=left:{$p_{finished}$}] {}
  83. \node [place] (ppc3) [below of=tpc2,draw=red!45,fill=red!10] {}
  84. edge [pre,black!45] (tpc2)
  85. ;
  86. \node at (ppc3.west) [left] {$p_{finished}$};
  87. %% \begin{scope}%% at (5cm, 0) %% [xshift=3cm]
  88. % Petri net B
  89. \node [place] (pb1) [tokens=0] [xshift=8.9cm]{}
  90. ;
  91. \node at (pb1.north) [above, inner sep=3mm] {\textbf{B}};
  92. %\node [transition] (tb1) [below of=pb1,label=left:{$t_{start}$}] {}
  93. \node [transition] (tb1) [below of=pb1] {}
  94. edge [pre] (pb1)
  95. edge [post,bend right,dash pattern=on 2pt off 2pt,black] (ppc1)
  96. ;
  97. \node at (tb1.west) [left] {{$t_{start}$}};
  98. %%in order to center tstart transition
  99. \node [place] (pp) [below of=tb1,circle,draw=white,fill=white] {};
  100. \node [place] (pb2) [left of=pp] {}
  101. edge [pre] (tb1)
  102. ;
  103. \node [place] (pb3) [right of=pp] {}
  104. edge [pre] (tb1)
  105. ;
  106. %\node [transition] (tb2) [below of=pb2,label=right:{$t_{finish}$}] {}
  107. \node [transition] (tb2) [below of=pb2] {}
  108. edge [pre] (pb2)
  109. edge [pre,bend right,dash pattern=on 2pt off 2pt,black] (ppc3)
  110. ;
  111. \node at (tb2.east) [right] {{$t_{finish}$}};
  112. \node [place] (pb4) [below of=tb2] {}
  113. edge [pre] (tb2)
  114. ;
  115. %% \end{scope}
  116. % Petri net A
  117. %%\node [place] (p1) [tokens=0,label=right:{$p_{ready}$}] [xshift=-12cm]{}
  118. \node [place] (pa1) [tokens=0] [xshift=12.2cm]{}
  119. ;
  120. \node at (pa1.north) [above, inner sep=3mm] {\textbf{A}};
  121. \node [transition] (ta1) [below of=pa1] {}
  122. edge [pre] (pa1)
  123. ;
  124. %%in order to center tstart transition
  125. \node [place] (p) [below of=ta1,circle,draw=white,fill=white] {};
  126. \node [place] (pa2) [left of=p] {}
  127. edge [pre] (ta1)
  128. ;
  129. %\node [place] (pa3) [right of=p,label=left:{$p_{started}$}] {}
  130. \node [place] (pa3) [right of=p] {}
  131. edge [pre] (ta1)
  132. % edge [post,bend right,green!50!black] (tb1)
  133. ;
  134. \node at (pa3.west) [left] {{$p_{started}$}};
  135. \path (pa3) edge [post,bend right,green!50!black,thick] node [green!50!black]{s2s} (tb1);
  136. \node [transition] (ta2) [below of=pa2] {}
  137. edge [pre] (pa2)
  138. ;
  139. \node [place] (pa4) [below of=ta2] {}
  140. edge [pre] (ta2)
  141. ;
  142. %% \end{scope}
  143. % Petri net root
  144. \node [place] (ppr1) [tokens=1,xshift=14.5cm]{}%label=right:{$p_{ready}$}] [
  145. ;
  146. %\node at (ppr1.west) [inner sep=1mm,label=above:{$p_{ready}$},xshift=-2mm] {};
  147. \node at (ppr1.north) [above, inner sep=3mm] {\textbf{P$_{root}$}};
  148. \node [transition] (tpr1) [below of=ppr1] {}
  149. edge [pre] (ppr1)
  150. edge [post,bend right,dash pattern=on 2pt off 2pt,black!50!black] (pa1)
  151. edge [post,bend right,dash pattern=on 2pt off 2pt,black!50!black] (pb1)
  152. ;
  153. \node [place] (ppr2) [below of=tpr1] {}
  154. edge [pre] (tpr1)
  155. ;
  156. \node [transition] (tpr2) [below of=ppr2] {}
  157. edge [pre] (ppr2)
  158. edge [pre,bend left,dash pattern=on 2pt off 2pt,black!50!black] (pb4)
  159. edge [pre,bend left,dash pattern=on 2pt off 2pt,black!50!black] (pa4)
  160. ;
  161. \node [place] (ppr3) [below of=tpr2] {}
  162. edge [pre] (tpr2)
  163. ;
  164. \node[draw,rectangle,black!40!black!40,inner sep=0.2cm,fit=(ppc1) (ppc1) (pc4)] (pchild) {};
  165. \node[draw,rectangle,inner sep=0.6cm,fit=(pchild) (ppr1) (ppr3)] (proot) {};
  166. %%\node at (pchild.north west) [above, inner sep=1mm] [xshift=0.4cm] {P$_{child}$};
  167. %%\node at (proot.north east) [above, inner sep=1mm] [xshift=-0.4cm] {P$_{root}$};
  168. \end{scope}
  169. \end{tikzpicture}
  170. %\caption{Complete Process described in the use case}