## 4 Multi-Lane CTM Simulation Model  
This study performs simulation experiments on the proposed integrated control based on the multi-lane CTM model. In CTM, the road is divided into several equal-length cells along the direction of traffic flow. In the multi-lane CTM model, the highway consists of \(n\) segments \((i=1,2,\ldots n)\) of length \(l\). Each segment \(i\) is subdivided into \(m\) lanes \((j=1,2,\ldots,m)\). A lane cell can be indexed as \((i,j)\). In this paper, the initial segment is defined as \(i=1\), and the outermost lane is defined as \(j=1\). As shown in Figure 4, the traffic density of a three-lane highway model is updated using the density conservation formula in Equation (15):  
\[\rho_{i,j}(k+1)=\rho_{i,j}(k)+\frac{T}{l}\big{[}q_{i-1,j}(k)+r_{i,j}(k)-q_{i,j }(k)+f_{i,j+1,j}(k)+f_{i,j-1,j}(k)-f_{i,j,j-1}(k)-f_{i,j+1}(k)\big{]} \tag{15}\]  
Here, \(k\) represents the discrete time step; \(T\) is the aggregation period; \(q_{ij}(k)\) and \(r_{i,j}(k)\) denote the flow rates of the mainline cell and the on-ramp cell, respectively; and \(f(k)\) represents the lateral flow between lane cells. To adapt the multi-lane CTM for the purposes of this study, corresponding improvements have been made. For more detailed information, interested readers can refer to [37]. To facilitate the effective integration of the multi-lane CTM with the heterogeneous FACMAC algorithm, a ctm_sim class is developed in Python 3.9.13. This class encompasses the multi-lane CTM with the heterogeneous FACMAC algorithm, a ctm_sim class. The proposed multi-lane CTM is designed to be a multi-lane CTM with the heterogeneous FACMAC algorithm, a ctm_sim class. passes modules for basic parameter configuration and initialization, simulation execution, traffic demand generation, traffic state retrieval, and reward calculation. Among these, model initialization is critical to the accuracy and reliability of the simulation. Therefore, prior to each simulation, the scenario must be confirmed, and model parameters must be appropriately configured. In this study, the downward direction of the Jialiu section on the G15 Shenhai Expressway in Shanghai is selected as the research focus (indicated by the red arrow). A satellite image of the road is presented in Figure 5. The research scope includes two interchanges: Jialiu Interchange and Jiaxi Interchange. The Jialiu Interchange contains an entry ramp, while the Jiaxi Interchange includes both an entry ramp and an exit ramp. The two entry ramps are approximately 4.3 km in length. The mainline of the expressway primarily consists of three lanes, whereas the ramps typically feature one lane. Additionally, five pavement detectors are installed at specific stake points (highlighted in yellow) along the study segment. The construction and calibration of the multi-lane CTM are determined by two key factors: the road's geometric characteristics and the model's traffic parameters. For this study, the basic model parameters are set as follows: road length \(l=0.5\)km, number of lanes \(m=3\), and simulation time step \(k\), aggregated over an interval of \(T=15\)s. The calibration of the traffic parameters is conducted using a flow-density scatter plot at the bottleneck upstream of the entry ramp (KX1262350) (Figure 6). Initially, the critical density \(\rho^{cr}\) is determined by observing that it is smaller than a specific density threshold \(\rho^{a}\). Sample points satisfying \(\rho^{a}\) are identified, sorted in descending order of flow, and the top 3% of these points are selected. The mean density of the selected points is defined as the critical density \(\rho^{cr}=21\) veh/km/lane, while their mean flow is defined as the road capacity \(Q^{max}=1950\) veh/lane. Subsequently, all sample points are divided into two sets, a left set and a right set, based on \(\rho^{cr}\). Linear regression using the least squares method is applied to both sets.