# Optimal Transport in Multilayer Networks for Traffic Flow Optimization
## 3 Results  
### Results on Synthetic Data  
We show how the model works on synthetic data where each layer is planar, to mimic realistic scenarios of transportation networks in space. We generate 2-layer networks and the source matrix \(S\) as done in [42]. Specifically, we generate one layer by randomly placing \(N\) nodes in the square \([0,1]\times[0,1]\) and then extract their Delaunay triangulation [45]. We then select a subset of nodes and use this to build the second layer with an analogous procedure. An example of this is given in Figure 2. After having constructed the network topology, we assign entry and exit stations to each node in the network, starting from a monocentric scenario where all passengers exit from a central station, regardless of their origin. We then randomly re-assign with a probability \(p\in[0,1]\) the exit station of each set of passengers. When \(p=0\), all the passengers travel to the city center, while when \(p=1\), the destinations are assigned completely at random. We generate 20 networks with \(N_{1}=100\) and \(N_{2}=10\), so that layer 1 has, on average, shorter edges than layer 2. For each sampled network, we take 50 random samples of \(S\). We consider \(p\in\{0.2,0.8\}\) to study two opposite situations of having a majority or a minority of the passengers directed to a common central node. Then, we fix \(w_{1}=1\) and vary \(w_{2}\in\{0.2,0.8\}\) to mimic a scenario where traveling on the second layer is faster. Overall, with these combinations of parameters, we obtain 2-layer networks that resemble a road-rail network. With this in mind, we run our model with the following combination of parameters for the dynamics: \((\beta_{1},\beta_{2})\in\{(0.5,1.1),(0.5,1.3),(0.5,1.5),(1,1)\}\). This is because we expect to penalize traffic congestion in a road network, hence \(\beta_{1}=0.5\). Instead, a rail network is less sensitive to traffic but it may cost more to build connections, thus once should consolidate traffic along fewer edges, hence \(\beta_{2}>1\). The case \((\beta_{1},\beta_{2})=(1,1)\) is used as a baseline for comparison with the shortest path-like optimization. We measure how passengers distribute along the optimal trajectories to assess how the network operates under various regimes of \(w\) and \(\beta\). For this, we consider \(||F_{e}||_{2}\) and measure the distribution of this quantity along the edges to see how this varies across parameters' values and in each of the two layers. In addition, we calculate the current flow edge betweenness centrality (FBC) [46], which captures how important an edge is based on how many passengers travel through it. This is different than the standard edge betweenness centrality [47] in that it considers random paths connecting two points, instead of only the shortest paths. We argue that FBC is more appropriate in our case, as the shortest paths may not be the optimal trajectories where passengers travel. We calculate the weighted version of FBC, where the edge weight is \(||F_{e}||_{2}\), so that the random paths are more likely to follow edges with higher flux. We use the Gini coefficient \(Gini\in[0,1]\) to characterize the disparity in the flow assignment along edges. We consider the following definition [48]:  
\[Gini:=\frac{1}{2E^{2}\bar{x}}\sum_{r,q}|x_{r}-x_{q}|\quad, \tag{5}\]where \(r,q\) denote edges, \(x\) is the quantity that we want to measure this coefficient with, and \(\bar{x}=\sum_{e}x_{e}/E\) is its average value. Here, we use \(x_{e}=||F_{e}||_{2}\) and \(x_{e}=FBC_{e}\). When \(Gini\) is close to one, most of the flow passes through few edges, whereas when \(Gini\) is small, the flows are distributed evenly across the edges. Looking at Figure 4, we see that \(Gini\) increases with \(\beta_{2}\) and thus the network usage becomes more hierarchical, as expected in this case (we report here results for \(Gini\) w.r.t. the flux, but similar results are observed for FBC, see Figure 11).