## 3 Petri Net Representation
### Transit Signal Priority Control Model  
In this section, the intersection given in Figure 1 is taken as an example. This intersection is structured for a TSP control system that includes four RSU sensors for detecting transit vehicles in each direction. An interesting feature of the TSP control model is that the event representing that an approaching transit vehicle is detected has a stochastic characteristic. Intuitively speaking, we cannot predetermine when, in which road section, and at which phase, there will be an approaching transit vehicle. In HCPN-based TSP model, while a transit vehicle is traveling through the crossing zone, three spectacle situations could happen in the TSP control systems. We describe in detail how they operate by considering both the trajectory of transit vehicle and traffic light state while a transit vehicle is detected. The HCPNs in Figure 3 model the complete operation of priority strategies handled by the traffic signal controller while the transit vehicle goes straight through the crossing zone. In the proposed model, the colors of the potential tokens must satisfy the expressions associated with the colors in the arc expressions. The colors and variables used to describe the information required in the relevant places and arcs are summarized in Table 1. Furthermore, in order to improve the readability, we denote EW and NS as directions, including east-westbound and north-southbound, and GS and TL as the behavior of a transit vehicle at the intersection such as go-straight (including turn-right) and turn-left, as well as AR, R, G, Y as traffic lights, such as all-in-red, red, green, and yellow. The physical meanings of places and transitions are explained in Table 2. The parameters used in the HCPNs are set as follows: \(T_{G}=27\) s, \(T_{Y}=3\) s, \(T_{R}=90\) s, \(T_{AR}=2\) s, \(D_{RSUI}=100\) m, \(V_{tv}=10\) m/s, \(T_{\delta\_gt}=5\) s, and \(T_{\delta\_rt}=5\) s.  
In order to reduce the complexity of the proposed model further, we model the TSP control in two levels with one module at the upper level and six sub-modules at the lower level, which represent the detailed process of traffic lights in each phase, respectively. In Figure 3a, there are six aggregated transitions (phase1 to phase4, green extension, and red truncation), which are represented by boxes with double-line borders. Each aggregated transition has a submodule related to it. Essentially, a submodule presents a more detailed view of the behavior represented by the aggregated transition. Here, these six aggregated transitions correspond to the submodules shown in Figure 3b-g, respectively. Two transitions in Figures 3f and 4g, green extension and red truncation, model the TSP control system's interfaces. Therefore, a transit vehicle's priority request can be transferred to the signal controller through them. Technically, with the help of these transitions and two groups of places [EW_GS_G, EW_TL_R, NS_GS_R, NS_TL_R] and [EW_GS_R, EW_TL_R, NS_GS_R, NS_TL_G], two priority strategy models can be incorporated into the normal traffic signal control model to handle the priority request initiated by one or more approaching transit vehicles. In Figure 3f, we depict the proposed green extension strategy in the CPN model. The physical meanings of places and transitions are illustrated in Table 2. For example, the northbound and southbound go-straight and turn-left lights are red, the eastbound and westbound turn-left lights are red, only the eastbound and westbound go-straight lights are green and the residual time is between six to 10 s. At this moment, if an approaching transit vehicle is detected, then the green extension strategy can be considered, as shown in arc expressions in Figure 3f:  
_if (0<=t-EGtick) and also (t-EGtick < 5) then 1'(glt,EGtick + 5) else 1'(glt,EGtick)_