## 3 Solution Algorithm  
In order to solve the fixed-point problems (4) we propose an algorithm based on the MSA general framework. The first formulation of MSA [2] generates a succession of feasible link flow vectors, \(f^{k}\), starting from an initial solution (usually \(f^{0}=0\)). At each iteration \(k\), the solution \(f^{k}\) is generated by combining traffic flows obtained by a Stochastic Uncongested Network (SUN) assignment, \(f_{\text{SUN}}{}^{k}=\varphi_{\text{SUN}}(c^{k})\), with the previous solution, \(f^{k-1}\)  
At each iteration \(k\), in order to generate the solution \(f^{k}\), the results of the SUN assignment, \(f_{\text{SUN}}{}^{k}\), are averaged, with weight \(1/k\), with the results of the previous iteration, \(f^{k-1}\), with weight \((k-1)/k\):  
\[f^{k}=((k-1)/k)\cdot f^{k-1}+(1/k)\cdot f_{\text{SUN}}{}^{k} \tag{5}\]  
that is:  
\[f^{k}=f^{k-1}+1/k\left<f_{\text{SUN}}{}^{k}-f^{k-1}\right> \tag{6}\]  
Since the algorithm works directly on flows, it is also known as MSA-FA (Flow Averaging). Algorithm 1 reports the code of the traditional MSA-FA algorithm, where \(\epsilon\) represents the stop threshold. It is worth noting that the averages applied to the flows belonging to successive iterations have to be considered an algorithmic trick and should not be confused with the weights that simulate the learning process in the dynamic assignment models. Indeed, the MSA algorithms apply to stationary models, while the simulation of learning processes (comparison between expected and experienced performances) are typical of day-to-day dynamics models [24; 25]. Since, as shown in Appendix B, most of the MSA-based algorithms proposed in the literature for solving the traffic assignment problem are based on a modification of the weight formulation (i.e., term 1/\(k\) in the traditional MSA algorithm), our proposal consists in providing a further variant of the MSA-FA algorithm substituting the term \(k\) in Equation (5) or (6) with the following function:  
\[\xi(k)=1+(k\text{-}1)\cdot\eta \tag{7}\]where \(\eta\) is a parameter between 0 and 1; for \(\eta=1\) we obtain the classic MSA algorithm, and for \(\eta=0\) we obtain that \(\mathbf{f}^{k}=\mathbf{f}_{\text{SUN}}{}^{k}\) (in this case the algorithm does not consider at each iteration the results of the previous ones). This method tends to muffle the weight given to \(\mathbf{f}^{\ k-1}\) (with \(\eta<1\)) with respect to the corresponding weight given with the classic MSA algorithm. The weights of \(\mathbf{f}^{\ k-1}\), \(w_{-1}\), and \(\mathbf{f}_{\text{SUN}}{}^{k}\), \(w_{\text{SUN}}\), at each iteration \(k\) become:  
\[w_{-1}=((k\text{-}1)\cdot\eta)/(1+(k\text{-}1)\cdot\eta) \tag{8}\]  
\[w_{\text{SUN}}=1/(1+(k\text{-}1)\cdot\eta) \tag{9}\]  
```
1:\(k=0\)
2:\(\mathbf{f}^{0}=\mathbf{0}\)
3:do while\(|\mathbf{f}_{\text{SUN}}{}^{k}-\mathbf{f}^{\ k-1}|\mathbf{f}^{\ k-1}\geq\epsilon\)
4:\(k=k+1\)
5:\(\mathbf{c}^{k}=\mathbf{x}(\mathbf{f}^{\ k-1})\)
6:\(\mathbf{f}_{\text{SUN}}{}^{k}=\mathbf{\varphi}_{\text{SUN}}(\mathbf{c}^{k})\)
7:\(\mathbf{f}^{k}=\mathbf{f}^{\ k-1}+1/k\cdot(\mathbf{f}_{\text{SUN}}{}^{k}-\mathbf{f}^{\ k-1})\)
8:loop
9:\(\mathbf{f}^{\ *}=\mathbf{f}^{k}\)
10:end
```  
**Algorithm 1** Traditional MSA-FA algorithm  
In Algorithm 2 the code of the generalised MSA-FA algorithm (i.e., GMSA-FA) is reported. Figure 1 reports the values at each iteration \(k\) of \(w_{\text{SUN}}\) (equal to \(1-w_{-1}\)) for values of \(\eta\)between 1 (classic MSA) and 0 and for the first 100 iterations.