# A Microscopic On-Ramp Model Based on Macroscopic Network Flows
## 2 Methods
### Model Implementation  
We used SUMO to simulate the previously recorded traffic on an on-ramp in Germany (see Figure 2). SUMO is an extendable open-source traffic simulation software [39]. The road network was modeled using input data from OpenStreetMap. As a result, the simulated road has the same course, and the entry lane has the same length as in the real traffic scenario. The width of the lanes was consistently 3.0 m, and only the leftmost lane was 2.6 m wide. The microscopic model was implemented using SUMO's traffic control interface (TraCI). For the evaluation of the proposed flow-based model's performance, we also simulated traffic using the IDM [18] as the car-following model combined with [PERSON]'s model [40], which is the default lane change model in SUMO. For both the IDM and [PERSON]'s lane change model, we used the default model parameters of SUMO. The traffic demand was taken from a 15 min excerpt of the vehicle trajectory dataset of the real road section [34]. For both the microscopic flow-based model and IDM, we used four vehicle types: Passenger cars, vans, trucks, and buses. Our flow-based model employed vehicle positions and velocities that were extracted from SUMO at every time step (0.1 s). From the positions of the vehicles, the densities were computed as a moving average over 15 s. The densities are the input for (3), which yields the flows. The flows were then used to compute the speeds for all individual vehicles according to (8). The speeds predicted by the models were afterwards fed back into SUMO to adapt the speeds of the vehicles in segments 1 to 3. Outside of these segments (in front of and behind the on-ramp), vehicles behaved according to the IDM.  
Although we modeled the driving behavior at on-ramps, our model does not explicitly contain lane changes. Instead, the car-following model implicitly ensures that lane changes are possible by letting the vehicles on the entry lane adapt to the vehicles on the right through lane and vice versa. The lane changes are triggered by SUMO's default lane change model [40], which ensures that lane changes are only conducted when there is a sufficient gap on the target lane. In the case of mandatory (also called strategic) lane changes, the model takes into account the speed, the remaining distance to the end of the lane, and the density on the current and target lane to determine when the lane change is executed. If the time until the merging vehicles reach the end of the on-ramp is smaller than the lane change duration (4 s), then the merging vehicles are forced to start a lane change using TraCI. This approach was used for both our model and the IDM, which allowed us to only evaluate the car-following properties of the two models.  
Microscopic traffic flow models can be calibrated on both the microscopic and the macroscopic scale. While microscopic calibration is potentially more accurate, macroscopic calibration is more robust and does not require detailed trajectory data. Therefore, we used macroscopic calibration in this study. The model parameters of the macroscopic model have been calibrated in a previous study [15]. The value of parameter \(\lambda\) in the FVDM was adopted from the literature [41] (\(\lambda=0.3\)). For the comparison scenario with the IDM, the default parameter values in SUMO were used.