Precision Endurance Engineering Tool for Le Mans Ultimate. Built with Python, Streamlit, and Altair.
LMU Race Strategist is a high-fidelity race engineering dashboard designed for sim-racers competing in Le Mans Ultimate. Unlike simple fuel calculators, this tool acts as a Strategy Simulator. It accounts for complex variables such as pit lane loss, tire degradation vs. pit time saved, and safety car buffers.
Designed with a "Dark & Gold" minimalist aesthetic, it reduces cognitive load, allowing drivers to make split-second decisions during endurance stints.
- Hypercars (LMH/LMDh): Toyota, Ferrari 499P, Porsche 963, Peugeot 9X8, Cadillac, etc.
- LMGT3: Lexus RC F, Corvette Z06, BMW M4, Ford Mustang, etc.
- LMP2: Oreca 07 Gibson.
- Includes smart baseline fuel consumption data for all chassis.
- Iterative Race Solver: For time-limited races (e.g., 60 mins), the app runs a simulation loop to subtract "Pit Loss Time" from "Race Time" to calculate the exact achievable lap count.
- Dynamic Driving Styles: Switch between Quali, Full Push, Balanced, and Lift & Coast to see how pace affects strategy.
- "Splash & Dash" Logic: Automatically detects if the final stint requires a full tank or just a quick splash to cross the line.
- Double Stint Calculator: Mathematically compares time saved in pits (skipping tire change) vs. pace lost on track (worn tires).
- Verdict System: Gives a clear "β DOUBLE STINT" or "β CHANGE TIRES" recommendation based on user input.
- Fuel Burn Chart: Interactive "Sawtooth" graph (powered by Altair) visualizing fuel levels over the entire race distance.
- Mission Planner: A generate-able table with specific instructions for the Pit Crew (e.g., "BOX Lap 24, Add 45L").
- Core Logic: Python 3.10+
- UI/Frontend: Streamlit
- Data Processing: Pandas
- Visualization: Altair
-
Clone the repository:
git clone [https://github.com/your-username/lmu-strategist.git](https://github.com/your-username/lmu-strategist.git) cd lmu-strategist -
Install requirements:
pip install streamlit pandas altair
-
Launch the Dashboard:
streamlit run app.py
Most calculators fail at time-limited races because they assume you drive for the full 60 minutes.
- The Problem: If you pit once (losing 45s), you only drive for 59m 15s.
- Our Solution: The app runs a
forloop. It estimates laps, calculates pit stops, subtracts pit time, re-estimates laps, and repeats until the number converges. This prevents over-fueling.
The app uses the following inequality to determine strategy: $$ \text{Time}_{\text{Saved in Pits}} > (\text{Stint Laps} \times \text{Degradation per Lap}) $$ If true, the app recommends double-stinting the tires.
- High Contrast: Light text on dark background (#0b0d12) for readability in low-light sim rigs.
- Gold Accents: Highlights critical data points (Stint Length, Fuel to Add).
- No Clutter: Removal of unnecessary elements to focus on "Mission Critical" data.
- V1: Basic Calculator
- V3: Full Car Database & Styles
- V5: Precision Pit Loss Logic
- V6: Visual Graphs & Tire Strategy
- V7: Save/Load User Telemetry (Persistence)
- V8: Weather Impact Implementation
- V9: Fully Ai driven app
MIT License. Created for the Sim-Racing Community.