immrax
immrax is a tool for interval analysis and mixed monotone reachability analysis in JAX.
Inclusion function transformations are composable with existing JAX transformations, allowing the use of Automatic Differentiation to learn relationships between inputs and outputs, as well as parallelization and GPU capabilities for quick, accurate reachable set estimation.
For more information, please see the full documentation.
Installation
System Dependencies
immrax depends on the library pypoman, which internally uses pycddlib as a wrapper around the cdd library. For this wrapper to function properly, you must install cdd to your system. On Ubuntu, the relevant packages can be installed with
apt-get install -y libcdd-dev libgmp-dev
On Arch linux, you can use
pacman -S cddlib
Package
immrax is available as a package on PyPI and can be installed with pip.
pip install immrax
We recommend you use a python virtual environment (e.g. through pip, conda, uv, etc.).
Hardware Acceleration
immrax supports hardware acceleration through JAX. You can install the cuda12 or cuda13 extras it supplies directly, or manually choose a different JAX accelerator. (Our development machines are all currently CUDA based; other methods are untested.)
pip install "jax[rocm7-local]"
See the JAX installation guide for further details.
Development
Simply clone this repo to get started with immrax development. We manage dependencies with uv; to create a virtual environment with everything you need run
uv sync
The above comments on system dependencies still apply.
Examples
To test if the installation process worked, run the compare.py example. This should return the outputs of different inclusion functions as well as their runtimes.
uv run examples/compare.py
The additional examples extra contains some dependencies needed for the more complex examples; be sure to also install it if you want to run the others.
Other Tooling
We have a useful (though not yet comprehensive) test suite that can be run with
uv run pytest
Automatic linting and formatting is done with ruff
uv run ruff check # lint all project files, report only
uv run ruff format # autoformat all project files
This repo also ships a tracked git pre-commit hook that runs ruff check --fix and ruff format on staged Python files automatically. Enable it once per clone with
git config core.hooksPath .githooks
The hook is non-blocking: it applies safe fixes and formatting, warns if any unfixable lint issues remain, and lets the commit proceed.
Citation
If you find this library useful, please cite our paper with the following bibtex entry.
@article{immrax,
title = {immrax: A Parallelizable and Differentiable Toolbox for Interval Analysis and Mixed Monotone Reachability in {JAX}},
journal = {IFAC-PapersOnLine},
volume = {58},
number = {11},
pages = {75-80},
year = {2024},
note = {8th IFAC Conference on Analysis and Design of Hybrid Systems ADHS 2024},
issn = {2405-8963},
doi = {https://doi.org/10.1016/j.ifacol.2024.07.428},
url = {https://www.sciencedirect.com/science/article/pii/S2405896324005275},
author = {Akash Harapanahalli and Saber Jafarpour and Samuel Coogan},
keywords = {Interval analysis, Reachability analysis, Automatic differentiation, Parallel computation, Computational tools, Optimal control, Robust control},
abstract = {We present an implementation of interval analysis and mixed monotone interval reachability analysis as function transforms in Python, fully composable with the computational framework JAX. The resulting toolbox inherits several key features from JAX, including computational efficiency through Just-In-Time Compilation, GPU acceleration for quick parallelized computations, and Automatic Differentiability We demonstrate the toolbox’s performance on several case studies, including a reachability problem on a vehicle model controlled by a neural network, and a robust closed-loop optimal control problem for a swinging pendulum.}
}
Metadata
Release files for immrax 0.3.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| immrax-0.3.8.tar.gz | 7.7 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| immrax-0.3.8-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.7 MB
Release files / immrax-0.3.8.tar.gz
| Download URL | immrax-0.3.8.tar.gz |
|---|---|
| Size | 7.7 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9aed6eb00df980b0e59f68a9ebe4c8fb02c8a50eecb4fe69ecc529daaa6d3f45
|
|
BLAKE2b-256 checksum How to use checksums |
325c0cd10ea8dfbf74d67cbad96f5ab3c34c76f7452d697da6b09d245d60bb08
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.0 {"installer":{"name":"uv","version":"0.13.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / immrax-0.3.8-py3-none-any.whl
| Download URL | immrax-0.3.8-py3-none-any.whl |
|---|---|
| Size | 68.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
584318f10a65eb75ab9d471d27c77a0c0d21e335731d7a2856a4f76b23666b16
|
|
BLAKE2b-256 checksum How to use checksums |
6baef8809de95a635f555b4cc9eea4a6fa3d72cffbfc513f0b1fa6c7d355ac87
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.0 {"installer":{"name":"uv","version":"0.13.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|