top of page

Pre-race strategy optimisation in Formula 1

Since the refuelling ban after the 2009 season, the optimal use of available tyre compounds has driven race strategy in Formula 1. Pirelli, the sole supplier of tyres, designs compounds to provide some strategic choice for the teams, for example, between a 2-stop race on softer compounds or a 1-stop race on harder ones.


Pirelli provides five compounds for dry conditions, ranging from C5 (the fastest and most fragile) to C1 (the slowest and most durable), but only three are available for each race. Teams have to use at least two different compounds during dry races.


These regulations provide an exciting challenge for strategists because they allow for many possible decisions. When fuel limits race strategies, fewer options are available - a driver has more impact on tyre degradation than fuel consumption.


Our team has been developing fast and accurate race strategy optimisation algorithms for many years using live timing data of popular motorsport series. We constantly improve this software using new data from Keberz Analytics Software and test new models in top sim racing competitions.


In this article, we will discuss how our software optimises race strategies for Formula 1 regulations using rFactor 2 simulator data from one of the most competitive single-seater championships in sim racing - the Formula Simracing World Championship.


We will use data from Round 2 of the FSR 2023 World Championship at Barcelona, where one of our strategy engineers worked with car #89 of Arnage x Brabham Esports. You can follow the race with commentary on the FSR YouTube channel.

 

Introduction

About the simulator and championship

rFactor 2 is one the most realistic racing simulators on the market, with an accurate tyre model, precise force feedback and almost unlimited modding capabilities. Several top racing series, including Le Mans Virtual and Virtual Endurance Championship, use rFactor 2 as their simulator of choice. rFactor 2 is also excellent for engineers because it provides incredibly detailed data about a car and live timing from the shared memory of the simulator.


Formula Simracing (FSR) World Championship is among the most prestigious sim racing series for open-wheel cars in rFactor 2. This series gathers the best sim drivers to compete in modern Formula 1 cars. Some sim racing teams from Formula 1, such as Ferrari and Alpine, compete in this championship.


The fundamental rules are similar to Formula 1:

  • Fifteen teams with two drivers participate in the World Championship division

  • The car and calendar are similar to the 2023 Formula 1 season. The race length in the World Championship division is the same as in Formula 1

  • Tyre changes are allowed. Soft, Medium and Hard compounds are available for dry conditions. Drivers are required to use two different compounds for at least one lap. Starting tyre compound and qualifying tyre compound is a free choice

  • Refuelling is not allowed. Drivers can select the fuel level they want, assuming they intend to finish

Engineer’s comment:

FSR used the Barcelona circuit layout without the final chicane and three hardest compounds, the same as in the 2023 Formula 1 season. However, in the simulator, high-speed corners at the end of the lap caused so much wear on the front left tyre that we expected softs to be used only in qualifying - unlike the actual Grand Prix, where teams used softs quite a bit during the race.
The 2023 season FSR car

Live timing data structure

rFactor 2 simulator engine records detailed telemetry and timing data live during all sessions. Engineers can access this data in the shared memory of the simulator or the output files after a session.


The data used for race strategy optimisation in our software includes:

  • Driver name

  • Lap

  • Position

  • Lap time and sector times

  • Tyre compounds

  • Tyre remaining for every wheel (from 1 to 0, where 1 is the fresh tyre)

  • Fuel remaining (from 1 to 0, where 1 is the full tank)

  • Fuel consumption per lap

  • Pit lap marker

In addition, our software analyses this data to mark outliers and calculate tyre age, average tyre wear and other parameters. You can read more about our rFactor 2 live timing analysis software on the SEAT page on our website.


Engineer’s comment:

We run two race simulations and a few focused stints to determine the balance between compounds, how to get the most performance out of them and the optimal hybrid energy deployment map. We were confident about tyre performance, but the race pace still was not ideal because we could not figure out the most efficient way to deploy and recharge the hybrid.
Tyre wear data in Strategy Engineer Assistance Tool (SEAT)
 

How race strategy optimisation works

Lap time model

This model is applied only for dry races. The lap time consists of a base lap time, a fuel correction, a tyre correction, and a normally distributed random variable:


(lap time) = (base lap time) + (fuel correction) + (tyre correction) + (random disturbance)


The base lap time is the theoretical best time for a driver set up on the new fastest available compound with minimal fuel. The model relies on the following assumptions:

  • The base lap time reflects differences in pace between different setups and drivers.

  • Small changes in air temperature, track temperature and wind have no significant effect on lap times and can be included in the random disturbance.

  • Engine mode is the same during the race

We include only “clean” racing laps in the model and exclude the following laps:

  • The pit in and out laps

  • The first lap after standing start

  • Laps under safety car

  • Laps are affected by driver mistakes or issues with the car

Fuel correction

