*Novelty of Approach Proposed*

The proposed approach aims to jointly determine both the optimal size of the energy storage systems and their position along a railway line, maximizing the economic benefits.

A technical-economic model is included into a software developed by the Authors, to establish the economic convenience of the found solution. The main novelty of the proposed approach is to use an optimization algorithm not to minimize the energy purchased from the network, but to maximize the economic benefits from an ESS's installation in a railway line. The methodology has been designed to be performed with any type of d.c. electrified railway line and train, using a software that provides the dynamic and cinematic characteristic of the train and load flow calculation for electrical analysis. The procedure has been implemented in MATLAB ™ software (MATLAB 2019b (v9.7), The MathWorks, Inc., Natick, MA, USA).

The structure of the paper is as follows: Section 2 presents the simulation software and models used, the optimization problem is formulated and the algorithm used to solve it is explained. Section 3 presents the case study and shows the results obtained. In Section 4 the obtained results are discussed and compared with the others that are presented in the literature, furthermore future research directions are proposed. Finally, in Section 5 presents our conclusions.
