Metadata-Version: 2.1
Name: satyrus
Version: 3.0.0
Summary: Satyrus3 Optimization Framework
Home-page: https://www.lam.ufrj.br/~pmxavier/projects/satyrus/
Author: Pedro Maciel Xavier
Author-email: pedromxavier@poli.ufrj.br
License: UNKNOWN
Project-URL: Bug Tracker, https://github.com/pedromxavier/Satyrus3/issues
Project-URL: Source, https://github.com/pedromxavier/Satyrus3
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX :: Linux
Classifier: Operating System :: MacOS :: MacOS X
Requires-Python: <4,>=3.7
Description-Content-Type: text/markdown
Requires-Dist: ply
Requires-Dist: colorama
Requires-Dist: tabulate
Provides-Extra: all
Requires-Dist: dwave-neal ; extra == 'all'
Requires-Dist: gurobipy ; extra == 'all'
Requires-Dist: numpy ; extra == 'all'
Requires-Dist: cvxpy ; extra == 'all'
Requires-Dist: cvxopt ; extra == 'all'
Provides-Extra: dwave
Requires-Dist: dwave-neal ; extra == 'dwave'
Provides-Extra: glpk
Requires-Dist: numpy ; extra == 'glpk'
Requires-Dist: cvxpy ; extra == 'glpk'
Requires-Dist: cvxopt ; extra == 'glpk'
Provides-Extra: gurobi
Requires-Dist: gurobipy ; extra == 'gurobi'
Requires-Dist: numpy ; extra == 'gurobi'
Requires-Dist: cvxpy ; extra == 'gurobi'

# Satyrus3

## Install
Requires 3.7+ CPython ([python.org](https://www.python.org)) distribution.
- ### Linux, OSx
    ```bash
    $ git clone https://github.com/pedromxavier/Satyrus3
    $ cd Satyrus3
    $ pip3 install .
    ```
- ### Windows:
    ```shell
    > git clone https://github.com/pedromxavier/Satyrus3
    > cd Satyrus3
    > pip install .
    ```

## Command line interface:
```bash
$ satyrus --help
$ satyrus examples/graph_colour.sat > graph_colour.txt
$ satyrus examples/graph_colour.sat -o csv > graph_colour.csv
```

## Example API code:
```python
from satyrus import SatAPI

SOURCE_PATH = r"examples/graph_colour.sat"

## Computes Energy equation
sat = SatAPI(SOURCE_PATH)

## Text output
txt = sat['text'].solve()
print(txt)

## CSV output
csv = sat['csv'].solve()
with open('sat.csv', 'w') as file:
    file.write(csv)

## Gurobi
x, e = sat['gurobi'].solve()

## D-Wave
x, e = sat['dwave'].solve()
```
## Available solver interfaces

### Partial
These solvers output either problem specifications or intermediate data.
- ### Text \[`'text'`\]: <br> Returns the arithmetic expression (in C/Fortran/Python style) for the energy equation as a Python string.

- ### CSV \[`'csv'`\] <br> Returns a comma-separated values table as a Python string where each line contains a coefficient followed by the respective variable names. A single line with no variable names, represents a constant term.

### Complete
Complete ones output a dictionary (Python `dict`) mapping variable names to binary value and also the respective total energy (Python `float`).

- ### Gurobi \[`'gurobi'`\] <br> May require license for usage.

- ### D-Wave \[`'dwave'`\] <br> If a connetion to a quantum host is not available, runs `dwave-neal` simulated annealer locally.


