A 62-lap night race · one car · thousands of random races
How much is a Safety Car worth to your pit strategy?
This page opens up a race-strategy simulator piece by piece. A tyre-wear differential equation, a Markov chain for Safety Cars, a pit-lane geometry model and Monte Carlo with common random numbers each get their own section, with the equations, the parameter values and a live chart you can play with. Everything runs in your browser and results start appearing straight away.
Headline numbers are the saved results of the reference notebook (master seed 20251005, 10,000 paired races, Bonferroni-adjusted 95% intervals). The browser re-computes them live further down so you can compare.
The pipeline at a glance
Each race is built one lap at a time. Click a box to jump to its explanation.
One race, lap by lap
Three strategies drive the same random race: the same Safety Cars, the same lap-time noise and the same pit-crew luck. This is what common random numbers means, and it is why the comparison is fair. Press play, or drag the lap slider.
The model, one component at a time
Time is in seconds, fuel in kilograms and time steps are whole laps. The values below are the baseline. Each one is tagged with where it comes from: literature, public data or assumed. Assumed values are the ones the sensitivity study stress-tests.
A Lap time and fuel
On a Green lap, the time is a sum of separate effects. Each one can be seen and checked on its own:
Under a Virtual Safety Car or Safety Car, the neutralisation sets the pace, not the car: . This is why VSC/SC laps are identical for every strategy and cancel out of the comparison.
The fuel term falls by γ·b = 0.048 s per lap as the car gets lighter, while the wear term grows. Their balance shapes the best stint length.
B Tyre wear as a differential equation, solved with RK4
Tyre degradation w (seconds lost per lap) grows with tyre age a. It grows faster with a heavy car, faster again once the tyre is already worn, and slower behind a Safety Car:
For a constant status the equation separates and has an exact solution, which is used to check the numerical solver:
The simulator takes one classical Runge–Kutta (RK4) step per lap, because the status (and so φ) is constant within a lap:
C Safety Cars as a Markov chain
Each lap the track is Green, under a Virtual Safety Car (VSC) or under a Safety Car (SC). Next lap's status depends only on this lap's status, which makes it a discrete-time Markov chain. A real Safety Car lasts at least a few laps, so the SC state is split into phases that must be passed in order. After that it ends each lap with probability :
Lap 1 has its own, higher SC probability, because start crashes are common. Long-run fractions of Green / VSC / SC laps follow from a renewal argument and match the chain's stationary distribution .
D What a pit stop costs, and why it is cheaper under a Safety Car
Driving through the pit lane at the speed limit takes . The same stretch on track takes at racing speed, so a Green stop loses plus the time stationary in the box. Under a neutralisation the track section is times slower, but the speed-limited lane is not. The lost time therefore shrinks by
The stationary crew time is random. It has a hard minimum plus a right-skewed tail (a slow wheel nut). It is modelled as a shifted lognormal and sampled from uniforms with the Box–Muller transform:
E Monte Carlo with common random numbers
One race says little. We run thousands and estimate the expected race time. The key question is the difference between two strategies. If both are run on the same scenarios, the shared luck (Safety Cars, noise, crew time) cancels. The variance of the difference collapses:
The 95% confidence interval is . Its width falls like . The chart on the right streams results while the simulation is still running, so you never wait for it to finish.
The dots lie on a thin line because both strategies saw the same race. Safety Cars move a race up or down the line, not off it.
Strategy lab
Change the world and the strategies, and the comparison re-runs in the background. The first numbers appear after about 250 races and sharpen as more arrive. The first row is the reference for the paired differences.
World
Strategies
The study's answer
The study screened 272 legal strategies on 1,000 common scenarios. It shortlisted the best one-stop, two-stop and pit-if-neutralised plans, then re-ran them on 10,000 fresh scenarios. The fresh run avoids the "winner's curse" bias from picking the best of many. The table shows the notebook's saved numbers next to a live in-browser re-run with an independent random generator.
More Safety Cars make the two-stop worse. SC laps replace Green laps where worn tyres cost time, and tyres barely wear under the SC, so fresh tyres are worth less. The pit-if-neutralised plan improves steadily and overtakes the one-stop at about PGS ≈ 0.042.
The HARD tyre's wear rate and the Safety-Car rate dominate. The pit-loss reduction αSC and the crew-time spread barely matter. Tyre wear is therefore the first thing to calibrate with real timing data.
What if…? Historic races, replayed through the model
Hypothetical and model-based. Each scenario borrows the Safety-Car timing of a real race (approximate laps) and replays it with this page's single, Singapore-calibrated car. The model has no track position, traffic, overtaking or refuelling, so it measures time, not who would have won. Where the history turned on track position, the scenario says so.
Checks you can watch run
The same checks as the reference notebook, re-run in your browser against the JavaScript port. The port was also fed the Python code's own random scenarios: it reproduced all 900 race times to within 10−11 s.
Assumptions and limits, in plain words
- Laps are the clock. 62 laps, no red flags. Status, stops and tyre age change once per lap.
- Track status ignores us. One car barely changes crash risk, so every strategy can share the same Safety Cars. This is what makes common random numbers valid.
- Markov after lap 1. The incident rate is constant after the start, and lap 1 has its own SC probability.
- SCs have a minimum length. At least m laps, then a geometric tail. VSC and SC always end in Green.
- Neutralised laps run at a set pace (ks·t0), the same for every strategy.
- Lap time is a sum of effects: base, compound, wear, fuel and noise.
- Smooth tyre wear that speeds up as the tyre wears, with no sudden "cliff" inside a stint.
- The pit lane runs at the limit speed. Only the bypassed stretch of track slows under VSC/SC.
- Random inputs: Gaussian lap noise and shifted-lognormal crew times, independent of each other.
- Objective: expected race time for one car. No positions, traffic, undercuts or points.
- Parameters marked assumed still need calibration from real timing data.
- The pit loss uses the 80 km/h pit-lane limit. The earlier 60 km/h limit cost about 6 s more per stop (see the what-if).
References
- A. Heilmeier, M. Graf, J. Betz, M. Lienkamp, “Application of Monte Carlo methods to consider probabilistic effects in a race simulation for circuit motorsport,” Applied Sciences 10(12):4229, 2020.
- A. Heilmeier, A. Thomaser, M. Graf, J. Betz, “Virtual Strategy Engineer,” Applied Sciences 10(21):7805, 2020.
- J. Bekker, W. Lotz, “Planning Formula One race strategies using discrete-event simulation,” J. Oper. Res. Soc. 60(7):952–961, 2009.
- A. M. Law, Simulation Modeling and Analysis, 5th ed., McGraw-Hill, 2015.
- P. Glasserman, Monte Carlo Methods in Financial Engineering, Springer, 2003.