Metadata-Version: 2.1
Name: flowty
Version: 0.0.2
Summary: Flowty Network Optimization Solver
Home-page: https://flowty.ai
Author: Simon Spoorendonk
Author-email: info@flowty.ai
License: Proprietary
Keywords: Nework Optimization,Mathematical Optimization,Integer Programming,Operations Research
Platform: UNKNOWN
Classifier: Development Status :: 1 - Planning
Classifier: License :: Other/Proprietary License
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Requires-Python: >=3.6
Description-Content-Type: text/markdown

# Flowty

> **Note**
> 
> In planning - this is a placeholder package
>
> Has been tested on Ubuntu 18.04 and Windows 10

Install with

```sh
pip install flowty
```

## Prerequisites for Linux

Install the `libgfortran5` library.

On `apt-get` compatible distribution do

```sh
apt-get update
apt-get install libgfortran5
```

## Quick Start

Solve a small 0-1 knapsack problem using the dynamic programming algorithm.

The graph is constructed as a string of edges for choosing an item plus dummy nodes
allowing for not packing an item (by tacking a detour of two zero-edges)

```python
from flowty import Model, ParamKey, ParamValue

p = [10, 13, 18, 31, 7, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
w = [11, 15, 20, 35, 10, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
c = 47

e = [(0, 1), (1, 2), (2, 3), (3, 4), (4, 5), (5, 6),
      (0, 7), (1, 8), (2, 9), (3, 10), (4, 11), (5, 12),
      (7, 1), (8, 2), (9, 3), (10, 4), (11, 5), (12, 6),
]

m = Model()
m.setParam(ParamKey.Algorithm, ParamValue.AlgorithmDp)

g = m.addGraph(directed=True, obj=p, edges=e, source=0, sink=6, L=1, U=1, type="B")
m.addResourceDisposible(
    graph=g, consumptionType="E", weight=w, boundsType="V", lb=0, ub=c, obj=0
)
m.optimize()
```

Visit [docs.flowy.ai](https://docs.flowty.ai) to get to know more.

## License

Visit [flowy.ai](https://flowty.ai) for information on commercial pricing and trial
licenses.

The Flowty Network Optimization Solver defaults to a community license that allows
solving problems of limited size. Full scale licenses are available for free for
non-profit organizations and academics. Contact us to get your license.


