solve_assignment_problem_tool
Optimize task assignments using the Hungarian algorithm. Input workers, tasks, and cost matrix to minimize or maximize costs. Specify constraints like max/min tasks per worker for tailored solutions.
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
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| costs | Yes | ||
| max_tasks_per_worker | No | ||
| maximize | No | ||
| min_tasks_per_worker | No | ||
| tasks | Yes | ||
| workers | Yes |