f1-nexus-cli-1.0.0-alpha.2 is not a library.
f1-nexus-cli
Command-line interface for F1 Nexus - Optimize Formula 1 race strategies from your terminal.
Features
- 🏎️ Strategy Optimization: Find optimal pit stops with a single command
- 🎲 Race Simulation: Run Monte Carlo simulations for strategy validation
- 📊 Beautiful Output: Colored, formatted results with progress indicators
- ⚡ Fast: Optimization in <100ms, simulation in ~2 seconds
- 🔧 Flexible: Configure every aspect of race strategy
- 📈 Statistics: Confidence intervals, percentiles, distributions
Installation
cargo
From source
Quick Start
Optimize pit strategy
Output:
🏁 F1 Nexus Strategy Optimizer
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Track: Circuit de Monaco
Total Laps: 78
Available Compounds: C1, C2, C3
Optimal Strategy:
Starting Compound: C3 (Soft)
Pit Stops:
1. Lap 28 → C2 (Medium)
2. Lap 52 → C1 (Hard)
Predicted Race Time: 6847.2s (1:54:07.2)
Confidence: 87.5%
✓ Strategy optimized in 67ms
Simulate race
Output:
🎲 Running 10,000 race simulations...
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[████████████████████████████████] 10000/10000
Results:
Mean Finish Time: 4852.3s
Median: 4849.1s
Std Dev: ±23.7s
Percentiles:
P10: 4812.5s
P25: 4834.2s
P50: 4849.1s
P75: 4868.9s
P90: 4891.7s
DNF Probability: 2.3%
✓ Simulation complete in 2.1s
Commands
optimize
Find optimal pit stop strategy using dynamic programming.
Options:
--track <TRACK>- Circuit name (monaco, silverstone, spa, etc.)--laps <N>- Total race laps--compounds <C1,C2,C3>- Available tire compounds--position <N>- Starting position (default: 1)--fuel <KG>- Starting fuel in kg (default: 110.0)--json- Output as JSON
Example:
simulate
Run Monte Carlo race simulation.
Options:
--track <TRACK>- Circuit name--laps <N>- Total race laps--iterations <N>- Number of simulations (default: 10000)--strategy <FILE>- Load strategy from JSON file--json- Output as JSON
Example:
circuits
List all supported F1 circuits.
compounds
List all tire compound types.
Supported Circuits
- 🇲🇨 Monaco (Circuit de Monaco)
- 🇬🇧 Silverstone (Silverstone Circuit)
- 🇧🇪 Spa (Spa-Francorchamps)
- 🇮🇹 Monza (Autodromo Nazionale di Monza)
- 🇯🇵 Suzuka (Suzuka Circuit)
- 🇸🇬 Singapore (Marina Bay Street Circuit)
- 🇦🇪 Abu Dhabi (Yas Marina Circuit)
- ...and 17 more official F1 circuits
JSON Output
Use --json flag for machine-readable output:
|
Integration Examples
Use in shell scripts
#!/bin/bash
# Optimize for all circuits
for; do
done
Pipe to other tools
# Export to CSV
| \
# Compare strategies
|
Performance
- Optimization: 45-100ms for typical race
- Simulation: 1.8-2.5s for 10,000 iterations
- Memory: <50MB peak usage
- CPU: Utilizes all cores for simulation
Use Cases
- Race Engineers: Quick strategy calculations during practice/qualifying
- Strategy Analysts: Batch analysis of different scenarios
- Data Scientists: Generate training data for ML models
- Developers: Test F1 Nexus libraries
- Students: Learn about F1 strategy optimization
Configuration
Set environment variables:
# Enable debug logging
# Set thread count
# Set cache directory
Documentation
License
Licensed under either of Apache License, Version 2.0 or MIT license at your option.