solve_assignment_problem_tool
Solve assignment problems by matching workers to tasks using the Hungarian algorithm, minimizing or maximizing total cost. Supports constraints on tasks per worker.
Instructions
Solve assignment problem using OR-Tools Hungarian algorithm.
Args:
workers: List of worker names
tasks: List of task names
costs: 2D cost matrix where costs[i][j] is cost of assigning worker i to task j
maximize: Whether to maximize instead of minimize (default: False)
max_tasks_per_worker: Maximum tasks per worker (optional)
min_tasks_per_worker: Minimum tasks per worker (optional)
Returns:
Dictionary with solution status, assignments, total cost, and execution time
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": {
"workers": "<workers>",
"tasks": "<tasks>",
"costs": "<costs>"
},
"name": "solve_assignment_problem_tool"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| workers | Yes | ||
| tasks | Yes | ||
| costs | Yes | ||
| maximize | No | ||
| max_tasks_per_worker | No | ||
| min_tasks_per_worker | No |