Fuel load significantly impacts the pace of Formula 1 cars, which rFactor 2 simulates well. With a full fuel tank, these cars are up to 7 seconds per lap slower than in qualifying. Therefore, it is necessary to adjust lap times during a stint for fuel impact before starting tyre degradation analysis.


Because refuelling is prohibited and fuel flow is regulated, we assume that the fuel consumption is approximately linear throughout the race, with a full fuel tank at the start and a near-empty fuel tank at the finish.


With this assumption in mind, we can compare lap times with one lap of fuel and a full tank with all other parameters equal (compounds, engine mode, etc.) and use this delta to calculate fuel correction for any fuel load.


Tyre correction

Tyre model parameters are estimated based on fuel-adjusted lap times for every available compound. The key explanatory variable is tyre age in laps. In rFactor 2, the remaining tyre for every wheel can also be used as a proxy variable to link lap times and tyre wear.


The best-fitting model specification can vary depending on the expected tyre degradation curve. The FSR tyre model in the 2023 season used linear wear until the “cliff” at approximately 35% remaining front tyres and 50% remaining rear tyres. We used linear regression to estimate the slope (or time lost due to wear in terms of seconds per lap) and manually set the maximum possible stint for every compound using driver feedback.


Here is the observed data and fitted tyre model in Barcelona.

Tyre model for FSR Barcelona 2023

Tyre wear is also affected by fuel load. Heavier cars at the beginning of the race use tyres more than lighter cars at the end (in FSR, by approximately 15-20%). To account for this impact, we included a separate interaction term between the fuel load and the tyre wear.


Engineer’s comment:

The model estimated the crossover point between medium and hard compounds on lap 9 and the age limit at 17 laps for mediums and 27 laps for hards, similar to driver feedback. The key to fast total race time was to maximise the performance of the hard compound during the whole stint by not pushing them too much in the early laps.

Race strategy optimisation

After the program knows lap times for any combination of fuel load, compound and tyre age, it is time to optimise possible strategies. We use the Monte Carlo method to utilise logical indexing in MATLAB and avoid using loops for computational efficiency.


The program generates a fixed number of random race strategies, removes all illegal strategies and calculates race time for each legal strategy. We provide to the program race parameters relevant to this process, such as the number of laps or time loss per pit stop. All strategies are sorted from the fastest to the slowest by the expected race time.


The whole process takes about 3 seconds per 10 million race simulations. Here are the results of this optimisation:

The result of Monte Carlo optimisation

This output includes several parameters:

  • raceTime - expected race time

  • timeDelta - the delta between the selected and fastest race strategy

  • pitStops - number of pit stops for the selected strategy

  • stintCompounds - tyre compounds for every stint

  • stintLaps - stint lengths in laps

If requested, the program can also provide expected tyre wear per lap for every wheel and compound, expected maximum stints for every compound and other valuable data for the strategy engineer.


Engineer’s comment:

According to pre-race testing, there was only one viable strategy for the race - a 2-stop with two stints on hards (C1) and one stint on the mediums (C2). In terms of optimising the race time, it was better to use mediums for the final stint to get the most out of the softer compound on the lighter car.

Testing strategies against competition and random events

Finally, the program evaluates the fastest actions against opposition on track. We add some additional parameters to simulate interactions between cars on track accurately:

  • The number of cars on the grid

  • Delta to overtake in seconds per lap

  • Minimal distance possible to follow another car

  • Differences in pace between cars due to driver skill and setup

  • Probability of safety or virtual safety car deployment (not applicable in FSR)

  • Some minor details to simulate standing starts, pit in/out laps, etc.

The output shows an expected (average) finish position for every car and race strategy, visualised as a heatmap graph. It offers strategy engineers practical insights for their baseline strategies. For example, for a circuit where overtaking is difficult, this analysis may show that it is better to make fewer pit stops or pit a few laps earlier to defend track position.


Engineer’s comment:

After qualifying P2 between R8G and Alpine, we discussed whether we should run Hard-Hard-Medium or Medium-Hard-Hard. It looked like many cars around us decided to start on mediums. We assumed it would be better to follow the train on the same compound and avoid fighting with cars on mediums early in the race. Besides, our simulations showed that avoiding multiple undercuts by cars on mediums and getting through traffic during the second stint on fresh hards would be faster with the Medium-Hard-Hard strategy.
 

Final thoughts

Race strategy optimisation is a difficult task that requires the application of mathematical analysis, efficient programming and a practical understanding of race dynamics. Our team has worked in this field for many years, and we constantly update our software using new live timing data and challenge ourselves in the most competitive racing series.


If your team needs help with strategy engineering or developing internal solutions to solve these issues accurately and quickly, contact us via our website or social networks.


This article was prepared with external contributions by the Arnage Competition sim racing team and Arsen Saifullin.

bottom of page