Skip to content

Repository files navigation

BNB-QP Reach-Avoid Solver

This repository contains a JAX-based branch-and-bound QP solver for STL-style reach-avoid trajectory optimization. The branch-and-bound layer fixes binary logic variables, and each continuous node relaxation is solved by the structured ADMM / TVLQR backend in primal_dual_ilqr/.

Repository Layout

  • bnb/: branch-and-bound search, node batching, queue management, ADMM adapter, incumbent filtering, and debug logging.
  • primal_dual_ilqr/: low-level structured trajectory QP solvers. The active backend is admm_tvlqr.py; fast_sls.py contains the migrated SLS backend.
  • reach_avoid_bnb.py: single-target reach-avoid model, SCP loop, MPC loop, plotting helpers, and conversion into BNB problem data.
  • ordered_reach_avoid_bnb.py: ordered multi-target reach-avoid variant.
  • plot_bnb_reach_avoid.py: main CLI for the reach-avoid MPC/SCP examples.
  • plot_ordered_reach_avoid.py: CLI for the ordered reach-avoid example.
  • tests/: regression tests for ADMM wrapping, BNB search behavior, warm starts, infeasibility handling, SCP/MPC logic, plotting labels, and repository hygiene.
  • example_outputs/reach_avoid_examples/: curated example plots and JSONL traces.

Environment

Run Python through the bnb conda environment:

conda run -n bnb python -V
conda run -n bnb python -m pytest tests -q

Use commands from the repository root:

cd /home/tailinfan/primal_dual_ilqr_stl_solver

Main Example

The primary reach-avoid MPC example is:

conda run -n bnb python plot_bnb_reach_avoid.py \
  --output example_outputs/reach_avoid_examples/reach_avoid_mpc4.png \
  --Np 2 --Ns 2 \
  --T 20 \
  --dt 1.0 \
  --admm-solver-mode adaptive \
  --rho-update-frequency 10 \
  --scp-max-iterations 4 \
  --mpc-steps 4

See USAGE.md for the full file guide, test commands, and the exact parameters used for the three checked example plots and JSONL traces.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages