Skip to content

Add RunwayLibProtectionLevels package#152

Open
RomeoV wants to merge 14 commits into
masterfrom
protection-levels
Open

Add RunwayLibProtectionLevels package#152
RomeoV wants to merge 14 commits into
masterfrom
protection-levels

Conversation

@RomeoV
Copy link
Copy Markdown
Owner

@RomeoV RomeoV commented Feb 11, 2026

Summary

  • Adds libs/RunwayLibProtectionLevels/ package with Ipopt-based gradient protection level computation (~38x faster than NelderMead)
  • Moves NelderMead PL and worst-case fault slope code from RunwayLib core into the library
  • Includes bidirectional PL, AD-safe integrity stat (pinv→LU fix), and CI job for the lib
  • Adds Pluto notebook (pluto_notebooks/protection-levels.jl) demoing the full PL workflow: pose estimation, integrity check, Ipopt vs NelderMead comparison with bar chart
  • Adds notebook CI job (Julia 1.13) and launch.jl script for local development with local package resolution

Test plan

  • 713 tests passing (constraint satisfaction, optimality, NM vs Ipopt consistency, JET type stability)
  • Chairmarks benchmarks (~200ms warmed for both-direction PL)
  • Pluto notebook runs cleanly (19/19 cells pass)
  • CI runs on Julia 1 and 1.12

🤖 Generated with Claude Code

RomeoV and others added 14 commits February 10, 2026 23:12
Implements compute_zero_fault_protection_level() using Nelder-Mead with
log-barrier penalties and progressive tightening, followed by a line
search to push to the constraint boundary.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ction

- direction=0 (default) computes both lo/hi, warm-starting hi with flipped Δy
- Val dispatch on direction for different return types
- Unified _project_to_boundary replaces ad-hoc shrink/expand logic
- verbose kwarg prints formatted results table with solve count
- Printf dep added for table formatting

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Bilevel optimization (Ipopt outer + NonlinearSolve IFT inner) for ~30x
faster zero-fault protection level computation. Replaces pinv with LU
decomposition in integrity.jl for AD compatibility, enabling direct reuse
of RunwayLib's compute_whitened_parity_residual. Relaxes LinearSolve
upper bound to allow NonlinearSolveBase 2.11.2.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ectionLevels

Moves compute_zero_fault_protection_level (NelderMead) and
compute_worst_case_fault_direction_and_slope from RunwayLib into the
RunwayLibProtectionLevels library package. Removes unused SparseArrays
import from integrity.jl.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Verifies both solvers agree within 3% (or 0.1m absolute) for all three
pose components. Also fixes Size-based reshape incompatibility in NM code.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add protection-levels.jl notebook showcasing the full PL workflow (pose
estimation, integrity check, Ipopt/NelderMead PL comparison with plot).
Include launch.jl to resolve local packages before opening Pluto.
Fix stale `constraints` arg in optimization.jl from rebase, and update
notebook CI to conditionally dev RunwayLibProtectionLevels.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The `dir *` multiplier was flipping the sign for `lo`, making it always
positive. NelderMead returns `pos - ref` directly (negative for lo),
so Ipopt should match. Updated test accordingly.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This function is part of integrity monitoring, not protection levels.
Move it back to src/integrity/integrity.jl and re-export from RunwayLib.
RunwayLibProtectionLevels now imports and re-exports it instead of
defining its own copy.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant