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).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"vertex_count": "<vertex_count>",
"edges": "<edges>",
"source": "<source>",
"sink": "<sink>"
},
"name": "min_cost_max_flow"
}
}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 |