Flowty Network Optimization Solver
Project description
Flowty
Note
In planning - this is a placeholder package
Has been tested on Ubuntu 18.04 and Windows 10
Install with
pip install flowty
Prerequisites for Linux
Install the libgfortran5
library.
On apt-get
compatible distribution do
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)
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 to get to know more.
License
Visit flowy.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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.