feat: skidpad score sensitivity experiment - #3
Merged
Merged
Conversation
OAT (one-at-a-time) +-15% sensitivity of the average timed-lap score (skidpad_score_s) to the four-wheel model and solver parameters. Builds the skidpad track once, re-solves the OCP per perturbation in parallel, and ranks parameters by lap-time swing and elasticity. Outputs a tornado plot, per-solve CSV, and JSON summary. Findings (baseline score 4.740 s, all solves converged): rear tyre peak grip D_rear dominates (0.64 s over +-15%), then front grip, mass, and downforce C_l (~0.2 s each); margin, drag, reg_u_l2, CG height, and Iz are negligible (<0.02 s).
There was a problem hiding this comment.
Pull request overview
Adds a one-at-a-time (OAT) local sensitivity experiment for the skidpad LTO, quantifying how the skidpad FS score (profiling.skidpad_score_s) responds to key four-wheel model and solver parameters, along with captured output artifacts for reproducibility and reporting.
Changes:
- Introduces
src/experiments/skidpad_sensitivity.pyto run baseline + ±delta perturbation solves (optionally parallel) and emit CSV/PNG/JSON outputs. - Adds recorded experiment outputs under
data/sensitivity/(raw per-solve CSV + machine-readable JSON summary). - Adds a
data/sensitivity/README.mddescribing method, results table, and takeaways.
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/experiments/skidpad_sensitivity.py | New OAT sensitivity experiment runner (job construction, parallel solving, elasticity/swing ranking, CSV/PNG/JSON outputs). |
| data/sensitivity/skidpad_sensitivity.csv | Captured raw per-solve results for baseline and perturbations. |
| data/sensitivity/skidpad_sensitivity_summary.json | Captured summarized sensitivities (base value, lo/hi scores, swing, elasticity) for downstream use. |
| data/sensitivity/README.md | Documents reproduction command, methodology, results table, and conclusions. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+164
to
+166
| def _make_integrator(name: str): | ||
| return RK4Integrator() if name == "rk4" else EulerIntegrator() | ||
|
|
| elif knob.name == "boundary_margin": | ||
| boundary_margin = new_val | ||
|
|
||
| tag = f"{knob.name}_x{multiplier:.2f}".replace(".", "p") |
Comment on lines
+411
to
+412
| lo_tag = f"{knob.name}_x{multipliers[0]:.2f}".replace(".", "p") | ||
| hi_tag = f"{knob.name}_x{multipliers[1]:.2f}".replace(".", "p") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a one-at-a-time (OAT) local sensitivity study for the skidpad LTO, measuring how the average timed-lap time (the FS score,
profiling.skidpad_score_s= mean of the two timed laps) responds to the four-wheel model and solver parameters.src/experiments/skidpad_sensitivity.py): builds the skidpad track once, then re-solves the four-wheel OCP for each perturbation in parallel (ProcessPoolExecutor). Each parameter is moved ±15% around the baseline, one at a time; grouped knobs (D_rear=D_rr&D_rl,D_front=D_fl&D_fr) scale together. Reports absolute lap-time swing and dimensionless elasticityE = (Δscore/score)/(Δp/p), and emits a tornado plot, a per-solve CSV, and a JSON summary.data/sensitivity/): tornado plot, raw CSV, JSON summary, and a README documenting method and takeaways.Reproduce:
OMP_NUM_THREADS=1 OPENBLAS_NUM_THREADS=1 MKL_NUM_THREADS=1 \ PYTHONPATH=src python src/experiments/skidpad_sensitivity.py \ --config configs/skidpad.yaml --delta 0.15 --jobs 4Results
Baseline average timed-lap score 4.740 s; all 19 solves returned
Solve_Succeeded.D_rearD_frontmC_lboundary_marginC_dreg_u_l2hIzTakeaways
D_reardominates — ~3× the next parameter. Skidpad is a steady-state, grip-limited corner, and the rear-biased static load (lf > lr) makes the rears the limiting pair.C_lare the meaningful levers (~0.2 s each, opposite signs);C_l's benefit is v²-scaled and modest at skidpad speeds (~12 m/s).reg_u_l2,boundary_margin,C_d,h, andIzare negligible (<0.02 s over ±15%).Generated by Claude Code