## 4 Methods
### Case Study Simulation in Unity
#### 4.2.2 Trucks' Travel Priorities
All possible simulation scenarios for the cubes' travel paths are listed in \[t_{i+1}=t_{i}+\frac{\left|path_{i+1}-path_{i}\right|}{speed}\ \ ;\ \ i=0,\,1 \ldots,n \tag{4}\]1 For instance, Figure 15 illustrates a scenario when the cube's arrival follows the number (2) scenario, and the cube's exit follows the number (7) scenario, while \((\theta_{1}\leq 90^{\circ})\). \[t_{i+1}=t_{i}+\frac{\left|path_{i+1}-path_{i}\right|}{speed}\ \ ;\ \ i=0,\,1 \ldots,n \tag{4}\]2 Modeling the conflicting area along the travel paths of the cubes. \[t_{i+1}=t_{i}+\frac{\left|path_{i+1}-path_{i}\right|}{speed}\ \ ;\ \ i=0,\,1 \ldots,n \tag{4}\]3 Calculations of the precise time of cubes’ arrival at each of the critical points. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**No.** & **Description** & **Formula** \\ \hline \multirow{4}{*}{(1)} & \((p_{i-1})\) is not located between \(\big{(}p_{stop}\big{)}\) and \((P_{intersection})\) & \(Length_{1}\leq\) & \(P_{intersection}-p_{i-1}\) \\  & \((q_{j-1})\) is not located between \(\big{(}q_{stop}\big{)}\) and \((P_{intersection})\) & \(Length_{2}\leq\) & \(P_{intersection}-q_{j-1}\) \\ \hline \multirow{4}{*}{(2)} & \((p_{i-1})\) is located between \(\big{(}p_{stop}\big{)}\) and \((P_{intersection})\) & \(Length_{1}>\) & \(P_{intersection}-p_{i-1}\) \\  & \((q_{j-1})\) is not located between \(\big{(}q_{stop}\big{)}\) and \((P_{intersection})\) & \(Length_{2}\leq\) & \(P_{intersection}-q_{j-1}\) \\ \hline \multirow{4}{*}{(3)} & \((p_{i-1})\) is not located between \(\big{(}p_{stop}\big{)}\) and \((P_{intersection})\) & \(Length_{1}\leq\) & \(P_{intersection}-p_{i-1}\) \\  & \((q_{j-1})\) is located between \(\big{(}q_{stop}\big{)}\) and \((P_{intersection})\) & \(Length_{2}>\) & \(P_{intersection}-q_{j-1}\) \\ \hline \multirow{4}{*}{(4)} & \((p_{i-1})\) is located between \(\big{(}p_{stop}\big{)}\) and \((P_{intersection})\) & \(Length_{1}>\) & \(P_{intersection}-p_{i-1}\) \\  & \((q_{j-1})\) is located between \(\big{(}q_{stop}\big{)}\) and \((P_{intersection})\) & \(Length_{2}>\) & \(P_{intersection}-q_{j-1}\) \\ \hline \multirow{4}{*}{(5)} & \((p_{i})\) is not located between \((p_{exit})\) and \((P_{intersection})\) & \(Length_{3}\leq\) & \(p_{i}-P_{intersection}\) \\  & \((q_{j})\) is not located between \((q_{exit})\) and \((P_{intersection})\) & \(Length_{4}\leq\) & \(q_{j}-P_{intersection}\) \\ \hline \multirow{4}{*}{(6)} & \((p_{i})\) is located between \((p_{exit})\) and \((P_{intersection})\) & \(Length_{3}>\) & \(p_{i}-P_{intersection}\) \\  & \((q_{j})\) is not located between \(exit\) and \((P_{intersection})\) & \(Length_{4}\leq\) & \(q_{j}-P_{intersection}\) \\ \hline \multirow{4}{*}{(7)} & \((p_{i})\) is not located between \((p_{exit})\) and \((P_{intersection})\) & \(Length_{3}\leq\) & \(p_{i}-P_{intersection}\) \\  & \((q_{j})\) is located between \((q_{exit})\) and \((P_{intersection})\) & \(Length_{4}>\) & \(q_{j}-P_{intersection}\) \\ \hline \multirow{4}{*}{(8)} & \((p_{i})\) is located between \((p_{exit})\) and \((P_{intersection})\) & \(Length_{3}\leq\) & \(p_{i}-P_{intersection}\) \\  & \((q_{j})\) is located between \((q_{exit})\) and \((P_{intersection})\) & \(Length_{4}\leq\) & \(q_{j}-P_{intersection}\) \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Possible simulation scenarios for the cubes’ travel paths. \[Length_{1} =\frac{K_{x}}{2}+\frac{L_{x}}{2\sin\theta_{2}}+\frac{K_{x}}{2\left| \tan\theta_{2}\right|}\longrightarrow\ t_{1}=PointToTime(p_{stop}) \tag{18}\] \[Length_{2} =\frac{L_{z}}{2}+\frac{K_{x}}{2\sin\theta_{1}}+\frac{L_{x}}{2\left| \tan\theta_{1}\right|}\longrightarrow\ s_{1}=PointToTime(q_{stop})\] (19) \[\left\{ \begin{aligned} & Length_{3_{1}}=\frac{K_{x}}{2}+\frac{L_{x}}{2 \sin\theta_{1}}+\frac{K_{x}}{2\left|\tan\theta_{1}\right|}\rightarrow\ P_{ \text{exit}_{1}}\\ & Length_{3_{2}}=\frac{K_{x}}{2}+\frac{L_{x}}{2\sin\theta_{3}}+ \frac{K_{x}}{2\left|\tan\theta_{3}\right|}\rightarrow\ P_{\text{exit}_{2}} \Longrightarrow\ t_{2}=\max\{\text{PointToTime}(P_{\text{exit}_{1}}),\text{ PointToTime}(P_{\text{exit}_{2}})\}\end{aligned}