Meet Sector Four

A lap has three timing sectors. Sector Four is the joke name of a small online F1 analytics study group: the fourth sector is whatever you find in the data afterwards. Its five members are fictional. They have no connection to any real team and no inside information. Each one asks the questions one kind of reader would ask, and they turn up in chapter openings, short exchanges and the Project Checkpoints at the end of each chapter.

The five members

Ines Duarte (🏎️ Fan) is 27 and works as a physiotherapist in Lisbon. She became a fan in 2021 through Drive to Survive, and she asks the group's sharpest question, over and over: but why did they pit? Her day job makes her curious about what a race does to the human body (Chapter 9).

Tomasz "Tom" Kowal (🔧 Engineering) is 21, a mechanical engineering student and aero lead on his university's Formula Student team. He wants the derivation, and he is happiest when a physics model lines up with a real speed trace.

Aisha Bello (📊 Analytics) is 31, a data scientist at a logistics company. She writes strong Python and is new to racing. She builds the group's simulator, Box Box, and owns most of the Project Checkpoints.

Kenji Mori (🎮 Sim Racer) is 17 and races in online leagues on iRacing, ACC and the official F1 game. He wants to know where the braking point is and why his overlay of two laps never quite lines up.

Ray Castellano (🎰 Betting) is 61, a retired actuary who has followed F1 since the 1980s and places small, careful bets. He is the group's historical memory and resident sceptic, and he loves a base rate.

The project: Box Box

Across the book, the group builds Box Box, a Formula One race-strategy simulator written as a Python package in project/boxbox/. Each chapter adds exactly one module, and each chapter's code/project_checkpoint.py shows that module working on real data. In Chapter 40 the pieces come together as a command-line tool that simulates a Grand Prix, finds the optimal and the robust strategies, and writes an HTML report. It is then validated against real 2025–2026 races.

Ch Module Delivers
1 physics.py CarParams dataclass (🧪 labelled defaults), forces, traction circle, max cornering speed vs radius with/without downforce
2 data.py RaceData loader: one object with a session's laps, stints, pits, flags, weather, results; offline from the processed parquet
3 aero.py downforce/drag vs speed, top-speed estimate from power & CdA, drag-reduction delta (DRS / 2026 active aero)
4 tyres.py compound table and TyreModel (warm-up, linear phase, cliff), with parameters fitted from stints
5 pacejka.py Magic Formula (lateral/longitudinal), friction ellipse, a simple 2-node thermal model
6 power.py PU power model, per-lap energy budget (era-aware: 2014–25 vs 2026), fuel burn per lap
7 brakes.py braking-zone extraction from telemetry, deceleration estimates, braking-distance model
8 setup.py load transfer, a ride-height/stiffness trade-off toy model, setup scoring
9 driver.py driver noise model (lap-time σ, error rate) estimated from data
10 circuit.py Circuit profile: length, corners, full-throttle share, straights, measured pit loss
11 lapsim.py quasi-steady-state point-mass lap simulator using physics, aero, power, circuit
12 strategy.py enumerate legal strategies, total race time, optimizer (the core)
13 undercut.py undercut/overcut gain calculator using out-lap/in-lap deltas
14 neutralisation.py SC/VSC hazard by circuit and lap, reduced pit loss under SC/VSC
15 wet.py slick/inter/wet crossover model, lap-time penalty vs track wetness
16 qualifying.py track evolution model, cut-line predictor, run-plan timing
17 start.py lap-1 position-change model (by grid slot / circuit)
18 pitwall.py event-driven live decision loop (lap-by-lap state, rule-based calls, decision log)
19 laptime.py sector & mini-sector comparison, theoretical best lap
20 pace.py fuel- and traffic-corrected race-pace estimator (the simulator's base pace)
21 ratings.py teammate gaps and an Elo/regression driver rating
22 degradation.py deg model by compound × circuit × track temp; feeds strategy
23 telemetry_tools.py distance-aligned comparisons, delta trace, corner-by-corner table
24 development.py team pace-trend tracker (gap to fastest, by circuit type)
25 viz.py simulator output charts: race trace, strategy bars, outcome distributions
26 predict.py quali/race prediction model, championship simulation
27 montecarlo.py Monte Carlo race engine (SC, weather, DNF, lap-1 shuffles)
28 regs.py rule constraints: two-compound rule, tyre allocation, min/max stops (era-aware)
29 regs2026.py 2026 adjustments (energy deployment, overtake mode, no DRS) for simulations
30 upgrades.py upgrade-effect estimator (before/after with circuit control)
31 budget.py cost-cap allocation optimizer (toy operations-research model)
32 eras.py cross-era normalisation (gap to field, dominance indices)
33 economics.py value of a championship position (points → prize money model from reference data)
34 pitstops.py pit-lane time distributions by team, slow-stop risk
35 overtaking.py pass-probability model from pace delta (+ tyre delta, circuit) for traffic in the sim
36 conditions.py weather scenario generator (rain probability, track-temp effect)
37 reliability.py DNF hazard model by era/team/lap, penalty risk
38 betting.py odds ↔ probabilities, overround removal, edge, Kelly sizing
39 series.py rule profiles for other series (refuelling, fuel-saving, stage racing)
40 cli.py + report.py + project/tests/ python -m boxbox simulate …, HTML report, smoke tests