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
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| workers | Yes | ||
| tasks | Yes | ||
| costs | Yes | ||
| maximize | No | ||
| max_tasks_per_worker | No | ||
| min_tasks_per_worker | No |