# Determining the Optimal Positions of Infill Balise Groups for ERTMS/ETCS Level 1 Applications
## 2 Materials and Methods
### Algorithm
#### 2.1.4 Weighting the Runtimes  
The weighting is used to calculate the weighted additional runtime \(t_{run,add,weighted}\) as the KPI of the optimization. The algorithm calculates the runtime on each trajectory and individually compares them to the trajectory of the unhindered run, resulting in the additional runtime \(t_{run,add,i}\) for each trajectory associated with receiving infill information at a specific balise group.  
Figure 3 will be used to illustrate the approach behind the weighting. The green trajectory depicts the unhindered run at maximum speed after having received infill information at balise group \"IF_3\". Because infill information is received before passing the IP, no braking must be initiated. The three other trajectories in this case are associated with receiving infill information--after having initiated braking--at \"IF_2\" (yellow), at \"IF_1\" (red), and at the EOA (purple). Calculating the additional runtime observes the train running from the farthest infill balise group (IF_3 in this example) until the point where all  
trajectories have reached the initial speed again, depicted by the dashed vertical line on the far right in Figure 3.  
The approach zone between the farthest infill balise group IF_3 and the EOA is divided into three segments used to determine the individual weights \(g_{i}\) depending on the weighting method. The first segment spans from IF_3 to IF_2, the second one from IF_2 to IF_1, and the last one from IF_1 to the EOA. If only two infill balise groups are present, just two segments would be distinguished.  
The weighted additional runtime is calculated by using the individual weights \(g_{i}\) for a weighted arithmetic mean, as shown in the following equation:  
\[t_{run,add,weighted}=\frac{\sum_{i=1}^{n}g_{i}\cdot t_{run,add,j}}{\sum_{i=1} ^{n}g_{i}}. \tag{2}\]  
Three different methods of defining the individual weights \(g_{i}\) were developed and implemented: \"Time\", \"Distance\", and \"Equal\".  
The \"Time\" method uses the runtime of the slowest trajectory (purple in Figure 3) in each of the segments as the corresponding weight. The weights change with different positions of the infill balise groups. By this, a system behavior is modelled in which the time the main signal changes from closed to open and infill information becomes available is unknown and completely random timewise.  
Taking not the runtimes but the distances between the balise groups (length of the segments) into account is possible by selecting the \"Distance\" method. The weights then change with different positions of the infill balise groups as well. This leads to a slight, but important change in view compared to the first weighting method, as it describes a system behavior in which the moment the main signal changes from closed to open is unknown and randomly distributed over the distance of the train run between the farthest infill balise group and the EOA.  
At last, \"Equal\" enables the user to apply an equal weighting to the segments, so the weighted additional runtime is the ordinary arithmetic mean of the additional runtimes corresponding to each of the segments. There is no analogy to the real world to be drawn.  
It must be noted that the calculated weighted additional runtime in all cases only takes trains into account that do not receive an updated MA before passing the farthest  
Figure 3: Qualitative example of train trajectories depending on the infill balise group where infill information is received. The direction of travel is from left to right. The colors correspond to receiving infill information at IF_3 (green), IF_2 (yellow), IF_1 (red), or at the EOA (purple).  
infill balise group, and therefore, ETCS Target Speed Monitoring (TSM) becomes active and supervises the braking curves. This only becomes relevant in disturbed conditions, as normally, timetabling ensures that all trains can run on a \"green wave\" without hitting a closed main signal outside planned stops.