Skip to main content

Flowty

Flowty is a network optimization solver for multi-commodity flow (MCF), resource-constrained MCF (RCMCF), fixed-charge MCF (FCMCF), vehicle routing (VRPTW), and related problems. It uses column generation with branch-and-bound, where subproblems are resource-constrained shortest path problems solved over user-defined graphs. Written in C++ with a Python interface.

Installation

System dependencies (Ubuntu/Debian):

sudo apt-get install libopenblas0 libtbb12

Then install the package:

pip install flowty

Quick Start

Multi-Commodity Flow

Use McfModel for MCF problems:

import flowty

model = flowty.McfModel(flowty.McfModel.Type.Path)

# Network with 4 edges: sources, targets, costs, capacities
model.addEdges([0, 1, 0, 2], [1, 3, 2, 3], [1.0, 1.0, 1.0, 2.0], [10.0, 10.0, 10.0, 10.0])

# Two commodities: origins, destinations, demands
model.addCommodities([0, 0], [1, 3], [3.0, 2.0])

status = model.solve()
solution = model.getSolution()
print(f"Status: {status}, Cost: {solution.cost}")
print(f"Edge flows: {solution.edgeFlows}")

Vehicle Routing with Time Windows

Use Model for VRPTW and other resource-constrained problems:

import flowty

model = flowty.Model()

# Graph: depot(0) -> customer(1) -> depot(2)
edges = [(0, 1), (1, 2)]
costs = [1.0, 1.0]

# Resources: time windows and capacity
resources = [
    ({"V": [[0, 0, 0], [10, 10, 10]], "E": [[1, 1]]}, "time"),
    ({"V": [[0, 1, 0]], "G": [2]}, "capacity"),
]

graph = model.addGraph(edges, costs, [], resources, flowty.Graph.PathSense.Simple)
rules = [("Window", ["time"]), ("Capacity", ["capacity"])]
model.addSubproblem(graph, 0, 2, 0.0, 1.0, 1.0, "B", rules)

# Each customer must be visited at least once
model += graph.vertices[1] >= 1.0

status = model.solve()
solution = model.getSolution()
print(f"Status: {status}, Cost: {solution.cost}")

Documentation

Full documentation at docs.flowty.ai.

License

The solver ships with a Non-Commercial License. For commercial licenses, contact license@flowty.ai.

Issues & Contact

Report issues at github.com/flowty/flowty.

For inquiries contact info@flowty.ai.

Release files for flowty 2.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for flowty 2.2.2
File Interpreter ABI Platform
flowty-2.2.2-cp312-abi3-manylinux_2_39_x86_64.whl CPython 3.12 abi3 Linux glibc 2.39+ x86-64 Details

Release files / flowty-2.2.2-cp312-abi3-manylinux_2_39_x86_64.whl

Download URL flowty-2.2.2-cp312-abi3-manylinux_2_39_x86_64.whl
Size 4.8 MB
Tags CPython 3.12 Linux glibc 2.39+ x86-64 abi3
SHA-256 checksum
How to use checksums
06150dd5db9f3758c99834de622b50ab75d18975222679706f558e8b5e9b6564
BLAKE2b-256 checksum
How to use checksums
5062a4a5264b534385736aade67a1bb74a64b950e4aead7b12e4bc75153be8e7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 5, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

2.2.2 This release

1 release file

2.2.1

1 release file

2.2.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page