## 3 Methodology
### Determination of Full Course Yellow Phases in Combination with Accidents and Failures  
The determination of FCY phases and retirements must be performed before starting the actual race simulation in order to have the required information available even if backward drivers reach the specified start of a phase in an earlier lap than the race leader. The alternative would be to determine the retirements and their corresponding FCY phases \"live\" during the simulated race, as used in some of the literature. A small example shows why this does not work correctly with the lap-wise discretization principle. Looking at exemplary race times in Table 3, we find that driver 1 is ahead of driver 2 and driver 3 in laps 20-22 because he reaches the end of each lap earlier (actually driver 3 was even lapped because \(t_{\text{race}}\) (driver 1, lap 21) \(<t_{\text{race}}\) (driver 3, lap 20)). Assuming that the simulation would decide in lap 22 that a VSC phase should be activated at \(t_{\text{race}}=2110\,\text{s}\), we can conclude that it would affect driver 1 shortly after starting into lap 22, while driver 2 and driver 3 would have already been affected in lap 21. Therefore, the problem is that once the simulation decides to activate the VSC phase in lap 22, the previous lap has already been fully simulated due to lap-wise discretization. As a consequence, the SC could not be considered for driver 2 and driver 3 in lap 21 anymore. The solution is to determine all FCY phases and retirements before starting the actual race simulation, as explained in the following. For the definition of FCY phases, a process to fix start race times, durations, and type (VSC or SC) is required. The definition must happen in conjunction with the determination of accidents and failures since they are the causes of FCY phases. For our process, we assume that accidents lead to SC phases. In contrast, if a driver retires due to a failure, he tries to drive to a safe spot. Therefore, we assume that this either causes a VSC phase or no FCY phase at all. We use the following procedure to keep the overall chances of SC, VSC, accidents, and retirements as realistic as possible, although it violates the real cause-effect principle in the case of SC phases:  
1. Determine SC phases (quantity, start, duration) and derive accidents
2. Determine failures (quantity, start) and derive VSC phases (duration)
3. Convert race progress to race time  
Determine SC phases and derive accidents  
The SC phases are fixed at first because they have a significant impact on race strategy, and therefore their probability of occurrence should be no conditional probability. The quantity of SC phases for a race is chosen between zero and three, whereby empirical probabilities \(P_{\text{sc,quant}}\) according to the real fractions of the seasons 2014-2019 are used for each of the options, see Figure 7. The exact values are given in Table A3 in Appendix A. \begin{table}
\begin{tabular}{l c c c} \hline \hline
**Lap** & \(t_{\text{race}}\) (driver 1) & \(t_{\text{race}}\) (driver 2) & \(t_{\text{race}}\) (driver 3) \\ \hline
20 & 2000 s & 2010 s & 2102 s \\
21 & 2100 s & 2120 s & 2204 s \\
22 & 2200 s & 2230 s & 2306 s \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Exemplary race times \(t_{\text{race}}\) for three drivers at the end of laps 20–22 to explain a modeling difficulty arising from the lap-wise discretization. Then, the start of every SC phase is defined. Therefore, the race is divided into six groupings (first lap, \(\leq 20\%\), \(\leq 40\%\), \(\leq 60\%\), \(\leq 80\%\), \(\leq 100\%\)) with individual probabilities \(P_{\text{sc,start}}\). The laps in each group are then assigned the same proportion of the corresponding probability. This classification can be compared with the actual data in Figure 8. The exact values for \(P_{\text{sc,start}}\) are given in Table 15 in Appendix A.