**4. Discussion**

The results obtained show how the proposed solution allows an e ffective economic return on investment. From an economic point of view, also as regards the energy one, it allows savings percentages comparable to those obtained from [7] and [25], but with the advantage of having stationary installations that don't burden the convoys. The PBP turns out to be greater than that found by our model since in [25] the economic aspect of the problem is a sub-objective, not the main one and therefore is not maximized.

Compared to other research based on single types of accumulation [16,20,21,23] by varying the parameters characterizing the di fferent types within the model it is possible to consider di fferent ESSs, and the di fferent investments can be compared with each other by means of a single value, which is the NPV.

The use of this parameter also allows, as seen, to evaluate cases with di fferent numbers of ESS installed, which entail di fferent energy savings (shown to the user) but in any case, comparable from an economic point of view through the NPV. Comparing di fferent scenarios is a possibility also o ffered by [30] but it needs real tra ffic data: the use of the railway simulator instead allows to simulate countless tra ffic scenarios only by knowing the characteristics of the line and those of the rolling stock. The model takes into account the managemen<sup>t</sup> of the line and o ffers di fferent solutions based on its use.

The economic model described in Section 2.3 in the evaluation of the NPV examines the charge and discharge cycles of the ESS as [24], which bases its optimization on this parameter. The solution found by our model is therefore based on a greater number of variables and this allows for a more in-depth and realistic solution.

Further developments in the sector could involve an ever-greater integration between technical and economic design, using multi-objective optimization to simultaneously maximize or minimize technical aspects (e.g. energy losses or system receptivity) and economic aspects (e.g. the capital cost of the investment or the expected economic returns). Modified and more complex models should be adopted to e ffectively describe the reciprocal influence between the two aspects mentioned above.

From the point of view of railway safety, many studies [42–49] have recently been conducted on the safety of the infrastructure and on the e ffects that accidents and derailments have on it and on its deterioration. The addition of ESSs on the line involves new variables whose e ffects should be deepened.

Furthermore, it would be interesting to be able to compare other solutions, such as on-board storage systems or the installation of reversible electrical substations, with those found. Common models should be developed for the di fferent types of proposed solutions in which future technological developments can also be taken into account.

The proposed methodology can be further developed by providing for the inclusion in the model of constraints related to the exchange of energy or by inserting a limit on the energy consumed in order to have lower energy consumption and less stress on the electrical substations. Other solutions to explore include: the replacement of the PSO with derivative-free algorithms of "pattern search" type, based on the guided exploration of the feasible region; instead of the railway simulator, use non-parametric machine learning models derived from the data collected or simulated on the network. In the last case, it would apply algorithms which use the derivatives and that are more advanced and efficient for the determination of the optimal solution or one of its good approximation.

Since the installation of an ESS involves a very expensive investment, the initial choice of the type of storage is an important problem: in fact, the rates of the economic parameters change according to the technology used and this means that, for the same installed size, di fferent technologies involve di fferent costs and therefore also di fferent economic benefits. The proposed methodology allows to take into account the impact of the various rates, i.e., the various technologies that can be installed, since the economic model used by the algorithm to calculate the NPV of the system depends on economic parameters that change according to the technology adopted, therefore by changing the parameters' values of ESS it is possible to obtain a di fferent economic calculation and a di fferent optimal solution, depending on the chosen technology.
