solve_transportation_problem_tool
Optimize transportation logistics by solving supply-demand problems using OR-Tools. Input suppliers, consumers, and cost matrix to calculate flows, total cost, and execution time efficiently.
Instructions
Solve transportation problem using OR-Tools.
Args:
suppliers: List of supplier dictionaries with 'name' and 'supply' keys
consumers: List of consumer dictionaries with 'name' and 'demand' keys
costs: 2D cost matrix where costs[i][j] is cost of shipping from supplier i to consumer j
Returns:
Dictionary with solution status, flows, total cost, and execution time
Input Schema
Name | Required | Description | Default |
---|---|---|---|
consumers | Yes | ||
costs | Yes | ||
suppliers | Yes |
Input Schema (JSON Schema)
{
"properties": {
"consumers": {
"items": {
"additionalProperties": true,
"type": "object"
},
"title": "Consumers",
"type": "array"
},
"costs": {
"items": {
"items": {
"type": "number"
},
"type": "array"
},
"title": "Costs",
"type": "array"
},
"suppliers": {
"items": {
"additionalProperties": true,
"type": "object"
},
"title": "Suppliers",
"type": "array"
}
},
"required": [
"suppliers",
"consumers",
"costs"
],
"type": "object"
}