Metadata-Version: 2.4
Name: immrax
Version: 0.3.3
Project-URL: Homepage, https://github.com/gtfactslab/immrax
Project-URL: Documentation, https://immrax.readthedocs.io
Project-URL: Bug Tracker, https://github.com/gtfactslab/immrax/issues
Project-URL: Source Code, https://github.com/gtfactslab/immrax
Requires-Dist: absl-py
Requires-Dist: cvxpy
Requires-Dist: diffrax~=0.7.0
Requires-Dist: dm-haiku
Requires-Dist: dm-tree
Requires-Dist: einshape
Requires-Dist: equinox~=0.12.2
Requires-Dist: immutabledict~=4.2.0
Requires-Dist: jaxtyping~=0.2.33
Requires-Dist: jax~=0.6.1
Requires-Dist: linrax~=0.1.0
Requires-Dist: matplotlib~=3.9.2
Requires-Dist: ml-collections
Requires-Dist: numpy~=2.3.2
Requires-Dist: optax
Requires-Dist: pypoman~=1.1.0
Requires-Dist: scipy~=1.16.1
Requires-Dist: shapely~=2.0.6
Requires-Dist: tabulate~=0.9.0
Provides-Extra: cuda
Requires-Dist: jax[cuda12]~=0.6.1; extra == 'cuda'
Requires-Dist: linrax[cuda]; extra == 'cuda'
Provides-Extra: examples
Requires-Dist: casadi~=3.6.7; extra == 'examples'
Requires-Dist: control~=0.10.1; extra == 'examples'
Requires-Dist: ipykernel~=6.29.5; extra == 'examples'
Requires-Dist: ipympl~=0.9.7; extra == 'examples'
Description-Content-Type: text/markdown

# 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](https://immrax.readthedocs.io).

## Dependencies

`immrax` depends on the library `pypoman`, which internally uses `pycddlib` as a wrapper around [the cdd library](https://people.inf.ethz.ch/fukudak/cdd_home/). For this wrapper to function properly, you must install `cdd` to your system. On Ubuntu, the relevant packages can be installed with

```bash
apt-get install -y libcdd-dev libgmp-dev
```

On Arch linux, you can use

```bash
pacman -S cddlib
```

## Installation

### Setting up a `conda` environment

We recommend installing JAX and `immrax` into a `conda` environment ([miniconda](https://docs.conda.io/projects/miniconda/en/latest/)).

```shell
conda create -n immrax python=3.12
conda activate immrax
```

### Installing immrax

`immrax` is available as a package on PyPI and can be installed with `pip`.

```shell
pip install immrax
```

If you have cuda-enabled hardware you wish to utilize, please install the `cuda` optional dependency group.

```shell
...
pip install immrax[cuda]
```

To test if the installation process worked, run the `compare.py` example. The additional `examples` optional dependency group contains some dependencies needed for the more complex examples; be sure to also install it if you want to run the others.

```shell
cd examples
python compare.py
```

This should return the outputs of different inclusion functions as well as their runtimes.

## 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.}
}
```
