Google OR-Tools

  • Google OR-Tools
  • Español – América Latina
  • Português – Brasil
  • Tiếng Việt

One of the most well-known combinatorial optimization problems is the assignment problem . Here's an example: suppose a group of workers needs to perform a set of tasks, and for each worker and task, there is a cost for assigning the worker to the task. The problem is to assign each worker to at most one task, with no two workers performing the same task, while minimizing the total cost.

You can visualize this problem by the graph below, in which there are four workers and four tasks. The edges represent all possible ways to assign workers to tasks. The labels on the edges are the costs of assigning workers to tasks.

An assignment corresponds to a subset of the edges, in which each worker has at most one edge leading out, and no two workers have edges leading to the same task. One possible assignment is shown below.

The total cost of the assignment is 70 + 55 + 95 + 45 = 265 .

The next section shows how solve an assignment problem, using both the MIP solver and the CP-SAT solver.

Other tools for solving assignment problems

OR-Tools also provides a couple of other tools for solving assignment problems, which can be faster than the MIP or CP solvers:

  • Linear sum assignment solver
  • Minimum cost flow solver

However, these tools can only solve simple types of assignment problems. So for general solvers that can handle a wide variety of problems (and are fast enough for most applications), we recommend the MIP and CP-SAT solvers.

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2024-08-28 UTC.

IMAGES

  1. solve assignment problems

    solving an assignment problem

  2. 7 Steps to Improve Your Problem Solving Skills

    solving an assignment problem

  3. Solving Maximization Assignment Problem with Python

    solving an assignment problem

  4. Solution of Assignment Problems

    solving an assignment problem

  5. Unit 1 Lesson 20 :Solving Assignment problem

    solving an assignment problem

  6. Operation Research 16: Formulation of Assignment Problem

    solving an assignment problem

VIDEO

  1. Solving an Assignment Problem in Solver: Linear Programming

  2. How to Solve Balanced Assignment Problem Using Excel Solver #Excel #Solver #AssignementProblem

  3. Introduction to Assignment Problem Hungarian Method|Linear Programming|Dream Maths

  4. Assignment Problem

  5. Assignment Problem (Part-1) Introduction/Formulation/Balanced/Unbalanced AP

  6. Ch05-08 Assignment Problem