## 4 Differential Evolution Algorithm for the ATO over ERTMS Eco-Driving Problem
### Simulation Model  
For a given a command matrix \(C_{m}\), the simulation model calculates the resulting speed profile. In this section the model is briefly explained, details can be found in [82; 86]. The simulation model considers the specific characteristics of the train: the mass, length, running resistance, and rotary inertia, the efficiency ratio of the motors, and the maximum traction and braking effort curves. In addition, the simulation model takes into account the characteristics of the line grades and their transition curves, track bends (as well as their transition curves), tunnels, and speed limits of the line. The position of electrical substations and neutral sections in the line are included to estimate the energy transmission losses. The driving control is calculated in the simulation model depending on the driving command contained in \(C_{m}\). The effort (\(F_{m}\)) that is demanded to the motors depends also on the speed limits and the stopping points. Positive values of Fm indicate traction effort, negative values indicate braking effort and zero value indicated coasting. The control loop is a proportional-integral regulator. The traction command demanded \(U_{reg}(t)\) is calculated by the Equations (6)-(9) at each simulation time-step \(ts\):  
\[e(t)=v_{obj}(t)-v(t) \tag{6}\]  
\[U_{prop}(t)=K_{p}e(t) \tag{7}\]  
\[U_{int}(t)=\frac{K_{p}}{K_{I}}.\frac{(e(t)+e(t-ts))}{2}+U_{int}(t-ts) \tag{8}\]  
\[U_{reg}(t)=U_{prop}(t)+U_{int}(t) \tag{9}\]  
where \(U_{prop}(t)\) is the proportional contribution to \(U_{reg}(t)\) and \(U_{int}(t)\) is the integral contribution to \(U_{reg}(t)\). \(K_{p}\) is the proportional constant. and \(K_{I}\) is the integral constants. \(v_{obj}(t)\) is the objective speed \(v_{obj}(t)\) and \(v(t)\) is the current speed of the train. The command \(U_{reg}(t)\) is constrained by a minimum value to 0 for the execution of the holding speed without braking, when \(v(t)\) is below \(v_{max}(t)\) (see Equation (9)). The value of the output of the regulator \(U_{reg}(t)\) is limited to take into account the train motors characteristics, that is, the maximum traction and braking effort curves The variation of \(U_{reg}(t)\) is limited by a jerk limit constraint. The maximum speed of the train \(v_{max}(t)\) is calculated considering that the train (from the head to the tail) must observe the speed limitations of the line and must stop at the station. With the output of the regulator and using the train and line information, the train acceleration is calculated at each simulation step (see Equation (10))  
\[M_{eq}a(t)=F_{m}-\left(F_{r}(v)+F_{g}(s)\right) \tag{10}\]  
where \(M_{eq}\) is the train mass including the effect of rotary intertia, \(s\) the position of the train, \(a(t)\) is the acceleration, \(F_{m}\) is the motors traction effort. The running resistance \(F_{r}(v)\) is calculated by means of the Davis' formula as a function of the train speed (\(v\)) at each simulation step as:  
\[F_{r}(v)=A+B\cdot v+C\cdot v^{2} \tag{11}\]  
\(F_{g}(s)\) models the force associated with the track grades and the track bends, which are modelled as equivalent grades. The value of \(F_{g}(s)\) is calculated as:  
\[F_{g}(s)=g\cdot m\cdot p(s) \tag{12}\]  
where \(m\) is the mass of train and \(p(s)\) is the average equivalent track grade affecting the complete length of the train at each simulation step. Once acceleration has been calculated, the train speed and position at the next simulation step are calculated from the uniformly accelerated motion Equations (13) and (14). \[\frac{ds}{dt}=v(t) \tag{13}\]  
\[\frac{dv}{dt}=\ a(t) \tag{14}\]  
After that, the simulation model calculates the energy consumption. With this purpose, the first step is to obtain the electrical power at pantograph using the following expressions:  
\[P_{mcc}=F_{m}\cdot v \tag{15}\]\[ \begin{array}{lcl}P_{p}=\frac{P_{mcc}}{\eta}+P_{aux}&&\qquad\text{If }P_{mcc}\geq 0\\ P_{p}=P_{mcc}\eta+P_{aux}&&\qquad\text{If }P_{mcc}<0\end{array}