Assignment Problems in Operations Research
Assignment Problems in Operations Research
Assignment Problems
Operations Research
Victor Vera Valdés
vverav@[Link]
The assignment problem is a special type of problem about
linear programming in which the assigned are resources that
destined for the performance of tasks.
For example, the assigned individuals can be employees who are known to have
to give work.
The assignment of people to jobs is a common application of
assignment problem.
However, the assigned onesThey don't have to be people.
They can also be machines, vehicles, or plants, or even periods.
to those who are assigned tasks.
The first of the following examples refers to machines assigned to
places, so the task in this case is only to have a
machine.
A later example refers to plants that are assigned products.
what they must manufacture.
To fit the definition of an assignment problem, it is necessary that
this type of applications are formulated in such a way that the following are met
assumptions.
The optimal solution is to assign machine 1 to location 4, machine 2 to location 3 and the
machine 3 to location 1 at a total cost of $29 per hour.
The fictitious machine is assigned to place 2, which makes this position available.
for some future real machine assignment.
Later, it will be discussed how this solution is obtained after formulating the
mathematical model for the general assignment problem.
Assignment problem model
The mathematical model for addressing the assignment problem uses the
following decision variables:
The BETTER PRODUCTS COMPANY has decided to start the production of four new
products in three plants that currently have excess production capacity.
Products require comparable productive effort per unit, so the
available production capacity in the plants is measured by the number of units of
any product that can be manufactured per day, as shown in the last column of
the following table.
The last line shows the daily production required to meet sales.
projected.
Each plant can produce any of these.
products, except for plant 2 which cannot manufacture the
product 3.
However, the variable cost per unit of each
product differs from one plant to another, as shown
in the main body of the table.
The administration needs to make the decision on how
divide the production among the plants.
You have two options:
Option 1:Allow the separation of products, in such a way
so that the same product can be manufactured in
more than one plant.
Option 2:Do not authorize the separation of products.
Ideas?
Formulation of option 1
By allowing the separation of products, the above table can be converted into
direct form in a parameter table for a transportation problem.
Plants become sources and products become destinations (or vice versa); of
In this way, resources are interpreted as production capacities and the
demands such as the production rates that are required.
Only two changes need to be made to the table.
First, since plant 2 cannot produce product 3, that assignment is avoided.
by giving it a very large unit cost, M.
Secondly, the total capacity (75 + 75 + 45 = 195) exceeds the total production that is
requires (20 + 30 + 30 + 40 = 120), therefore a fictitious destination is needed with
una demanda de 75 para balancear estas dos cantidades.
The resulting parameter table is shown in the following table.
The optimal solution to this transportation problem has basic variables (assignments) x.12
= 30, x13= 30, x15= 15, x24= 15, x25= 60, x3120 times x34= 25, de manera que:
Plant 1 produces all of products 2 and 3.
Plant 2 produces 37.5% of product 4.
Plant 3 produces 62.5% of product 4 and all of product 1.
The total cost is Z = $3,260 daily.
Formulation of option 2.
If the products are not separated, each one of them must be assigned to a single plant.
So, the manufacturing of products can be interpreted as tasks in a problem.
of assignment and the plants as the assigned.
The administration has specified that at least one of the products must be assigned to each
plant.
More products (four) than plants (three) must be developed, so it will be necessary to assign.
two products to one of the plants.
Plant 3 barely has the additional capacity to manufacture a product, so it
plant 1 or plant 2 will manufacture the other product.
To make the allocation of this additional product possible within the formulation of a
assignment problem, plants 1 and 2 are divided into two assigned each.
shown in the following table.
The number of assigned (now five) must be equal to the number of tasks (now four), so
a fictitious assignment (product) is introduced as 5(D) in the previous table.
The role of this fictional assignment is to provide a second fictional product to anyone.
from plants 1 or 2, which receive only one actual product.
No costs are incurred for manufacturing a fictitious product, so, as always, the costs of
The fictional task is zero.
The exception is the cost M of the last line.
The reason is that a real product must be assigned to plant 3—chosen from the products.
1, 2, 3 or 4—and the big M method is needed to prevent the product from being assigned
fictional to this plant.
M is used in order to avoid the infeasible assignment of product 3 to plant 2.
The rest of the costs in the previous table are not the unit costs shown in the
original table or in the transport model version table.
For an assignment problem, the cost cijit is the total cost associated with the fact that the
assigned i and perform task j.
In the previous table, thetotal cost (per day) for plant i to manufacture product j is the
production cost multiplied by the number of units produced (per day), where
these two amounts that need to be multiplied are given separately in the original table.
For example, consider the assignment of plant 1 to product 1.
If the unit cost of $41 is used and the demand - number of units produced per day -
the same table (20) is obtained
Cost of manufacturing one unit of product 1 in plant 1 = $41
Required daily production of product 1 = 20 units
Total cost (daily) of assigning plant 1 to product 1 = 20 x ($41) = $820
The optimal solution to this assignment problem is the
next:
Plant 1 manufactures products 2 and 3.
Plant 2 manufactures product 1.
Plant 3 manufactures product 4.
In this case, the dummy allocation is given to plant 2.
The total cost is Z = $3,290 per day.
While this model could be solved through the
transport algorithm, there is actually a method
especially for these cases, which is even more efficient.
A special algorithm for the problem of
ASSIGNMENT
Next, a classic algorithm of this type will be described, calledHungarian algorithm
Hungarian method) because it was developed by mathematicians from Hungary.
To convert this cost table into an equivalent cost table, assume that you
the process of row reduction begins by subtracting 11 from each element of row 1, from
where it is obtained:
As any feasible solution must have exactly one assignment in row 1, the
The total cost of the new table will always be exactly 11 less than that of the old table.
Therefore, the solution that minimizes the total cost of a table must also minimize the
total cost of the other.
Notice that while the original cost table only had strictly elements
positives in the first three rows, the new table has a zero element in the row
1.
•Since the goal is to obtain zero elements placed in such a strategic way as to
produce a complete set of assignments, this process should continue in the others
rows and columns.
Negative elements should be avoided, so the constant that will be subtracted must
be the minimum element of the row or column.
If this procedure is applied to lines 2 and 3, the following cost table is obtained.
equivalent
This cost table has all the zero elements required from a set.
complete with assignments, as indicated by the four boxes, so that these four
Assignments constitute an optimal solution, as established for this problem.
The total cost of this optimal solution Z = 29, whichit is exactly the sum of the numbers
that have been subtracted from lines 1, 2, and 3.
Unfortunately, an optimal solution is not always obtained so easily, as
It is exemplified below with the formulation of the assignment problem for option 2
from Better Products Co.
Let us remember that:
Since this cost table of the problem has zero elements in all rows,
suppose that the process of converting it into equivalent cost tables begins through the
subtract the minimum element from each input column.
The result is shown below:
Now all the rows and columns have at least one zero element, but this time it is not
possible a complete set of assignments with elements of this type.
In reality, the maximum number of assignments that can be made in positions of
Zero elements is only 3.
Therefore, a more complex idea must be implemented to fully resolve this.
problem, which was not required in the first example.
Creation of additional zero elements
This idea involves a new way to create additional positions with elements.
zero without creating any negative element.
Instead of subtracting a constant from a single row or column, it is now added or
subtract a constant from a combination of rows and columns.
This procedure beginsdrawing a set of lines through some
from the rows and columns in such a way that all the zeros are covered.
It is preferable that this procedure be done with theminimum number of lines,
as shown in the following cost table.
Notice that the minimum element that has not been crossed is 30, in both positions.
superiors of column 3.
Therefore, if 30 is subtracted from all elements of the entire table, that is, from each
Row and column, a new zero element will be created in these two positions.
Then, to restore the previous zero elements and eliminate negative elements, it is summed up.
30 to each row and column that is crossed by a line, that is, row 3 and column 2.
and 5(D).
From here, the following equivalent cost table is obtained.
A shortcut to obtain this cost table from the previous one is to subtract 30 only from the
elements that are not crossed by a line and then add 30 to each element that is
find at the intersection of two lines
Note that columns 1 and 4 of this new cost table have only one zero element and
both are on the same line (line 3).
As a result, it is now possible to make four assignments to positions of zero elements.
but still not to five.
Therefore, the previous procedure is repeated, where now the minimum number of lines for
covering all zeros is four: the same amount as the maximum number of assignments.
One way to do it is as shown below.
Again, the minimum element not covered by a line is 30, a number that now appears
in the first position of lines 2a and 2b.
Therefore, 30 is subtracted from all uncovered elements and 30 is added to all the covered ones.
elements covered twice—only the elements of M are overlooked—, which
provide the following equivalent cost table.
•En realidad, con esta tabla existen algunas formas de hacer un conjunto completo de
assignments to zero element positions (multiple optimal solutions), including those that
they indicate the five pictures.
The total resulting cost is Z = 810 + 840 + 800 + 0 + 840 = 3,290.
The complete algorithm that has just been exemplified is summarized below.
SUMMARY OF THE HUNGARIAN ALGORITHM
1. Subtract the smallest number from each row from every number in the row.
This is called line reduction.
Enter the results into a new table.
2. Subtract the smallest number from each column of the new table from each number in the
column.
This is called column reduction.
Enter the results in another table.
6. Make the assignments one by one in the positions that have zero elements.
Start with the rows and columns that have only a zero.
As each row and each column needs to receive exactly one assignment, cross both
the row as the column involved after making each assignment.
Then continue with the rows and columns that have not yet been crossed out to
select the following assignment, and again give preference to some row or column that
have a single zero that has not been crossed.
Continue until all rows and columns have exactly one assignment and
therefore they may have already been crossed.
04
Assignment Problems
Operations Research
Victor Vera Valdés
vverav@[Link]