Journey 07 — Ranked mission envelope
Ranked mission envelope: terminal_metrics turns each trajectory into mission_ok gates and a sortable finalists table for GN&C / battery trade studies.
Prerequisites: Journeys 03–06 — ranking vs trajectory-only models understood. Scenario: 256-point drone envelope | mission_ok | 45 min coupled model
Key APIs
solvjump run examples/battery_mission_study.yamlterminal_metrics(final_state, params)finalist_sort_key (optional hook)sweep CSV / finalists output
Concepts to internalize
- mission_ok gate — binary feasibility before ranking score; failed missions sort last.
- 256-point envelope — payload, temperature, headwind, pack-aging corners on a 45-minute coupled model.
- Ranked CSV — finalists proven later in Journey 11 golden run.
- Coupled S1 plant — battery + mission dynamics; jump path when gates pass, adaptive when not.
Important code
The guided tour script wraps this pattern. Copy the production shape into your pipeline:
solvjump run examples/battery_mission_study.yaml
# model.py pattern:
# def terminal_metrics(y_final, params):
# return {"mission_ok": bool(...), "rank": float(...)}Act-by-act walkthrough
Act 1 — The customer question
Can we complete a 45-minute delivery across payload, temperature, headwind, and pack-aging corners? terminal_metrics() turns each trajectory into a ranked row.
Act 2 — Scoring vs dynamics
Every key under params: affects the ODE. scoring_params: (shown on satellite) change only the ranking hook — they do not re-integrate.
Act 3 — Run the envelope
Study file: battery_mission_study.yaml
Study definition
| Field | Value | Notes |
|---|---|---|
model | <product-root>\python\examples\battery_mission_model.py:make_rhs | |
dynamics_params | payload_kg in [0, 0.8], temp_C in [-10, 40], headwind_mps in [0, 12], pack_cycles in [0, 400] | |
y0 | [1.0, 0.0, 0.0, 0.0, 0.35] | |
t_span | [0.0, 2700.0] | |
mode | auto | |
calibration_seeds | 12 | |
jump_lags | [0.1, 0.5, 1.0] | |
safety_margin | 1.5 |
Operator routing, calibration & sweep (3 steps)
| Field | Value | Notes |
|---|---|---|
model | <product-root>\python\examples\battery_mission_model.py:make_rhs | |
dim | 5 | |
stiffness_nom | S1 | |
horizon | [0.0, 2700.0] | |
problem_set_operators | 256 | piecewise_linear_3regime |
- Jump recommendation: confidence=exact, cache_ref=<operator_id>, mode=auto
| Field | Value | Notes |
|---|---|---|
seeds | 12 | |
reason | no exact cache match for this model | Collecting trajectory training pairs: jump lag=25.0s, SolvTune arm=solvsrk, objective=balanced, target chain=108 |
-
SRK collection done - 144 train pairs from 3 trajectories (0 failed, need >=8 train)
-
Fitted nominal+guard kernels - train median SCD=3.59, holdout median SCD=1.75 (n=8/8)
-
Rollout validation - SCD by chain depth [1:1.75, 10:1.04, 50:0.45], max_valid_chain=1 (single_step_only)
-
Accuracy gate passed (operator <operator_id>)
| Field | Value | Notes |
|---|---|---|
method | grid | |
grid_points | 256 | |
steps | 108 | |
dt | 25.0 | |
compare_brute_srk | True | |
finalists | 50 | Sweep finished - example params {'payload_kg': 0.5333333333333333, 'temp_C': 23.333333333333336, 'headwind_mps': 0.0, 'pack_cycles': 0.0}, final state ~ [0.406, 0.2413, 0.6995, 0.7196, 0.5559] |
-
SRK timing sample: 3 point(s) integrated for comparison
-
Horizon aligned: 108 jumps x 25.0 s = 2700.0 s (jump_lag matches dt)
| Field | Value | Notes |
|---|---|---|
! Degeneracy guard tripped on 65 grid point(s) - sweep mode | srk_fallback | Jump pool (NOT SRK truth): top 50 of 87 by jump metrics -> finalists_top50.csv |
- #1 mission margin: payload=0.27 kg, temp=40 C -> SOC=50.0%, V=21.2 V
| Field | Value | Notes |
|---|---|---|
srk_sample_n | 50 | |
full_grid_truth | True | |
min_spearman | 0.85 | Full-grid SRK truth: 87/191 rankable in 109.6 s |
SRK ground truth (authoritative top-N)
| Field | Value | Notes |
|---|---|---|
grid_points | 256 | |
srk_ranked | 87 | |
export | finalists_ground_truth_top87.csv | |
srk_best_jump_rank | 1 | SRK top-10 in jump top-500: 10/10 (100% recall) |
-
SRK top-50 in jump top-500: 50/50 (100% recall)
-
SRK top-100 in jump top-500: 87/87 (100% recall)
Rank verification (jump vs full SRK)
| Field | Value | Notes |
|---|---|---|
verified_rows | 50/87 jump-ranked rows | |
spearman_rho | 1.000 (gate >= 0.85) | |
srk_verify_time | 29.7 s | |
best_srk_jump_rank | #1 (regret 0) | |
verdict | PASS — safe to cite finalist ranking | top-10 overlap: 10/10 (100%) |
-
top-50 overlap: 50/50 (100%)
-
top-100 overlap: skipped (sample size 50 < top_n 100)
-
mission_ok agreement (jump vs SRK): 100%
-
Report: <session-dir>\rank_verification_report.json
-
SRK shortlist (verified ranking for HPC handoff): <session-dir>\srk_shortlist.csv
-
SRK ground truth (authoritative): <session-dir>\finalists_ground_truth_top87.csv
-
Authoritative deliverable: finalists_ground_truth_top87.csv (SRK ground truth — use this for HPC handoff)
Act 4 — Next
If jump was untrusted, Journey 08 runs the same physics with strategy: adaptive so every finalist is a real SolvSRK integration.
Why run SolvJump here?
-
Map a 45-minute delivery envelope (191 payload/temperature/headwind corners) in one workshop run.
-
Leave with a ranked shortlist of mission-feasible parameter sets for the RFP.
-
See which corners fail mission_ok before committing hardware or schedule.
Guided tour output
Verified console capture from 07_ranked_mission.py:
256-point drone envelope | mission_ok | 45 min coupled model
-- Act 1 - The customer question --
-> Can we complete a 45-minute delivery across payload, temperature, headwind, and pack-aging corners? terminal_metrics() turns each trajectory into a ranked row.
-- Act 2 - Scoring vs dynamics --
-> Every key under params: affects the ODE. scoring_params: (shown on satellite) change only the ranking hook — they do not re-integrate.
-- Act 3 - Run the envelope --
-> Study file: battery_mission_study.yaml
_section: Study definition
model: <product-root>\python\examples\battery_mission_model.py:make_rhs
dynamics_params: payload_kg in [0, 0.8], temp_C in [-10, 40], headwind_mps in [0, 12], pack_cycles in [0, 400]
y0: [1.0, 0.0, 0.0, 0.0, 0.35]
t_span: [0.0, 2700.0]
mode: auto
calibration_seeds: 12
jump_lags: [0.1, 0.5, 1.0]
safety_margin: 1.5
_section: Operator routing, calibration & sweep (3 steps)
model: <product-root>\python\examples\battery_mission_model.py:make_rhs
dim: 5
stiffness_nom: S1
horizon: [0.0, 2700.0]
problem_set_operators: 256
-> piecewise_linear_3regime | dim=5 | stiffness=S1 | dynamics=relaxation
log: Jump recommendation: confidence=exact, cache_ref=<operator_id>, mode=auto
seeds: 12
reason: no exact cache match for this model
-> Collecting trajectory training pairs: jump lag=25.0s, SolvTune arm=solvsrk, objective=balanced, target chain=108
log: SRK collection done - 144 train pairs from 3 trajectories (0 failed, need >=8 train)
log: Fitted nominal+guard kernels - train median SCD=3.59, holdout median SCD=1.75 (n=8/8)
log: Rollout validation - SCD by chain depth [1:1.75, 10:1.04, 50:0.45], max_valid_chain=1 (single_step_only)
log: Accuracy gate passed (operator <operator_id>)
method: grid
grid_points: 256
steps: 108
dt: 25.0
compare_brute_srk: True
finalists: 50
-> Sweep finished - example params {'payload_kg': 0.5333333333333333, 'temp_C': 23.333333333333336, 'headwind_mps': 0.0, 'pack_cycles': 0.0}, final state ~ [0.406, 0.2413, 0.6995, 0.7196, 0.5559]
log: SRK timing sample: 3 point(s) integrated for comparison
log: Horizon aligned: 108 jumps x 25.0 s = 2700.0 s (jump_lag matches dt)
! Degeneracy guard tripped on 65 grid point(s) - sweep mode: srk_fallback
-> Jump pool (NOT SRK truth): top 50 of 87 by jump metrics -> finalists_top50.csv
log: #1 mission margin: payload=0.27 kg, temp=40 C -> SOC=50.0%, V=21.2 V
srk_sample_n: 50
full_grid_truth: True
min_spearman: 0.85
-> Full-grid SRK truth: 87/191 rankable in 109.6 s
_section: SRK ground truth (authoritative top-N)
grid_points: 256
srk_ranked: 87
export: finalists_ground_truth_top87.csv
srk_best_jump_rank: 1
-> SRK top-10 in jump top-500: 10/10 (100% recall)
log: SRK top-50 in jump top-500: 50/50 (100% recall)
log: SRK top-100 in jump top-500: 87/87 (100% recall)
_section: Rank verification (jump vs full SRK)
verified_rows: 50/87 jump-ranked rows
spearman_rho: 1.000 (gate >= 0.85)
srk_verify_time: 29.7 s
best_srk_jump_rank: #1 (regret 0)
verdict: PASS — safe to cite finalist ranking
-> top-10 overlap: 10/10 (100%)
log: top-50 overlap: 50/50 (100%)
log: top-100 overlap: skipped (sample size 50 < top_n 100)
log: mission_ok agreement (jump vs SRK): 100%
log: Report: <session-dir>\rank_verification_report.json
log: SRK shortlist (verified ranking for HPC handoff): <session-dir>\srk_shortlist.csv
log: SRK ground truth (authoritative): <session-dir>\finalists_ground_truth_top87.csv
log: Authoritative deliverable: finalists_ground_truth_top87.csv (SRK ground truth — use this for HPC handoff)
-- Act 4 - Next --
-> If jump was untrusted, Journey 08 runs the same physics with strategy: adaptive so every finalist is a real SolvSRK integration.
_section: Why run SolvJump here?
log: Map a 45-minute delivery envelope (191 payload/temperature/headwind corners) in one workshop run.
log: Leave with a ranked shortlist of mission-feasible parameter sets for the RFP.
log: See which corners fail mission_ok before committing hardware or schedule.
-- Run complete --
session_id: <session_id>
results_folder: <session-dir>
points_completed: 191 ok, 0 skipped (of 256)
fast_sweep: 123402.9 ms
timing_sample: 1710.0 ms (3 full-SolvSRK spot checks)
vs_full_SolvSRK_on_every_study_point: ~2.4 min for all 256 points in this study (from 3 spot checks — not a larger search)
speedup: ~1.2× vs full SolvSRK on every grid point
receipt_calibration: <session-dir>\calibration_receipt.json
receipt_sweep: <session-dir>\sweep_receipt.json
receipt_jump_pool: <session-dir>\finalists_top50.csv
receipt_rank_verification: <session-dir>\rank_verification_report.json
receipt_srk_shortlist: <session-dir>\srk_shortlist.csv
receipt_finalists: <session-dir>\finalists_ground_truth_top87.csv
-- Operator setup --
accuracy_check: acceptable quality
operator_id: <operator_id>
fit_time: 7.9 s (one-time before the sweep)
mission_criteria: SOC >= 20%, V >= 18 V, thermal limits after 45 min delivery profile
pass_count: 87/191 Monte Carlo samples
fail_count: 104
-- Sweep results --
completed: 191 parameter sets
skipped: 65 outside safe bounds
-- How long did this take? --
! Speedup under ~1.5× — jump is not buying much wall clock on this study. Common on cheap S0 models, long jump chains, or when the degeneracy guard falls back to full SolvSRK on many points.
search_method: fast jump sweep
grid_size: 256
operator_fit: 7.9 s
fast_sweep: 2.1 min
this_run_total: 2.2 min
vs_full_SolvSRK_on_every_study_point: ~2.4 min for all 256 points in this study (extrapolated from 3 spot checks — not a larger search)
speedup_vs_full_grid: ~1.2× (jump sweep vs brute estimate)
-- Act 4 - Next --
-- Why run SolvJump here? --
-- Run complete --
session_id: <session_id>
results_folder: <session-dir>
points_completed: 191 ok, 0 skipped (of 256)
fast_sweep: 123402.9 ms
timing_sample: 1710.0 ms (3 full-SolvSRK spot checks)
vs_full_SolvSRK_on_every_study_point: ~2.4 min for all 256 points in this study (from 3 spot checks — not a larger search)
speedup: ~1.2× vs full SolvSRK on every grid point
receipt_calibration: <session-dir>\calibration_receipt.json
receipt_sweep: <session-dir>\sweep_receipt.json
receipt_jump_pool: <session-dir>\finalists_top50.csv
receipt_rank_verification: <session-dir>\rank_verification_report.json
receipt_srk_shortlist: <session-dir>\srk_shortlist.csv
receipt_finalists: <session-dir>\finalists_ground_truth_top87.csvRun it
cd python
# Guided tour — narrated scenario walkthrough (recommended first run):
python examples/journeys/07_ranked_mission.py
# Production one-liner — same API call you ship:
solvjump run examples/battery_mission_study.yamlWhat comes next
Journey 08 switches to adaptive MFBO and inspects the evidence store.
Navigation
← Journey 06 — Proprietary chemistry · Journey 08 — Adaptive search and evidence →