Python network flows optimization algorithms
Shortest Path
Label Setting Algorithms:
- Dynamic (for topologically ordered graphs)
- Dijkstra
- Dial - Dijkstra (with a circular queue)
- Radix Heap - Dijkstra (with a radix heap queue)
Label Correcting Algorithms:
- Generic Label correcting
- F.I.F.O. L.C.
- Deque L.C.
- Negative Cycle immune Label Correcting
Max Flow Algorithms:
- Ford Fulkerson - Labeling
- Pre flow - Push
Min Cost Flow Algorithms:
- Successive shortest path
- Cycle canceling
Others:
- Topological ordering
- Depth First Search
- Flow decomposition
Loading a graph: You need a text file with this structure:
- Adjacency matrix (node - node) dimension (ex. 5)
- Mass balance excess of nodes (ex. 25 0 0 0 -25)
- Adjacency Matrix (ex. 0 1 1 0 0 0 0 1 1 0 0 0 0 1 1 0 0 0 0 1 0 0 0 0 0 )
- Cost Matrix (ex. 0 7 6 0 0 0 0 6 4 0 0 0 0 2 2 0 0 0 0 1 0 0 0 0 0 )
- Capacity Matrix (ex. 0 30 20 0 0 0 0 25 10 0 0 0 0 20 25 0 0 0 0 20 0 0 0 0 0 )