## 3 Results
### Example of Scenario States Visualization
#### 3.2.2 Using the Algorithm to Construct Scenario States  
The walk \(S_{0}\xrightarrow{f_{1}}S_{1}\xrightarrow{f_{3}}S_{2}\xrightarrow{f_{5}}S_{4} \xrightarrow{f_{8}}S_{5}\) can be presented as:  
\[W=\{(0,f_{1}),(1,f_{3}),(2,f_{5}),(3,f_{8})\}\]  
\begin{table}
\begin{tabular}{c c c c} \hline \hline
**Input State** & **Label** & **Output State** & **Par \& Res** \\ \hline \multirow{4}{*}{\(\xrightarrow{\text{\tiny{$\begin{array}{c}\text{\tiny{$\begin{array}{c}\text{ \tiny{$\begin{array}{c}\text{\tiny{$\begin{array}{c}\text{\tiny{$\begin{array}{c} \text{\tiny{$\begin{array}{c}  
A linear order relation on the set \(W\) has the form:  
\[<_{W}=\left\{ \begin{aligned} ((0,f_{1}),(1,f_{3})),((0,f_{1}),(2,f_{ 5})),((0,f_{1}),(3,f_{8})),\\ ((1,f_{3}),(2,f_{5})),((1,f_{3}),(3,f_{8})),\\ ((2,f_{5}),(3,f_{8}))\end{aligned} \right\}\]  
Assuming that execution of each reaction rules takes one unit of time, in Phase 2 the consecutive elements of set \(W\) will be transformed to the following form:  
* \(e_{1}=(0,f_{1},\{(0,0),(2,1),(3,2)\},\{(0,0),(1,1),(2,2),(3,3),(4,4)\},5,(\{2,1))\)
* \(e_{2}=(1,f_{3},\{(3,0),(2,1),(4,2)\},\{(0,0),(3,1),(2,2),(1,3),(4,4)\},5,(\{2,1))\)
* \(e_{3}=(2,f_{5},\{(0,0),(1,1),(3,2)\},\{(0,3),(1,4),(2,2),(3,0),(4,1)\},5,(\{1 \},1))\)
* \(e_{4}=(3,f_{8},\{(3,0),(1,1),(4,2)\},\{(0,0),(1,2),(2,4),(3,1),(4,3)\},5,(\{1 \},1))\)  
Knowing the above, we can define an extended walk. \[W_{M}=\{e_{1},e_{2},e_{3},e_{4}\}\]  
The linear order relation remains unchanged between elements, i.e. :  
\[<_{W_{M}}=\{(e_{1},e_{2}),(e_{1},e_{3}),(e_{1},e_{4}),(e_{2},e_{3}),(e_{2},e_{4 }),(e_{3},e_{4})\}\]  
Steps of the algorithm to construct the subsequent scenario states are presented in Table 18. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Phase** & **Step** & **Result/Comment** \\ \hline \(1\) & \(S_{r}=S_{r}\cup\{((d-1,s,m_{s},i_{s}))\}\) & \(S_{r}=\left\{\begin{pmatrix}0,&\raisebox{-1.0 pt}{\includegraphics[height=1.0 pt]{ -1.0 pt}}\\ \{(0,0),(1,1),(2,2),(3,3),(4,4)\},\\ ((1,0),(2,0))\end{pmatrix}\right\}\) \\ \hline \(1\) & \(\underline{Phase3(\dots)}\) & \\ \hline \(3\) & \(n_{w},t_{f},m_{r},m_{full},n_{x},(A_{d},n_{d}),W_{c}=First_{M}(W_{c})\) & \(n_{w}=0\) \\  & \(t_{f}=f_{1}\) \\  & \(m_{r}=\{(0,0),(2,1),(3,2)\}\) \\  & \(m_{full}=\{(0,0),(3,1),(2,2),(1,3),(4,4)\}\) \\  & \(n_{x}=5\) \\  & \(A_{d}=\{2\}\) \\  & \(n_{d}=1\) \\  & \(W_{c}\ =\) \\  & \(W_{c}\ \setminus\ \{e_{1}\}\ =\) \\  & \(\{e_{2},e_{3},e_{4}\}\) \\ \hline \(3\) & \(i_{n}=Objects_{U}(i_{c},(A_{d},n_{d}))\) & \(i_{n}=((1,0),(2,1))\) \\ \hline \(3\) & \(A_{f}=Objects_{F}(i_{n},d)\) & \(A_{f}=\emptyset\) \\ \hline \(3\) & \(t_{tra}=Corr_{Tra}(t_{f})\) & \(t_{tra}=\text{first row of Table 17}\) \\ \hline \(3\) & \(i_{c}=i_{n}\) & \(i_{c}=((1,0),(2,1))\) \\ \hline \(3\) & \(r=Corr_{\mathcal{R}}(t_{tra})\) & \(r=\text{reaction rule }r1\) \\ \hline \(3\) & \(result=Phase4(s_{c},m_{c},r,s_{0},m_{0},n_{x})\) & Phase 4 completed without error \\ \hline \hline \end{tabular}
\end{table} 
Table 18: Successive steps of the algorithm in the example of visualizing a scenario. The result of the algorithm contains a state where both robots are in \(AT2\) area despite the fact that the walk has not passed through such state. A Gantt diagram for this scenario is shown in Figure 10. Both robots are performing actions \(r1\) and \(r2\) in parallel. Functions tupplied with each state allow to \"track\" task elements between states. For example, the function \(m_{s}=(0,0),(1,1),(2,2),(3,3),(4,4)\) for the state at time 0 indicates that the object tagged with the unique identifier 2 (the argument of \(m_{s}\) function) is represented by the vertex with identifier 2 (the value of \(m_{s}\) function for argument 2). The support of a bigraph itself does not track its elements between transitions, as can be seen by comparing the state of the system at time 0 and time 1.