Method for the Experimental Identification of Variables and Configurations That Modify the Shape of the Macroscopic Fundamental Diagram

: In this paper, we propose a method for establishing if a variable is capable of modifying the Macroscopic Fundamental Diagram (MFD) of a street network. The variables have many different configurations, and a simulation is performed for each one. Then, based on the output data of each simulation, the representative speed, density, and flow of the network are calculated. We use three metrics to establish if a variable affects the MFD: the first establishes a distance between the compared density and speed patterns, the second establishes a distance between capacities, and the third establishes a distance between critical densities. We select four variables to test our method: the precision of driving, the vehicles’ top speeds distribution, the procedure for selecting routes, and the procedure for selecting destinations; we determine whether each of these variables can modify the MFD shape. Additionally, we detect which configurations of a variable are able to reach and exceed the critical density (causing congestion) so we can establish which configurations are sustainable and which are not. The novelties of this work are twofold: (1) we introduce a method to detect if a variable modifies the MFD; (2) we establish if the selected variables modify the MFD.


Introduction
The traffic performance of a network, based on traffic metrics that describe the whole network, is investigated via the macroscopic fundamental diagram (MFD).Proof of its existence (independently of the demand) is described in [1].Some important findings of references [1][2][3] are that the MFD is a property of the network itself (i.e., its control and infrastructure) and not of the demand, and that the maximum flow is associated with a density value (the critical density) independently of the origin-destination table.In [3], the network MFD presents less scatter than the one that focuses on individual links.Also, the MFD reveals a well-defined, smoothly declining curve, considering the speeds and densities observed at different times of day and between multiple days.In [4], it was observed that when the flow vs. speed data of individual fixed detectors were aggregated, the scatter nearly disappeared in the resultant plot (a well-defined curve).Also, regularity conditions were proposed (though they were determined to be not necessary) in relation to the existence of the MFD.These included (i) slow-varying and distributed demand, (ii) a redundant network (with several route options), (iii) a homogeneous network (with similar links), and (iv) links with an approximate fundamental diagram.The relationship between production (average flow) with accumulation (average density) and the spatial inhomogeneity of density is presented in [5].In this paper, the authors explain the nucleation effect (in which congestion concentrates in the bottlenecks that first appear and then propagates from these bottlenecks) and presents the relation of the standard deviation of density to production and with accumulation.If simulations start with homogeneous distribution of vehicles, uniform demand, and the same control for traffic lights, different spatial distribution of congestion can be observed due to the randomized turning of vehicles at intersections [6].A sufficient condition for the existence of low-scatter MFD in arterial networks is described in [7]: if the spatial distribution of link density is the same for two time intervals with the same number of vehicles in the network, then the average flows should also be the same; nevertheless, no well-defined MFD was observed for the freeway network study case.Freeway networks do not have well-defined MFDs (density vs. flow) [8].Freeway networks are different from arterial networks because they do not have traffic signals, are not redundant, and because of their transient states.The identified causes for freeways being hysteretic and path-dependent were different spatial heterogeneity in vehicle density in the onset and offset of congestion and capacity drop phenomena during the congestion offset (with lower flows at occupancy values near the critical point).The MFD on freeways was investigated in [9]. the relationship between vehicle hours traveled (VHT) and vehicle kilometers traveled (VKT) presents a well-defined shape (with no scatter) if all the links, and all the lanes of each link, are in the same regime (congested or uncongested); as the best performance (the higher VHT) on a freeway happens when all links (and all lanes) are under the same regime, policies to homogeneously spread congestion can be useful for maximizing the number of completed trips.The existence of well-defined MFDs was observed through clustering the zone under study in [10].The partitioning mechanism consisted of applying three algorithms: segmenting, merging, and boundary adjustment.The resultant clusters had low density variation in the links and high spatial compactness.The time-varying nature of travel demands can induce scattering in the MFD, and appropriate boundary conditions (adjustments in the rationing of travel demand) are required to obtain a well-defined MDF, as demonstrated in [11].In another study, two stochastic fundamental diagram (SFD) models with lognormal and skew-normal distributions were developed to account for the scattering effect during traffic state variations [12].
The MFD describes the behavior of a network in terms of its density, speed, and flow; if a network has a MDF (i.e., the relationships between traffic indicators present well-defined shapes), it can be used to identify the current conditions, to project future conditions, and to implement (control) actions that benefit the network's traffic performance.Nevertheless, a network does not always present a well-defined MFD, and a hysteresis effect may be observed.An event that leads drivers to use unfamiliar routes can cause a hysteresis loop in the MFD [13]; during congestion recovery, a lesser flow is experienced compared to that observed during the congestion stage, since the more congested areas recover more slowly than those that are less congested.The effects of the hysteresis loop can be mitigated if drivers adaptively select routes.An incident originating a non-homogeneous congestion evolution in the network space can produce a hysteresis-like effect [14].If an incident occurs in the centermost part of the surface streets, the hysteresis effect will not be visible in the MFD, but incidents that occur at other locations in the surface streets will be visible.Therefore, it was found to be convenient to separate surface streets (which were separated by the centermost streets and the rest) and highways (which were separated by penetrating roads and ring roads) in order to obtain MFDs with low scatter.The hysteresis phenomenon is explained as a consequence of departure time choices and user equilibrium in [15].
The MFD shape has been described using different methods.The MFDs obtained using the analytical method, the production method (based on the vehicles' trajectories), and using loop detectors were compared in [16].An algorithm that combines the data obtained with loop detector data (LDD) and floating car data (FCD) to estimate the MFD is presented in [17].The problem of defining the MFD with probe vehicles when the penetration market rate of these varies regionally within a network was solved in [18].Methods to estimate the MFD were compared and presented in [19].The analytical method is suitable for an urban corridor and homogeneous loadings, and the typical route method was found to be adequate to obtain the network MFD in a grid network.A comparison between the method of cuts (MoC) and the stochastic approximation (SA) was implemented to analytically obtain the MFD in [20].The MoC (a deterministic method) accurately found the upper bound of the MFD, whereas the SA (a stochastic method) provided a more accurate approximation of the MFD free-flow branch.A validity domain (and the inaccuracies) of the accumulation-based model when demand varied rapidly is described in [21].The production with the accumulation and the spatial spread of density was modeled in [22].The model describes the so-called generalized macroscopic fundamental diagram (GMFD).A functional form of the MFD called the uMFD (a smooth approximation of an upper bound of technologically feasible traffic states) was introduced in [23]; the uMFD fits the MFD's empirical data through a trapezoidal shape, with four parameters considered to be physically meaningful.A novelty of this method is its use of the smoothing parameter, which allows quantification of the flow-reducing factors (infrastructure effects, vehicles interaction, and traffic heterogeneity).A two-step MFD calibration framework was used to select the form and to estimate parameters in [24].
Recently, the study of the MFD has been complemented by identifying the variables that modify the shape of the MFD.Interesting conclusions about the factors that affect the MFD shape were drawn in [25], which stated that ramp metering affects the MFD.When ramp metering was implemented, higher flows were observed for accumulation values after capacity, and without it, higher accumulation values were reached.The onset and offset of congestion can produce loops (even more than one), and rapid changes in demand affect the MFD.When the demand decreased sharply, lower flows were observed in the congestion recovery than during the congestion evolution (when accumulation was increasing).A bifurcation in the MFD (average network density vs. average network flow) was detected (considering weekdays) in [26]; in the MFD, a pattern in the morning peak and a different pattern in the evening peak could be distinguished.The identified cause of the bifurcation was that in the morning, drivers follow an efficient path (likely because they are going to work), and in the evening drivers take detours.In an arterial signalized intersection, a different capacity value was observed in the AM peak than in the PM peak [27].The reasons for this were the ratio between green time and the traffic cycle time, signal coordination, and turning movements.Also, it was found that the scatter in the arterial fundamental diagram (AFD, represented as occupancy vs. flow) disappears if the Queue-Over-Detector (QOD, which is the phenomenon in which a vehicle is over the detector because the queue formed during the red time) is removed.In the absence of QOD, a stable AFD appears with three identifiable regimes: under-saturation, saturation, and over-saturation.The result of modifying the cycle length (or the offset) is that the MFD capacity changes [28].The relation between accumulation and the trip completion rate was investigated in [29], an analytically derived Markov Chain framework was proposed to explain aggregate network dynamics, which was capable of accounting for uncertainties.The shape of an MFD (traffic density per unit of area vs. space mean speed over a time period) depends on the network' topologies, as was evidenced in [30] with 63 networks; the space mean speed was explained with the macroscopic Underwood model, which has as parameters the free-flow space mean speed and the optimal traffic density per unit of area.These are explained in turn with the average number of junctions per unit distance (which captures the stop-and-go frequency of the vehicles) and with the degree density normalized by the trafficable area (which captures the intensity of conflicts between vehicles), respectively.The relation between the MFD properties and the structure of the road network is described [31].The effects of signal coordination on the MFD were investigated in [32], which stated that the impacts of the strategies were sensitive to the signal cycle length chosen (60 s, 90 s, 120 s), and a poor signal coordination reduces the network capacity and the free-flow speed.Other variables that affect the MFD include junction regulation [33], traffic signals [34][35][36], network spatial characteristics [37], buses [38], large-scale activities [39], autonomous vehicles [40][41][42][43], turning traffic [44], rainfall [45], ride pooling [46], bicycle traffic [47], traffic incidents [48], the position of the loop detectors [49], and network heterogeneity [50].
As presented in the literature above, there are a lot of variables that can impact the MFD.However, a method to establish if a variable has impacts on the MFD is lacking.Moreover, it has yet to be determined which variables from a selected set affect the MFD.Thus, the aim of this work is to design a method to determine if a proposed variable modifies the MFD shape.A brief introduction of the method is as follows.For each variable selected, an experiment is conducted.During each experiment, a simulation is performed for each value (or configuration) the variable takes, and a MFD model is constructed with the aggregated data from each simulation.We compare the simulations by establishing a metric distance between density vs. speed patterns, between capacities, and between critical densities.The metrics are compared with thresholds values (these can be adjusted in order to increase or decrease the level of similarity pursued) and based on the global results, it can be concluded if a variable affects the MFD or not.If the latter applies, it means that (approximately) a unique MFD exists (density vs. speed, speed vs. flow, and density vs. flow) with the aggregated data from simulations (each performed with a different configuration of the variable) and that it can be used to describe the traffic.

Research Questions
As the study of the MFD is still underway, it has yet to be completely determined which variables affect the MFD shape of a network.Therefore, it becomes important to establish a method which allows us to analyze if a variable modifies the MFD shape.Thus, our research questions are as follows: 1.
What method can be used to analyze if a variable modifies the MFD shape of a street network? 2.
Are the precision of driving, the vehicles' top speeds distribution, the procedure for selecting routes, and the procedure for selecting destinations variables that modify the MFD shape?

Simulator
In this study, we perform four experiments.In each experiment, a specific variable takes different values, and one simulation is performed for each value.To carry out the simulation, we use the Simulation of Urban Mobility (SUMO) version 1.15.0, a software which allows us to continuously simulate vehicular traffic at the microscopic level.We chose SUMO because it is a software that is open-source, free, and supports a space-continuous, time-discrete approach.In [51], the authors present simulations from three simulators (SUMO, VISSIM, and TRANSIMS), and the advantages and disadvantages of each are described.SUMO is used to create scenarios with different demand variations and supply disruptions in [52], in which the authors propose new indicators derived from the MFD to assess the traffic resilience in light of transportation system disruptions.

Vehicles Parameters
The default values of the vehicles' parameters within the simulations are described in this section.By default, sigma = 0.5 which is the driver imperfection.It varies in the range of 0 to 1, with 0 indicating perfect driving and 1 indicating the opposite.By default, speedFactor = "normc(mean,deviation,lowerCutOff,upperCutOff)" = "normc(1,0.1,0.7,1.3)",where speedFactor is a value that comes from a normal distribution with mean = 1, standard deviation = 0.1, lowerCutOff = 0.7, and upperCutOff = 1.3.The top speed of a vehicle is calculated as top_speed = normal_speed × speedFactor, with normal_speed = 16.6666m/s, and speedFactor being a value in the range 0.7 to 1.3.In this study, the parameters sigma and speedFactor are selected and an experiment is performed for each.Thus, sigma is associated with the precision of driving in one experiment and speedFactor is associated with the vehicles' top speeds distribution in other.These variables take different values in the simulations of their respective experiments.
The default values of the following parameters never change: vClass = "passenger", length = 5 m (the vehicle length), minGap = 2.5 m (the minimum gap between vehicles at rest), accel = 2.6 m/s 2 (acceleration ability), decel = 4.5 m/s 2 (deceleration ability), emergencyDecel = 9 m/s 2 (emergency deceleration), and tau = 1 s (the driver's desired minimum time headway).The parameter vClass = "passenger" indicates that the default SUMO parameters' values for a passenger car (presented above) will be used; sigma and tau are parameters of the Krauß Car-following model (with modifications), which is the default Car-following model in SUMO.
Our intention is to select the parameters' values so likely traffic conditions can emerge.For this reason, we choose the default SUMO parameters' values as the base configuration for the simulations.Nevertheless, the parameters can be adjusted with empirical data for modeling observed traffic.

Routes and Destinations
By default, in a simulation, the vehicles' routes are selected by considering the links' travel times, which are calculated using the speed measurements of the previous period (1 period = 90 s).SUMO uses the Dijkstra algorithm to calculate the route with the shortest travel time.Also, by default, the origin-destination (OD) table is generated considering that each destination has the same probability of occurring, and it is guaranteed that each destination will be selected the same number of times.We consider the procedures for selecting routes and destinations as variables based upon which to perform experiments.Then, in one experiment, we manipulate the procedure for generating routes, i.e., we change the configuration of this variable, and in another we manipulate the procedure for generating destinations.

Network Speed
In a simulation, every 90 s (considering steps of 1 s to acquire data), we compute the network speed, density, and the flow of each link to build the network's MFD.The speed on link x at time t is calculated using Equation (1), where N x t is the number of vehicles on link x at time t and veh_speed t i is the speed of the i vehicle at time t.The representative speed of link x at period T is named PER_speed x T and is calculated using Equation (2) (expressed as pseudocode), where k is the number of INST_speed x t measurements in the period T (ranging from t 1 to t 2 ) for which N x t > 0. When a simulation starts, the time is initiated at 0 s.The first period (T = 1) considers the period of time in the range [1 s, 90 s], the second period (T = 2) considers the period of time in the range [91 s, 180 s], and so on (units in seconds).Any period considers 90 steps of 1 s.Each 1 s (a time step) is attempted to calculate INST_speed x t , and therefore the maximum value of k can be 90.Finally, the network's speed at period T is calculated using Equation (3), Appl.Sci.2024, 14, 3486 where M is the number of links considered for the analysis.The network speed, i.e., NET_speed T , is the representative speed of the network at period T.

Network Density
The density on link x at time t is calculated using Equation (4), where N x t is the number of vehicles on link x at time t, link_lanes x is the number of lanes of link x, and link_length x is the length of link x.The density of link x at period T is named PER_density x T and is calculated using Equation ( 5) (expressed as pseudocode): where k is the number of MEAS_density x t measurements in the period T for which N x t > 0. The network density at period T is calculated using Equation ( 6),

.5. Network Flow
The flow of link x at period T is calculated using Equation ( 7), where MEAS_flow x t is the number of vehicles on link x at time t that were not on link x at time t − 1.The network flow at period T is calculated using Equation ( 8),

Experiments
We perform four experiments.For each one, a variable is selected to determine if the variable affects the shape of the MFD.In each experiment, the selected variable takes a different value (or configuration) for each simulation and the output data of the simulations are prepared for comparison.In the simulations of any experiment, there is an input flow during 5 h (or 200 periods, since a period = 90 s, and 5 h = 200 periods); from period 1 to period 40 (phase one), every 10 s, a vehicle arrives at each network entrance (low_flow = 0.1 veh/s per entrance); from period 41 to period 80 (phase two), every 8 s, a vehicle arrives at each entrance (medium_flow = 0.125 veh/s per entrance); from period 81 to period 200 (phase three), every 6 s, a vehicle arrives at each entrance (high_flow = 0.1666 veh/s per entrance).The output data of a simulation are modeled with a linear equation for the network density vs. network speed pattern and with a seconddegree polynomial for the network speed vs. network flow and for the network density vs. network flow patterns, the equations are solved using the least squares technique.In the Supplementary Materials section, it can be found the link to the data and codes to reproduce our experiments.

Experiment 1: The Precision for Driving
In this experiment, we performed three simulations.In simulation 1, the parameter sigma = 0; in simulation 2 sigma = 0.5; in simulation 3, sigma = 1.At this point, it should be mentioned that sigma = 0.5 (in between perfect driving and the most imperfect driving) is comparable with human driving behavior [41].The network density vs. network speed pattern (for any simulation) was modeled with a linear equation of the form y = ax + b and solved with regression analysis, where a and b are parameters, x = network density and y = network speed; the network speed vs. network flow pattern (for any simulation) was modeled with a polynomial equation of the second degree, i.e., y = x 2 a + xb + c which was solved with regression analysis, where a, b, and c are parameters, x = network speed and y = network flow.The network density vs. network flow pattern (for any simulation) was modeled with a polynomial equation of the second degree, i.e., y = x 2 a + xb + c which was solved with regression analysis, where a, b, and c are parameters, x = network density and y = network flow.To model the three patterns for any simulation, we considered a range of periods [3,202], since at the beginning of a simulation, links are starting to fill up, whereas they become empty towards the end.
Hereafter, simulation 1 is abbreviated as S1, simulation 2 is S2, and simulation 3 is S3.We establish if network density vs. network speed (DS) patterns are similar using Equation ( 9), which is presented with the example for calculating the distance between the modeled DS patterns of simulation 1 and simulation 2, where N is the number of points selected in the x-axis (network density values), i is the index for N values, superscripts S1, S2, and S3 stands for simulation 1, simulation 2, and simulation 3, respectively; then D S1S2 speed is the speed distance between the modeled DS patterns of S1 and S2.In Equation ( 9), we can see the absolute value of the difference between the modeled network speed values of S1 and S2 for a certain network density value.As we are comparing S1 and S2, the x-axis values set of S1 is R S1 = x S1 1 , x S1 2 , . . .x S1 N1 and the x-axis values set of S2 is R With N1, for the number of network density values of S1 and N2 the number of network density values of S2, the values of these sets are ordered from the lowest to the highest.The x-axis set of values for comparing the y-axis values of S1 and S2 is {x Based on Equation ( 9), we compare the DS patterns of two simulations.We compare S1 with S2, S2 with S3, and S1 with S3.When comparing the DS patterns of two simulations, a condition rule is established that depends on a threshold value.This value is intended to be flexible so it can be set according to the needs of an investigation (providing the rigor needed to distinguish DS patterns).We establish that if D speed ≤ 1 m/s (in this example, the threshold value is 6% of the normal_speed, i.e., 16.66 m s * 0.06 ∼ = 1 m s ) the following is true: there is no significant difference between the patterns.If D speed > 1 m/s, there is a significant difference between the patterns.In addition, we define the difference in capacities between two simulations as D S1S2 flow = capacity S2 − capacity S1 and the difference in critical densities as D S1S2 density = critical_density S2 − critical_density S1 , where capacity S is the maximum network flow from the modeled data of simulation S and cricital_density S is the corresponding network density at capacity, with S = {S1, S2, S3}.We define two additional rules and select the threshold values.If D flow ≤ 0.01 veh/s, there is no significant difference between the capacities of the simulations compared.The opposite is true if D flow > 0.01 veh/s; in this case, the threshold value is the 6% of high_flow, i.e., 1 veh  6 s × 0.06 ∼ = 0.01 veh s .If D density ≤ 0.002 veh/m, there is no significant difference between the critical densities of the simulations compared.The opposite is true if D density > 0.002 veh/m; in this case, the threshold value is 20% of the high_flow divided by the normal_speed, i.e., 1 veh  6 s /16.66 m s × 0.2 ∼ = 0.002 veh m .We establish that the MFDs of the compared simulations are dissimilar if at least two of the following three conditions are true: D speed > 1 m/s, D flow > 0.01 veh/s, and D density > 0.002 veh/m.

Experiment 3: The Procedure for Selecting Routes
In this experiment, we performed three simulations.In the first simulation, the vehicles routes were chosen with the links' travel times calculated every 90 s based on the links speeds of the previous period, i.e., travel_time x T = link_length x /PER _speed x T−1 , with travel_time x T being the representative travel time of segment x at any time t belonging to period T. In the second simulation, the links' travel times were calculated every 90 s considering the links' speeds of the previous two periods, i.e., travel_time x T = link_length x / (PER _speed x T−1 + PER_speed x T−2 /2).In the third simulation, the travel time of each segment was a constant, so travel_time x T = link_length x /normal _speed for any T.For all simulations, the route of a vehicle was computed using the Dijkstra algorithm, which selects the route with the shortest travel time.

Experiment 4: The Procedure for Selecting Destinations
In this experiment, we performed three simulations.In S1, each destination had the same likelihood of being selected and it was guaranteed that each destination would be selected the same number of times.In S2, each destination had the same likelihood of being selected but it was not guaranteed that each destination would be selected the same number of times.Destinations with the same probability of being selected could favor (to some extent) the uniform distribution of vehicles in the network links (a desirable traffic situation).In S3, we randomly selected, in the range [0.5, 1], the probability of occurrence of each destination (i.e., a destination with a probability = 0.5 has the half of likelihood of occurring when compared to a destination with a probability = 1), so the probabilities of the destinations with ID 0 to ID 14 were 0.7, 0.7, 1.0, 0.6, 0.6, 1.0, 1.0, 0.8, 0.9, 0.8, 1.0, 0.7, 0.8, 0.5, 0.5, respectively.Then, the vehicles were assigned a destination according to the probabilities we set for that simulation.

Results and Discussion of Experiment 1
Figures 1-3 present the period index vs.network speed, period index vs.network density, and period index vs.network flow, respectively; in these Figures, the black dots represent the data from simulation 1, the blue circles represent the data from simulation 2, and the red crosses represent the data from simulation 3.
Figures 4-6 show the network density vs. network speed, network speed vs. network flow, and network density vs. network flow, respectively.These Figures present the data of each simulation.In addition, green dots represent the modeled pattern with the data of simulation 1, green circles represent the modeled pattern with the data of simulation 2, and green crosses represent the modeled pattern with the data of simulation 3.
We obtain D S1S2 speed = 0.6592 m/s, D S2S3 speed = 0.7956 m/s, and D S1S3 speed = 1.4486 m/s, and therefore a sigma difference of 0.5 does not modify the DS pattern, but a sigma difference of 1 modifies the DS pattern.The DS patterns between S1 and S2 are similar, the DS patterns between S2 and S3 are similar, and the DS patterns between S1 (with sigma = 0) and S3 (with sigma = 1) are dissimilar.In Table 2, the mean (AVG) and standard deviation (STD) of the network speed, network density, and network flow for simulations S1, S2, and S3 in experiment 1 are presented across three phases.
In Figure 4, it can be observed that as the driving imperfection is set higher (i.e., as its value is increased from simulation 1 to simulation 3), a greater maximum density is reached, which also implies a lower minimum speed.Then, a simulation with a higher sigma value than other presents a lower minimum speed and a higher maximum density.In simulation 1, the maximum observed density is 0.0184 veh/m, in simulation 2, it is 0.024 veh/m, and in simulation 3, it is 0.0388 veh/m.In simulation 1, the minimum observed speed is 7.4179 m/s, in simulation 2, it is 6.0352 m/s, and in simulation 3, it is 3.526 m/s.The network density vs. network speed pattern of S1 is above the DS pattern of S2, and the DS pattern of S2 is above the DS pattern of S3, which indicates that for the density value, higher speed occurred in S1, followed by S2 and then S3.The duration of simulations 1 and 2 was from period 1 to 204, whereas for simulation 3 it took place from period 1 to 258.During the simulations, we generated vehicles during the first 5 h (5 h = 200 periods, since 1 period = 90 s).In simulations 1 and 2, from period 200, it took an additional 4 periods (6 min) for the vehicles still circulating in the network to leave it, whereas in simulation 3, an additional 58 periods were required (87 min), since S3 experiences congestion (i.e., it reaches the critical density from which flow decreases; see Figure 6).This implies that queues are formed at the entry links (not all vehicles are able to enter the network at the time when are spawned, as dictated by the input flow) and that the network flow goes up and down during the congestion (in a period range when input flow = high_flow; see Figure 3).In Figure 6, it is appreciated that in S3, the critical density is reached at 0.0258 veh/m (according to the modeled data); Figure 2 shows that from approximately period 97 to 204 in S3, the critical density is surpassed (in that range, if density increases, flow decreases).From period 81 (i.e., since the input flow at each network entrance is equal to high_flow) it takes around 25.5 min (the time that elapses between period 81 and period 97) for the congestion to emerge; in the range of periods described in [97, 204], the speed is notoriously lower in S3 than in S1 and S2 (see Figure 1), the density is higher (see Figure 2), and the flow is (repeatedly) lower (see Figure 3).

Results and Discussion of Experiment 2
Figures 7-9 present period index vs.network speed, period index vs.network density, and period index vs.network flow, respectively.

Results and Discussion of Experiment 2
Figures 7-9 present period index vs.network speed, period index vs.network density, and period index vs.network flow, respectively.3.According to these results, the vehicles' top speeds distribution is a variable that can affect the MFD; the MFDs between S1 and S3 are dissimilar.In Table 4, the mean and standard deviation of the network speed, network density, and network flow for simulations S1, S2, and S3 in experiment 2 are presented across three phases.distribution (set with speedFactor) producing the greater percentage of higher top speed values (greater than or equal to 16.66 m/s) is the one used in S1, followed by S2 and finally S3.In Figure 10, it can be observed that the DS pattern of S1 is above the DS pattern of S2, and that the DS pattern of S2 is above the DS pattern of S3.Thus, for an x-axis value (network density) the higher y-axis value (network speed) is presented by S1, followed by S2 and then S3.The observed maximum density value is similar for S2 and S3.For S1, it is 0.0211 veh/m; for S2, it is 0.024 veh/m; and for S3, it is 0.0236 veh/m.From period 200 (the last period in which vehicles were generated), in S1 it takes 3 more periods for the network to be empty, in S2 it takes 4 more periods, and in S3 it takes 9 more periods.Figure 12 shows that the critical density is not (clearly) reached and surpassed in any simulation, so there is no congestion.Another indicator that no significative congestion occurs in any simulation is that links are cleared a few periods after the last period in which vehicles were generated.In addition, Figure 11 shows that the speed does not decrease along the flow.Figure 8 shows that the difference in the network density is evident in a range of phase three between S1 and S2 and between S1 and S3.The distance between the network density vs. network speed pattern of simulation 1 (green dots) and the pattern of simulation 2 (green circles) is D S1S2 speed = 0.0348 m/s, between simulation  5.According to these results, the procedures we presented for route selection do not affect the MFD.In Table 6, the mean and standard deviation of the network speed, network density, and network flow for simulations S1, S2, and S3 in experiment 3 are presented across three phases.
The DS patterns of S1 and S2 are similar, as shown by D S1S2 speed = 0.0348 m/s.In both simulations, similar procedures were used to forecast the travel times for selecting routes; in S3, the routes were selected based on fixed travel times (calculated based on the links lengths and a constant speed).This explains D S1S2 speed < D S1S3 speed and D S1S2 speed < D S2S3 speed ; as the DS patterns of S1 and S2 are so close (see Figure 16), it follows that D S1S3 speed and D S2S3 speed are close values.The distance between the network density vs. network speed pattern of simulation 1 (green dots) and the pattern of simulation 2 (green circles) is D speed S1S2 = 0.0348 m/s , be-

Figure shows that in S3
, most of the speed observations greater than 9 m/s occurred in the periods in which the links were filling up with cars (periods 1 and 2) and emptying of cars (period 203 and above).Figure 16 shows that in the density range [0.01, 0.015], the modeled DS pattern of S3 is slightly higher than the modeled DS patterns of S1 and S2 (meaning that in this density range, choosing routes with links that add shorter distances is favorable in terms of a greater speed than the procedures used to select the routes chosen in S1 and S2).Nevertheless, S3 achieved higher density values (from 0.0227veh/m and above) that were not reached in S1 and S2.Despite this, in Figure 16, the modeled DS pattern of S3 looks promising compared to those exhibited by S1 and S2, in S3 is reached (and exceeded) the critical density (congestion appears, queues are formed at the network' entrances and network flow drops), so in S3, since the input flow at the network entrances is zero, more time is required for the network to empty than in S1 or S2.From period 200, in S1, it takes 4 periods for the network to empty, in S2 it takes 5 periods, and in S3 it takes 37 periods (an indicator that congestion happened).The critical density is reached in S3 at 0.021582veh/m (beyond this point, as density increases, flow decreases), which corresponds with a maximum flow of 0.123737 veh/s.The congestion occurs from approximately period 92 to period 202, then after period 81 (from this period and until period 200, the input flow is 0.16666 veh/s per entrance) it takes 0.3 h for the congestion to appears.Concerning the periods range [92, 202], Figure 14 shows that S3 frequently presents higher densities than S1 and S2, and Figure 15 shows that S3 frequently presents a lower flow than S1 and S2.This is a consequence of the poor procedure used to estimate the links' travel times when selecting routes in S3.Therefore, in Figure 16, the DS pattern of S3 is extended to the right in comparison with the DS patterns of S1 and S2; in S1, the density range is [0.0063, 0.0240] and the corresponding speed range is [11.8664, 6.0352]; in S2, the density range is [0.0063, 0.0226] and the corresponding speed range is [10.7580, 5.9230]; in S3 the density range is [0.0040, 0.0259] and the corresponding speed range is [12.1548, 6.2501].7.According to these results, the procedures we use to generate the OD table cannot affect the MFD.In Table 8, the mean and standard deviation of the network speed, network density, and network flow for simulations S1, S2, and S3 in experiment 4 are presented across three phases.The DSs patterns between any possible pair (S1 and S2, S2 and S3, and S1 and S3) are similar, as can be visually corroborated in Figure 22.In this Figure, it is observed that from period 3, the network densities and the corresponding network speeds of S1, S2, and S3 share similar values.However, the maximum densities and the corresponding minimum speeds differ; in S1, the maximum density is 0.0240 veh/m and the corresponding minimum speed is 6.0352 m/s; in S2, the maximum density is 0.0277 veh/m and the corresponding minimum speed is 5.4318 m/s; in S3, the maximum density is 0.0446 veh/m and the corresponding minimum speed is 3.4570 m/s.Even though the DS patterns of S1, S2, and S3 look similar, the DS pattern of S2 is extended further to the right (and further down) than the DS pattern of S1, and the DS pattern of S3 is extended further to the right (and further down) than the DS pattern of S2.This implies higher densities and lower speeds in S2 than in S1, and higher densities and lower speeds in S3 than in S2 (or S1).
After period 200 in S1, it takes 4 periods for the network to empty, in S2 it takes 7 periods, and in S3 it takes 38 periods (due to the congestion).In Figure 24, it can be observed that according to the modeled data in S3, the critical density is reached at 0.02672 veh/m (from this value the flow starts to decrease), which corresponds to a maximum flow of 0.12923 veh/s; indeed, Figure 20 shows that the density in S3 is notoriously higher than that exhibited by S1 and S2 from period 135 to 213, which is the approximate start and end, respectively, of the congestion (in this interval as density increases, flow decreases).In addition, considering S3 and the interval [135, 213], Figure 19 shows that the network speed goes down and then goes up, Figure 20 shows that the network density goes up and then goes down, and Figure 21 shows that the network flow goes down and then goes up.Noticeably, in the range [164, 200], S2 presents higher densities and lower speeds than S1 (see Figures 19 and 20), indicating that S2 was closer to being congested than S1.In S3, from period 81 (when the input flow on each network entrance is equal to high_flow), it takes around 82.5 min (55 periods) for the network to become congested at period 135.

Conclusions
Using the proposed method, we were able to answer our second investigative question as follows: the precision of driving is a variable that affects the MFD, the vehicles' top speeds distribution is a variable that affects the MFD, the procedure for selecting routes is a variable that does not affect the MFD, and the procedure for selecting destinations is a variable that does not affect the MFD.It is important to say that the aforementioned results are valid for the configurations of variables that we tried, for the network under study, and considering the threshold values we set (which can be tuned as needed for convenience) to be compared with the metrics values.Nevertheless, the method we proposed can be used with other networks, with different variables than those we used, and with different configurations of the variables we used.We chose procedures for selecting routes based on the idea that in developing countries, vehicles (or the drivers themselves) are not always equipped with (or carrying) the proper technology for selecting routes.The idea behind the procedures for selecting destinations in S1 and S2 in experiment 4 is that a desirable traffic situation involves links with homogeneous densities, i.e., vehicles uniformly distributed on links, therefore vehicles reaching destinations all over the network increases the likelihood of links with homogeneous densities.On the contrary, the procedure for selecting destinations in S3 of experiment 4 caused non-uniform selection of destinations.
In experiment 1, we discovered that driving imperfection is a variable that can modify the MFD.This conclusion was drawn because between S2 and S3, the compared capacities, and the compared critical densities were dissimilar, and between S1 and S3, the compared DS patterns, the compared capacities, and the compared critical densities were dissimilar.We found that the DS patterns between S1 and S2 and between S2 and S3 were similar, although the DS pattern of S2 (in which the driving imperfection was at 50%) was below the DS pattern of S1 (in which the driving imperfection was non-existent) and presented lower network speeds than S1 for the occurring network densities.Also, the DS pattern of S2 was longer to the right than the DS pattern of S1 (thus, S2 presents higher densities and lower speeds not reached by S1), the DS pattern of S3 (in which the imperfection for driving is at 100%) is below the DS pattern of S2 and presents lower network speeds than S2 for the occurring network densities, and the DS pattern of S3 is longer to the right than the DS pattern of S2 (thus, S3 presents higher densities and lower speeds than S2).When the input flow was 0.1 veh/s per entrance (during the periods range [1,40]) and 0.125 veh/s per entrance (during the periods range [41,80]), we observed comparable network flows and densities (throughout time) among simulations, with S1 presenting higher speeds, followed by S2 and then S3.When the input flow was 0.1666 veh/s per entrance (during the periods range [81,200]) the difference in the network speed, density, and flow between S3 and the rest was notorious, highlighting that in S3, the critical density was reached and exceeded; traffic conditions with drivers driving with total imperfection are not sustainable, since the network gets congested.
In experiment 2, we found that the variable generating the vehicles top speeds is able to modify the MFD.Between S1 and S3, the DS patterns and the critical densities are dissimilar; the DS pattern of S1 (in which a top speed is selected in the range [16.66, 21.66]) is above the pattern of S2 a top speed is selected in the range [11.66, 21.66]), and the pattern of S2 is above the pattern of S3 (in which a top speed is selected in the range [11.66, 16.66]); the range in which density operates is similar for the three simulations; in phase three, densities throughout time between S2 and S3 are comparable and above the densities of S1.Nevertheless, in no simulation was it evident that the critical density was reached and exceeded, so the three configurations of the variable generating the vehicles' top speeds are sustainable.
In experiment 3, we found that the procedure for selecting routes is not a variable that can modify the MFD.Nevertheless, we deduced that between S1 and S3, the capacities are (slightly) dissimilar; the DS patterns between S1, S2, and S3 are close to one another, but the DS pattern of S3 presents higher densities, since in S3, the critical density is reached and exceeded during phase three.Therefore, in phase three in S3, higher network densities and lower network flows occur than in S1 and S2.Nevertheless, in the first two phases, the network speed, the network density, and the network flow (throughout time) are comparable among the three simulations.The procedure of S1 calculates links travel times based on the speed on links recorded in the previous period, and the procedure of S2 calculates links travel times based on the speed on links recorded in the previous two periods.Therefore, the traffic conditions experienced in S1 and S2 are similar.The procedure of S3 cannot maintain sustainable traffic (cannot avoid congestion) because it simply calculates the travel time of a link by considering the link length and a constant speed.
In experiment 4, we found that the procedure for generating destinations does not modify the MFD, but in all comparisons we made (S1 and S2, S2 and S3, S1 and S3) we found that the critical densities are dissimilar; despite this, the DS patterns of S1, S2, and S3 are similar.The last is considerably extended to the right (i.e., it presents higher densities and lower speeds), thus the procedures presented in this investigation for generating the O-D table can move the range in which a density vs. speed pattern operates (limiting the maximum density and hence the minimum speed) but the DS patterns trajectories in a 2d coordinate system stay close to each other.During phase one and two, the behavior throughout time of the network speed, the network density, and the network flow between simulations is comparable.During phase three in S3, the critical density is reached and subsequently exceeded, and lower speeds, higher densities, and lower flows are observed compared to those in S1 and S2.In addition, in phase three, S2 presents lower speeds and higher densities than S1; the procedure for generating destinations in S1 guarantees that each destination is selected the same number of times, whereas the procedure for generating destinations in S2 considers that each destination has the same probability of being selected, but it does not guarantee that each destination will be selected the same number of times.The procedure for generating destinations in S3 gives each destination a probability of occurrence that falls between 0.5 and 1.The procedures implemented in S1 and S2 are sustainable (as they avoid congestion) but the procedure in S3 is not (congestion emerges).
It should be said that a variable can be set to different configurations beyond those we explore in this study, and the results (if the variable affects or not the MFD) might be extended.Also a different network can produce different results.Therefore, our main objective was to ensure the design of the method we presented in order to be used with different variables, different configurations of the variables, and different networks; if a variable affects the MFD, it may be considered to be a candidate for improving traffic conditions.simulations of experiment 2), MATLAB Data S4: variables_p1.mat(file with the aggregated data of simulation 1, experiment 2), MATLAB Data S5: variables_p2.mat(file with the aggregated data of simulation 2, experiment 2), MATLAB Data S6: variables_p3.mat(file with the aggregated data of simulation 3, experiment 2).The "Experiment 3" folder contains Microsoft Excel Comma Separated Values File S3: destinos1.csv(file with the vehicles destinations IDs used in the simulations of experiment 3), MATLAB Data S7: variables_p1.mat(file with the aggregated data of simulation 1, experiment 3), MATLAB Data S8: variables_p2.mat(file with the aggregated data of simulation 2, experiment 3), MATLAB Data S9: variables_p3.mat(file with the aggregated data of simulation 3, experiment 3).The "Experiment 4" folder contains MATLAB Data S10: variables_p1.mat(file with the aggregated data of simulation 1, experiment 4), MATLAB Data S11: variables_p2.mat(file with the aggregated data of simulation 2, experiment 4), MATLAB Data S12: variables_p3.mat(file with the aggregated data of simulation 3, experiment 4); "p1" folder contains Microsoft Excel Comma Separated Values File S4: destinos1.csv(file with the vehicles destinations IDs used in simulation 1 of experiment 4); "p2" folder contains Microsoft Excel Comma Separated Values File S5: destinos1.csv(file with the vehicles destinations IDs used in simulation 2 of experiment 4); "p3" folder contains Microsoft Excel Comma Separated Values File S6: destinos1.csv(file with the vehicles destinations IDs used in simulation 3 of experiment 4).The MATLAB version we used was R2023a.The Python version we used was Python 3.11.2.

Figures 4 -
show the network density vs. network speed, network speed vs. network flow, and network density vs. network flow, respectively.These Figures present the data of each simulation.In addition, green dots represent the modeled pattern with the data of simulation 1, green circles represent the modeled pattern with the data of simulation 2, and green crosses represent the modeled pattern with the data of simulation 3.

Figures 4 -
Figures 4-6show the network density vs. network speed, network speed vs. network flow, and network density vs. network flow, respectively.These Figures present the data of each simulation.In addition, green dots represent the modeled pattern with the data of simulation 1, green circles represent the modeled pattern with the data of simulation 2, and green crosses represent the modeled pattern with the data of simulation 3.

Figures 10 -
Figures 10-12 show the network density vs. network speed, network speed vs. network flow, and network density vs. network flow, respectively.The distance between the network density vs. network speed pattern of simulation 1 (in green dots) and the pattern of simulation 2 (in green circles) is D S1S2 speed = 0.8842 m/s; between simulation 2 and simulation 3 (in green crosses), it is D S2S3 speed = 0.6974 m/s; and between S1 and S3, it is D S1S3 speed = 1.5998 m/s.Therefore, the DS patterns of S1 and S2 are similar, the DS patterns of S2 and S3 are similar, and the DS patterns of S1 and S3 are dissimilar.D S1S2 flow = |0.134169− 0.134236| = 6.6999 × 10 −5 veh/s, D S2S3 flow = |0.134236− 0.133416| = 0.000819 veh/s, and D S1S3 flow |0.134169 − 0.133416| = 0.000753 veh/s, hence the capacities of S1 and S2 are

Figures 10 -
show the network density vs. network speed, network speed vs. network flow, and network density vs. network flow, respectively.
Figures 13-15 present the period index vs.network speed, period index vs.network density, and period index vs.network flow, respectively.Figures 16-18 show the network density vs. network speed, network speed vs. network flow, and network density vs. network flow, respectively.The distance between the network density vs. network speed pattern of simulation 1 (green dots) and the pattern of simulation 2 (green circles) is D S1S2 speed = 0.0348 m/s, between simulation 2 and simulation 3 (green crosses) is D S2S3 speed = 0.3265 m/s, and between S1 and S3 is D S1S3 speed = 0.3663 m/s.Therefore, the DS patterns of S1 and S2 are similar, the DS patterns of S2 and S3 are similar, and the DS patterns of S1 and S3 are similar.D S1S2 flow = |0.13424− 0.13352| = 0.000719 veh/s, D S2S3 flow = |0.13352− 0.12374| = 0.009779 veh/s,

Figures 16 -
show the network density vs. network speed, network speed vs. network flow, and network density vs. network flow, respectively.

Figures 16 -
show the network density vs. network speed, network speed vs. network flow, and network density vs. network flow, respectively.

tween simulation 2
and simulation 3 (green crosses) is D speed S2S3 = 0.3265 m/s, and between S1 and S3 is D speed S1S3 = 0.3663 m/s.Therefore, the DS patterns of S1 and S2 are similar, the DS patterns of S2 and S3 are similar, and the DS patterns of S1 and S3 are similar.D flow S1S2 = |0.13424− 0.13352| = 0.000719 veh/s , D flow S2S3 = |0.13352− 0.12374| = 0.009779 veh/s , and D flow S1S3 |0.13424 − 0.12374| = 0.01049 veh/s, hence the capacities of S1 and S2 are similar, the capacities of S2 and S3 are similar, and the capacities of S1 and S3 are dissimilar.= 0.001473 veh/m , and D density S1S3 |0.020203 − 0.021582| = 0.001379 veh/m , hence the critical densities of S1 and S2 are similar, the critical densities of S2 and S3 are similar, and the critical densities of S1 and S3 are similar.The results presented above are

Figures 22 -
Figures 22-24 show the network density vs. network speed, network speed vs. network flow, and network density vs. network flow, respectively.The distance between the network density vs. network speed pattern of simulation 1 (green dots) and the pattern of simulation 2 (green circles) is D S1S2 speed = 0.0446 m/s; between simulation 2 and simulation 3 (green crosses), it is D S2S3 speed = 0.0298 m/s; and between S1 and S3, it is D S1S3 speed = 0.024 m/s.Therefore, the DS patterns of S1 and S2 are similar, the DS patterns of S2 and S3 are similar, and the DS patterns of S1 and S3 are similar.D S1S2 flow = |0.13424− 0.13556| = 0.00132 veh/s, D S2S3 flow = |0.13556− 0.12923| = 0.00633 veh/s, and D S1S3 flow |0.13424 − 0.12923| = 0.005009 veh/s, hence the capacities of S1 and S2 are similar, the capacities of S2 and S3 are similar, and the capacities of S1 and S3 are similar.

Figures 22 -
show the network density vs. network speed, network speed vs. network flow, and network density vs. network flow, respectively.

Table 4 .
Traffic indicators' AVG and STD of S1, S2, and S3 in each phase: experiment 2. Figures 13-15 present the period index vs.network speed, period index vs.network density, and period index vs.network flow, respectively.Figures 16-18 show the network density vs. network speed, network speed vs. network flow, and network density vs. network flow, respectively.

Period 1 to 40 Period 41 to 80 Period 80 to 204
Figures 19-21 present the period index vs.network speed, period index vs.network density, and period index vs.network flow, respectively.Figures 19-21 present the period index vs.network speed, period index vs.network density, and period index vs.network flow, respectively.