## 4 Simulation and Analysis of HCPN Based TSP Model  
### Simulation of HCPN Based TSP Model  
The simulation of HCPN-based TSP model is conducted in CPN Tools [34]. Multiple CPN modules at the upper and lower levels share tokens by socket-port pairs, which relates the port places of the submodule to the socket places of the aggregated transition. This means that related port and socket places always share the same marking. For example, NS_GS_R in Figure 3b is an output socket for aggregated transition phase1, an input socket for aggregated transition phase3 in Figure 3d, and an input/output socket for aggregated transition phase2 in Figure 3c. In the phase1 submodule, there  
\begin{table}
\begin{tabular}{c c c} \hline
**Element** & **Type** & **Meaning** \\ \hline EW\_GS\_X & Place & \(\mathsf{X}\in\{AR,G,Y,R\}\), the eastbound and westbound go-straight \\  & & split is all-in-red, green, yellow, or red. \\ \hline EW\_TL\_X & Place & \(\mathsf{X}\in\{AR,G,Y,R\}\), the eastbound and westbound turn-left \\  & & light is all-in-red, green, yellow, or red. \\ \hline NS\_GS\_X & Place & \(\mathsf{X}\in\{AR,G,Y,R\}\), the northbound and southbound \\  & & go-straight light is all-in-red, green, yellow, or red. \\ \hline NS\_TL\_X & Place & \(\mathsf{X}\in\{AR,G,Y,R\}\), the northbound and southbound turn-left \\  & & light is all-in-red, green, yellow, or red. \\ \hline Init & Place & Store a token, used to trigger all-in-red lights. \\ \hline Transit Priority Request & Place & Different types of transit priority request, one is for green \\  & & extension, another is for red truncation. \\ \hline EW\_GS\_GE & Place & \
\begin{tabular}{c} The east-westbound go-straight direction is green light, and a \\ transit vehicle is detected in this direction. \\ \end{tabular} \\ \hline EW\_GS\_RT & Place &
\begin{tabular}{c} The east-westbound go-straight direction is red light, and a \\ transit vehicle is detected in this direction. \\ \end{tabular} \\ \hline enter all\_in\_red & Transition & Changing traffic signal to all-in-red state. \\ \hline phase1, phase2, phase3, phase4 & Transition & Switch to each phase respectively. \\ \hline  & Transition & Countdown of light time of all-in-red signal. \\ \hline c2, c3, c4, c5 & Transition & Countdown of green/red light in each phase. \\ \hline c21, c31, c41, c51 & Transition & Countdown of yellow light in each phase. \\ \hline t21, c31, c41, c51 & Transition & Changing traffic signal from green to yellow. \\ \hline t6 & Transition & Return to the initial state. \\ \hline Init1/Init2 & Transition & Triggering the different transit priority strategies. \\ \hline green extension & Transition & Adopting the green extension strategy. \\ \hline red truncation & Transition & Adopting the red truncation strategy. \\ \hline \end{tabular}
\end{table}
Table 2: Physical meaning of places and transitions in Figure 3.  
Figure 3: The Hierarchical Colored Petri nets (HCPN) model of transit signal priority control for public transit going straight through the crossing zone: (**a**) top-level signal control CPN model; (**b**) details of phase1 module; (**c**) details of phase2 module; (**d**) details of phase3 module; (**e**) details of phase4 module; (**f**) details of green extension module; (**g**) details of red truncation module.  
are six transitions: enter all_in_red, c1, phase1, c2, t21 and c21. Transition enter all_in_red is used to represent that the status of the red signals are in all-in-red state, which means that the red lights in eastbound, westbound, northbound and southbound should be turn on to forbid the incoming vehicles entering the crossing zone. A detailed description of the simulation process of HCPN-based TSP model can be found in Appendix A.  
In summary, the markings of the proposed model can be observed, and we can conclude that no place has an unbound number of tokens. Similar analysis can be applied to the scenario of a single transit line turning left through the intersection.