Metadata-Version: 2.1
Name: xaddpy
Version: 0.1.0
Summary: XADD package in Python
Home-page: https://github.com/jihwan-jeong/xaddpy
Author: Jihwan Jeong
Author-email: jiihwan.jeong@gmail.com
License: MIT License
Download-URL: https://github.com/jihwan-jeong/xaddpy/archive/refs/tags/0.1.0.tar.gz
Keywords: xadd,xadd python,symbolic diagram
Platform: UNKNOWN
Description-Content-Type: text/markdown
License-File: LICENSE

### Python Implementation of XADD

This repository implements the Python version of XADD (eXtended Algebraic Decision Diagrams) which was first introduced in [Sanner et al. (2011)](https://arxiv.org/pdf/1202.3762.pdf); you can find the original Java implementation from [here](https://github.com/ssanner/xadd-inference). 

Our Python XADD code uses [Sympy](https://github.com/sympy/sympy) for symbolically maintaining all variables and related operations, and [PULP](https://github.com/coin-or/pulp) is used for pruning unreachable paths.  Note that we only check linear conditionals.  If you have Gurobi installed and configured in the conda environment, then PULP will use Gurobi for solving (MI)LPs; otherwise, the default solver ([CBC](https://github.com/coin-or/Cbc)) is going to be used.

Note that the implementation for [EMSPO](https://proceedings.mlr.press/v162/jeong22a/jeong22a.pdf) --- Exact symbolic reduction of linear Smart Predict+Optimize to MILP (Jeong et al., ICML-22) --- has been moved to the branch [emspo](https://github.com/jihwan-jeong/xaddpy/tree/emspo). 

### Installation

#### Load your Python virtual environment then type the following commands for package installation

```shell
pip install sympy numpy psutil

# Optional: if you want to use the 'reduce_lp' method that prunes out 
# unreachable partitions using LP solvers
pip install pulp
pip install gurobipy    # If you have a license

# Move to the current directory and install xaddpy as a Python package
pip install -e .
```

