{'fraction_non_alphanumeric': 0.030067209055535903, 'fraction_numerical': 0.009803426145838597, 'mean_word_length': 4.421917808219178, 'pattern_counts': {'":': 0, '<': 1, '<?xml version=': 0, '>': 1, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Transient situations in traffic flow: Modelling the Mexico City Cuernavaca Highway

In this paper a recent variable anticipation cellular automata model for single-lane traffic flow is extended to analyze the situation of free and congested flow in the Highway from Mexico City to Cuernavaca. This highway presents free flow in standard days; but in the returning day of long weekends or holidays it exhibits congested flow and in rush hours jamming appears. We illustrate how our CA model for traffic flow can deal appropriately with transient situations and can be used to search new alternatives that allow to improve the traffic flow in Mexican highways.


Introduction
Nowadays the life style of people living in big cities implies the requirement of fast individual or collective mobility. For this reason, the traffic flow has important relevance in the economy of a country. This has generated a constant search for models that capture the essentials of the dynamics of the transportation system. Clearly, traffic flow is a system far from equilibrium where a description of the transitions between jammed, congested, synchronized (platoons) and free flow is required [Chowdhury et al.(2000)]. Recently progress has been made in understanding traffic flow using statistical physics and cellular automata models [Chowdhury et al.(2000)], [Nagel and Schreckenberg(1992)], [Helbing and Huberman(1998)]. These models have turned out as excellent tools for the simulation of large scale traffic networks.
Cellular automata (CA) are agent-based simulations for complex natural systems containing large numbers of simple identical components which interact locally. There is an orderly lattice of sites, each with a finite set of possible values, in the cellular automata model. The value of the sites evolves synchronously in discrete time steps according to a particular set of rules. The value of a particular site is determined by the previous values of a neighbourhood of sites around it. This really simplifies the study of a complex system with many components and eases the process of analysis. Without the CA model, there would be infinitely many possible connections between components. The Nagel-Schreckenberg (NaSch) model [Nagel and Schreckenberg(1992)] considered the effects of acceleration and delay of vehicles with high speed. This model captures the realistic traffic situations where the car accelerates and decelerates. However, in this model, a simple single-lane CA is set up and anticipation effects that play a important role to elucidate the behavior of real traffic flow are not considered. Different models have been performed modifying the NaSch model. Recently, a new CA model including variable anticipation showed the existence of platoons travelling forwards depending on the anticipation strength, therefore opening new aspects to analyze in traffic flow [Lárraga et al.(2004)].
While a single-lane model gives a good analysis of traffic flow, it is not sufficient to depict the real world situations. As a result, two-lane traffic models based on cellular automata have been proposed in order to incorporate the rules able to deal systematically with multi-lane highways [Helbing and Huberman(1998), Knospe et al.(2002), Nagel et al.(1998)]. However the role of anticipation and multi-lane factors need to be deeply described. One can describe the two-lane flow using two single-lane systems and defining the corresponding lane changing rules for coupled sinks and sources for each lane [Chowdhury et al.(2000)].
Although most studies on CA models for traffic flow have been done for systems with periodic boundary conditions, open boundaries are relevant for many realistic situations in traffic where the number of vehicles can change, e.g., due to ramps or toll booths, as in the Mexico City-Cuernavaca Highway (MCH).
In this paper, firstly we extend a variable anticipation model proposed in ref. [Lárraga et al.(2004)] to consider multi-lane highways. The aim is to analyze the behavior of the MCH traffic flow to propose new alternatives to improve its management of traffic flow, where a congested flow is observed on days-off. For this purpose, we consider that vehicular traffic on a highway is controlled by a mixture of bulk and boundary effects caused by on-and off-ramps, varying number of lanes, speed limits and types of vehicles. The inclusion of this variety also opens new transitions and different behavior.
The organization of the paper is the following: In next section we present the modification of the one-lane variable anticipation model for traffic flow [Lárraga et al.(2004)] to describe multi-lane traffic flow under asymmetric lane change rules. Then we describe the schematic of the MCH considering entrances, exits and topology. We the proceed to present the main results of our simulations. Finally we close the paper with some concluding remarks.

The model
In this section, we briefly describe a recently introduced CA traffic flow model with variable anticipation [Lárraga et al.(2004)], where a single-lane CA is set up. This model has shown that it is able to reproduce the most important phenomena observed in real traffic flow. After defining the single-lane model, a very simple extension to a model multi-lane traffic flow is presented.

Single lane model
For the single-lane model, the length of the highway is divided in uniforms cells. Each cell represents the space that is enough to accommodate one vehicle. In the simulation model of this paper, the length of each cell is 7.5m. Each cell can be empty, or occupied by a vehicle i of N existing in a network, with an integer velocity v i ∈ {0, 1, · · · , v max }. The maximum velocity of vehicle v max is defined to be 5 cell-lengths, which corresponds to 37.5cell/s The number of unoccupied cells between a vehicle i and its preceding vehicle is defined as "gap" (denoted d i ). In a single-lane CA model for traffic flow, the following rules are applied to all N vehicles on the lattice in each iteration, which corresponds to 1 second of real time:

R1: Acceleration
If v i < v max , the velocity of the car i is increased by one, i.e., v i → min(v i + 1, v max ).

R2: Randomization
If v i > 0, the velocity of car i is decreased randomly by one unit with probability R, i.e., with a parameter 0 ≤ α ≤ 1, the velocity of car i is reduced to d s i . [x] denotes the integer part of x, i.e. [x + 1 2 ] corresponds to rounding x to the next integer value. The new velocity of the vehicle i is therefore R4: Vehicle movement Each car is moving forward according to its new velocity determined in steps 1-3, i.e., Rules R1, R2 and R3 are designed to update the velocity of vehicles; rule R4 updates position. While the single-lane model gives a good analysis of traffic flow, it is not sufficient to depict the real-world situations for highways with more than one lane. As a result, to carry out the aim of this paper a multi-lane model should be defined. In order to extend the model to multi-lane traffic one has to introduce lane-changing rules.

Multi-lane model
Therefore, in addition to the rules that apply to the single-lane model, there is also a rule for "lane-changing", which is a special characteristic of multilane traffic flow. In principle, all lane changing rule sets of cellular automaton models for traffic flow are formulated analogously. First, a vehicle needs an incentive to change a lane. Second, a lane change is only possible if some safety constraints are fulfilled. In this way, we have to first consider security such that there must be enough space on the target lane. Technically, one can say that the gap on the target lane in front of (behind) the vehicle that wants to change lanes should be safe. This is to ensure that after it has changed lane, neither will it crash into the vehicle in front of it, nor be crashed into by the following vehicles, in the target lane.
Besides, asymmetry for lane-changing is introduced if one applies different criteria for the change from left to right and right to left due to legal constraints. For instance, in Mexico, the right lane has to be used by default and passing has to be on the left; whereas in the United States, passing can be both on left or right.
A system update is performed in two sub-steps: In the first step the cars change the lanes according to the lane changing rules and do not move. In the second step, the cars move according to the calculated velocity. Both sub-steps are performed in parallel for all vehicles.
In this paper, we define the lane changing strategy based on driving laws for Mexico highways that lead to an asymmetry between the lanes: implies that it will brake for safety or just for comfort reasons. It is expressed by: Here we have introduced two times d s i /v i and d s′ i /v i that give the time intervals needed for a given vehicle to reach the position of its predecessor and for its predecessor on the destination lane. Since defined times take the velocity of the vehicles into account, slow vehicles are allowed to change the lane even at small distances.
Safety criterion Safety distance to the succeeding vehicle in the target lane is larger that the velocity of the succeeding vehicle to avoid it braking and producing an accident.
(d s su ≥ v su ) With these rules, we may describe the behavior of the multi-lane model. In the next section, this multi-lane model will be applied to analyze the Mexico City-Cuernavaca Highway (MCH) traffic flow. MCH is one of the most used highway on days-off. Its complex topology and high flow produces congestions and a great increase of travel time.
3 Modelling the Mexico City-Cuernavaca Highway MCH has a length of 64 Km and is composed by two flow directions, so called DI1 and DI2. However in this work we only will present simulation results corresponding to the direction D2 (from Cuernavaca to Mexico City) that is one of the most interesting to analyze. The vehicular traffic on the MCH is controlled by boundary effects caused by on-and off-ramps and toll booths. Thus, simulating the MCH we will consider the multi-lane model defined in this work on a lattice with open boundary conditions. Throughout the paper we assume that the vehicles move from left to the right. Therefore, vehicle injection is done at the left boundary (corresponding to in-flow into the road segment) and removal of vehicles at the right boundary (corresponding to outflow) the behavior of which is determined by a tool booth. We pay special attention to simulate adequately this behavior.

Figure 1: Schematic representation of Mexico City-Cuernavaca highway, direction DI2
A schematic representation of the analyzed system boundaries is depicted in Fig. 2 1 . We expanded the width of the left boundary from one single cell to a mini-system of width v max + 1. The allocation of the mini-system (left boundary) has to be updated every time step before the vehicles of the complete system. The update procedure consists of two steps. If one cell of the mini-system is occupied, it has to be emptied first. Then a vehicle with initial velocity v max (established according to the type of vehicle) is inserted with probability q in . Its position has to satisfy the following conditions: (i) The distance to the first car in the main system is at least equal to its corresponding maximum velocity v max , and (ii) the distance to the main system has to be minimal, i.e., if no vehicle is present in the main system within the first v max cells, the first cell of the boundary is occupied. On the other hand, the right boundary is realized by a single cell linked to the end of the system. Here the update is applied similar to the case of the left boundary before the general vehicle update procedure. First, the right boundary is cleared (if necessary) and then occupied with probability q out . This corresponds to an probability of 1 − q out that is established based on the maximum outflow (by second and lane) allowed by the toll booth. At last, cars are removed if their velocity is large enough to reach at least the (empty) boundary cell. According to reports of the Mexican Highway Office, in this analysis we take q out = 0.167 (outflow is approximately 3000veh/hr).
The on-and off-ramps existing in the MCH are implemented as connected parts of the lattice where the vehicles may enter or leave the system. The ramps activity is characterized by the number of vehicles that enter (or leave) the main system q inr (q our ) by time unit. Each time-step of simulation can add (or remove) vehicles as a function of the probability q inr . The length chosen for the on-and off-ramps and the distance between them is motivated by the dimensions found on the actual MCH: L ramp = 20 is the length of the ramps in units of the lattice constant (identified with 7.5 meters). The first cell corresponding to the on-ramp (out-ramp) is placed in x on (x of f ). for this reason in this paper we only analyze a section of highway (not a complete network), we made a successive search into the region corresponding to the on-ramp (from x on to x on + L ramp ) up to where empty car cell is found. Then a vehicle will be inserted in that cell. Note that this condition for insertion is possible in CA models because the defined deceleration process allows it. Out-ramp works in a similar way. In the simulation presented here, we consider 20% of q in as inflow in on-ramp and 5% of q in as outflow in the out-ramp.
Moreover, as we can see from the scheme for the MCH shown in Figure  1, this presents widening and narrowing points and also there is a dangerous curve where vehicles are forced to slow their velocities, thus in this section v max was reduced for both slow and fast vehicles. In this scheme the places referenced by D1,D2,...D18 that we will use to measure the fundamental variables of traffic flow in simulations are also indicated. It is important to say that these places are virtual, that is, these do not exist in the reality and they were defined based on the MCH topology (number of lanes, curves).

Simulation results
In order to simulate the MCH according to the model and descriptions done in previous sections, we consider two types of vehicles as a function of the value of the maximum velocity v vmax , slow and fast vehicles. The maximum speed of slow and fast vehicles is v max = 3 and v max = 5, respectively. We keep the cell size and time-step as those defined for the single lane model, that is 7.5m and 1s respectively. In this way, the number of cells of the system is obtained based on the real length of the MCH: L = length of the road (m) /cell length Besides, due to the agreement of data of simulation with the empirical fundamental diagram for single-lane model [Lárraga et al.(2004)] for notautomated vehicles, the values for parameters R and α are R = 0.2 and α = 0.75.
On the other hand, experience tells us that the traffic flow in the MCH is almost free flow in standard days, but during days-off or holidays jamming is observed in the direction DI2. This observed behavior is due to the fact  In this way, simulation starts with an inflow probability q in = 0.55 (2000 veh/hr/lanes). This inflow stays by 10 * L time-steps until a steady state is reached. After this steady state, inflow is varied according to the time periods shown in Table1. Note that the total time resulting from adding periods is equal to 6 hrs. that corresponding to an afternoon of a returning day of holidays (after 16:00 hr) where rush hours are reached.
In figure 3a) we show the local averaged density as a function of time (left axis) measured in detector D2. Time on the horizontal axis corresponds to the minutes passed from the first period of Table 1 started. The right axis indicates the variations of inflow. Note that the density varies according to the inflow. Of course, these inflow variations are noted by successive sections some time later, as we can see from figure 3b) corresponding to the detector D10. Results indicate that the D10 lasts approximately 15 minutes to note an increase of the inflow. Besides, it is very important to note that for both sections (D1 and D10) the jamming never is reached under the inflow proposed in Table 1.
On the other hand, in figure 4a), we show the local average density in the detector D17. This position is just placed before the toll booth. We observe clearly that before minute 135 the state of flow is free (low density), but five minutes later the jamming appears. When the jamming appears  Table 1 started. The right axis indicates the variations of inflow. The thick solid line indicates inflow in D1 and thin lines correspond to local densities measured in D1 (a) and in D10 (b) it propagates upstream of the detector and this produces in turn backward jamming in the preceding sections. We can observe this situation in detector D15 (see figure 4a)), where a jamming is observed in minute 155, that is, 15 minutes later than the jamming that occurred in D17. The topology of the MCH and a bad toll system do not allow that the free flow will be recovered, so that the highway presents a jamming and the travel time is increased up to 100% density.  Table 1 started. The right axis indicates the variations of inflow. The thick solid line indicates inflow in D1 and thin lines correspond to local densities measured in D17 (before toll booth) (a) and in D15 (b) It is important to emphasize that all the parameters used in this simulation are based on the available information about the MCH in Mexico. There are not empirical data to analyze not working days in a microscopic form. We think that inanalysis similar to the one presented in this paper could be used for planning, designing, and operating of some Mexican highways where a good service level is reported, but the experience shows jamming in days-off.
Finally, simulations adding extra lanes indicate that these additions do not solve the problem of traffic jams during the returning days. However, we have done simulations of the MCH without considering the toll booth and the results obtained indicated a free-flow state whenever there does not exist another incident. The same conclusion applies to the analysis of the opposite direction (Mexico City to Cuernavaca) free flow regime is always present if there is not an accident. An important point to be stressed is that with this multilane model it is possible to take into account more complex situations (as accidents), with some modifications in specific points on the highway topology. Also it is possible to analyze the impact of strategies of safety. For example, the selection of points on the highway where emergency stations may be placed minimizing their responding time.

Concluding Remarks
In this paper, a multi-lane extension of a recent CA model [Lárraga et al.(2004)] with variable anticipation for single-lane traffic flow is presented. The analysis focuses on the description of the traffic flow on the Mexico-City Cuernavaca highway. Simulation results show that the congestion observed on days-off in this highway is not only a consequence of its complex topology. The main problem lies in the fact that there is an inefficient system of toll. Results indicate that the application of the CA model presented here could be used to investigate new alternatives to improve the management of traffic flow in Mexican Highways, where there does not exist this kind of analysis.
Traffic simulations have shown to be a fascinating source of new kind of phase transitions [Chowdhury et al.(2000)] [Lárraga et al.(2004)] in complex systems. Moreover, in this paper we have also illustrated how this kind of simulations can be useful to test new strategies in solving actual traffic problems.