Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

flowty-0.0.2-py3-none-any.whl (2.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page