## 4 Simulation of Traffic Jam Propagation and Dispersion  
Based on the definition provided above, we developed a time-step-based traffic simulation environment using MATLAB to model traffic jam propagation and dispersion. This simulation is built on the CTM, allowing for a detailed representation of realistic traffic dynamics. In Figure 5, we illustrate a two-way 8 \(\times\) 8 grid traffic network to demonstrate how traffic congestion spreads after an accident. In this 8 \(\times\) 8 grid network model, each pair of adjacent vertices (intersections) is connected by two unidirectional links (one for each direction of traffic flow). This bidirectional design ensures a realistic representation of urban grid networks, where vehicles move independently in opposing directions. In this network, all boundary nodes are considered start and end points. The inverted triangle in Figure 5 marks the location of an accident on link 161. The network is made up of 288 links, each divided into 11 cells. For a more detailed analysis of traffic behavior, each link is also split into two zones: (1) an upstream zone containing eight cells and (2) a downstream zone containing three cells. This structured approach allows for a more precise simulation of congestion dynamics and how traffic conditions evolve over time. For simplicity, the extended CTM parameters are set as in [14; 27]:  
Time interval: 5 s.  
_Jam density:_ 133 vehicles/km (7.5 m/vehicle). _Free-flow speed:_ 54 km/h (15 m/s). Backward shock-wave speed: 21.6 km/h (6 m/s). Number of lanes: two. _Flow capacity:_ 1800 vehicles/h/lane. _Cell length:_ 75 m, holding capacity: 20 vehicles. _Number of cells per link:_ nine (link length: 675 m). A cell is considered jammed as follows:  
The density in the upstream'reservoir' > 0.9 N.  
The density in any downstream direction > 0.9 k_j. We assume that the initial state of the 8 \(\times\) 8 grid road network is empty. For the purpose of comparison, the analysis period is set to 4000 time intervals, with an accident occurring in the central zone of the network, specifically at the fifth cell of link 161. A cell is considered jammed if its density exceeds 0.9 N [14]. To assess the effectiveness of different strategies, we use two traffic flow conditions, i.e., \(t_{d}\) = 0.75 and \(t_{d}\) = 0.8, where \(t_{d}\) represents  
Figure 5: A two-way 8 \(\times\) 8 grid traffic network. the number of vehicles per time interval. For example, \(t_{d}\) = 0.75 indicates that three vehicles enter each entrance every 20 s.  
Recently, [PERSON] et al. [10] introduced a two-level strategy, known as the Q-strategy, to prevent urban traffic congestion caused by accidents. This strategy assumes that when a ban signal is shown for a particular direction, \(d_{A}\)% of the vehicles will reroute and \(d_{B}\)% will reroute when a warning signal is displayed. The ban signal serves as the first level, stopping traffic from heading toward an accident, while the warning signal acts as the second level, advising drivers against taking that route. To enhance accident-based congestion prevention, we present an innovative three-level control strategy, the H-strategy, which employs ban and warning signals at adjacent intersections to redirect traffic away from the accident area. For consistency, in our simulation, we use the parameter values provided by [PERSON] et al. [10]. While their approach applies a ban signal at intersection A and a warning signal at intersection B, our method enforces ban signals at intersection A to halt accident-bound traffic and extends warning signals to adjacent intersections B and C, advising drivers to avoid the affected direction. In this study, we use \(d_{A}\), \(d_{B}\), and \(d_{C}\) to denote the percentage of vehicles rerouting at intersections A, B, and C, respectively. We present two examples to illustrate the behavior of the traditional and calibrated CTM methods under different conditions.