## 3 Materials and Methods
### Measurements and Metrics  
\(DG_{i}^{IS}\) is the vector containing the _dgi_ of each period associated with the \(i\) segment and the initial simulation (superscript IS = initial simulation); similarly, we have \(DG_{i}^{FS}\) with the _dgi_ of each period of the final simulation (superscript FS = final simulation). \(DP_{i}^{FS}\) is the vector containing the _dpi_ of each period associated with the \(i\) segment and the final simulation; similarly, we have \(DP_{i}^{IS}\) with the _dpi_ of each period of the initial simulation. The superscripts IS or FS and the subscript \(i\) are also used for VG and VP, which are the vectors containing the _vg_ and _vp_ of the different periods, respectively. The variable _dgi_ = _density_/_(number_of_tanes_i \(\times\)_segment_length_i)_, where _density_\({}_{i}=\sum_{j=1}^{i=90}obs_{j}/90\) with _obs_; the number of vehicles observed on segment \(i\) at the \(j\) step considering a 90 s interval and steps of 1 s, _number_of_tanes_i and _segment_length_i are the number of lanes and the segment length of the \(i\) segment, respectively. Variable _dpi_ is calculated in the same way that _dgi_ with the difference that _density_\({}_{i}=\sum_{j=1}^{j=k}obs_{j}/k\), with \(k\) the number of observations (in the 90 s interval) for which _obs_\({}_{j}>0\), in addition, if \(i\) is the index of a SCS, an observation must occur in a time inside the measurement range to be considered, this range starts a few seconds after the beginning of the green time (so vehicles be likely already in motion) and ends along with the traffic light green time. The variable _vgi_ = \(\sum_{j=1}^{j=90}=\)_speed_measurement_\({}_{j}/90\), with \(i\) as the segment index, \(j\) as the step index and _spec_measurement_\({}_{j}=\sum_{h=1}^{h=n}\)_inst_speed_\({}_{h}/n\), where _inst_speed_\({}_{h}\) is the instantaneous speed of the \(h\) vehicle, and \(n\) is the number of vehicles on the \(i\) segment at the \(j\) step; if \(n=0\) and the \(i\) segment is a SCS, _spec_measurement_\({}_{j}=\)_vel_nor_\({}_{j}\), if \(n=0\) and the \(i\) segment is a SNS, _spec_measurement_\({}_{j}=\)_vel_nor_. The variable _vp_\({}_{i}=\sum_{j=1}^{j=k}=\)_speed_measurement_\({}_{j}/k\), with \(k\) the number of steps (during a 90 s period) for which \(n>0\), additionally, if the \(i\) segment is a SCS, a step must occur inside the measurement range to be considered, so steps during the first seconds of the green time and during the entire duration of the yellow and red times are not considered (_vp_ reflects the speed when the vehicles can be in motion). Regarding these formulas, for simplicity for any period we start the \(j\) step index with 1, which is different than the simulation steps count since the start of the simulation (1 s passes between the simulation steps). We use the built-in SUMO function traciedge.getLastStepMeanSpeed('segment_name') to get the equivalent to what we defined as _speed_measurement_, i.e., the space mean speed (the average of the vehicles instantaneous speeds on a segment named'segment_name'), and traciedge.getLastStepVehicleNumber('segment_name') to acquire the equivalent to what we defined as _obs_, i.e., the number of vehicles on a segment. In all simulations and for each segment we calculate _dg_, _dp_, _vg_, and _vp_ every 90 s (the duration of any traffic light cycle), so we calculate _obs_ and _speed_measurement_ every 1 s (the time between the simulation steps). A 90 s interval is called a period, for any simulation, the first period is in the range (0, 90) of the simulation time and is referred to with index = 0, the second is in the range (90, 180) and is referred to with index = 1, and so on. The full details of how measurements were made and grouped in Algorithm A3 in Appendix B. The _vg_ is used in the procedure to forecast the segments travel times, which in turn are used to generate the vehicles' routes.