min_cost_max_flow
Compute minimum-cost maximum flow through a network using successive shortest paths with SPFA, so you can solve flow optimization problems from vertex, edge, source, and sink inputs.
Instructions
Compute minimum cost maximum flow using successive shortest paths (SPFA).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sink | Yes | Sink vertex | |
| edges | Yes | Edges as [from, to, capacity, cost] | |
| source | Yes | Source vertex | |
| vertex_count | Yes | Number of vertices |