Académique Documents
Professionnel Documents
Culture Documents
ASSIGNMENT MODEL
Term Paper
Contents
1. Introduction ....................................................................................................... 3
2. Description of Assignment Problem ................................................................ 5
3. Formulation as a linear Programming Problem ............................................. 7
4. Solving Assignment Problem by Hungarian Method...................................... 10
5. Illustrations of Assignment Problem.............................................................. 17
6. Assignment model solution using LINGO ....................................................... 28
7. Appendix.......................................................................................................... 33
8. References ...................................................................................................... 37
1. Introduction
The assignment problem (AP) is a unique kind of linear programming (LP) problem
Where various tasks are assigned to the assignees that performs the tasks. For
Example, allotting work assignments to employees of a firm. i.e., a very simple
example to understand AP is assigning jobs to various people. However, it is not
always necessary that the assignees need to be people.. They might be machines,
plants, vehicles and even the time slots for assigning the tasks.
The best suited person for the intended job is an suitable example of the
assignment model. Since the workers have varying range of skills and abilities so
assignment of right job to right worker becomes important. Obviously a job which
matches the skill of a worker will be less costly to the case where there is no skilful
operator. Imagine, the problem of a printing press where there is only one operator to
operate a machine, now how will the allocation be done? The answer will be obvious
that the only operator would operate the machine. Now suppose that there are two
machines available and two operators having different rates of operating them are
available, then the question arises which operator will operator would operate which
..
C11
C21
:
:
Cn1
C12
C22
:
:
Cn2
.
.
:
:
..
..
..
:
:
C1n
C2n
Cnn
The element Cij shows the cost of assigning worker i to job j (i, j =1, 2, ... , n). when
we assume that the number of jobs equals the number of workers then the generality
does not get lost, because we can always add or subtract a dummy worker or job to
satisfy the assumption.
reconstructive purpose dummy tasks or dummy assignees are chosen. We will show
this method by the following example:
The XYZ Manufacturing has got three new machines of different types. But there are
only four available locations for the installation of the work. In which some of the
location are more desirable to a particular machines seeing its proximity because
some work centres will have heavy work in-flow and out-flow from the machines.
Therefore, objective is the assignment of the new machines to the locations so as to
minimize the overall cost of handling the materials.
The material handling cost in dollar per hour for every machine is given in Table for
the corresponding location. For machine 2 the Location 2 is not considered suitable,
so there will be no cost given for this case. To reconstruct this problem as an
assignment model, introduction of dummy machine for the extra location an
extremely large cost M is assigned to that position so as to neglect this assignment in
the optimal solution. The cost table for final assignment problem is given in Table
which contains all the necessary data for solving the problem.
The optimal solution will be: assign m1 to l4, m2 to l3, and m3 to l1, for the
total optimal cost of $29 per hour. The dummy machine is given to location 2, so this
location would be available for future assignment of machine. In the later sections we
will discuss how the solution for this problem is obtained by formulating the
mathematical model for the assignment problem.
For i = 1, 2. . . n and,
j = 1, 2. . . n.
Thus, each xij is a binary variable (which has value 0 or 1). Binary variables become
important in operations research and integer programming so as to give yes/no
decision. Here yes/no decision becomes relevant as to whether i should do the task j or
not.
Suppose Z denotes the total cost then the assignment problem model can be
represented as:
The given first set of functional constraints tells that each worker has to perform
exactly one task, whereas the second restriction tells that each job has to be performed
by exactly one worker. By deleting the last restriction in parenthesis that xij is binary,
and then the model becomes special kind of linear programming problem which can
be easily solved.
In fact, as explained in the previous section that the assignment problem is merely a
special kind of transportation problem in which the sources becomes the assignees and
the destinations become tasks and where :
Number of sources (m) = number of destinations (n),
Every supply si = 1,
Every demand dj = 1.
Now emphasize upon property of integer solutions in the transportation problem
model. Since si and dj are integers (=1) , this property shows that every basic feasible
solution (including the optimal solution ) gives the integer solution of the assignment
problem.
The problem of any variable becoming greater than 1in the assignment problem is
prevented by functional constraints and the less than 0 values are prevented by the
non-negativity constraints. Therefore, if we delete the binary restriction, then that
gives us the liberty to solve an assignment problem (AP) as linear programming
problem (LPP). Then the resulting binary feasible solution obtained (including the
optimal solution) will anyway automatically follow the binary restriction.
The manager likes to minimise the total completion time for all the three jobs. How
the allocation should be done?
The upper table is called the cost matrix as explained in the previous sections. The
data can be shown using the following network model.
This network is also known as bipartite graph in which the nodes are the tasks and the
assignees. The line joining them (arc) represents the possible assignment. The supply
and the demand at each source and destination are equal to 1. The cost incurred in
assigning the jobs to the workers is the time for job completion. Comparing this
network representation with the transportation network one can easily see the
similarity between the transportation and the assignment problem where supply,
demand=1, and amount shipped is either 0 or 1.
10
cij xij = 0.
11
Until we cross-out or assign all the zeros, the above operation is continued
successively.
Now two possibilities are raised:
(a) All zeroes are either crossed-out or assigned, i.e., we get optimal
assignment. Or
(b) After crossing/assigning each row or column at least two zeroes remain.
We adopt trial and error method to exclude some of the zeroes. Here the
second step is completed resulting in two sorts of situations.
i)
ii)
Step III
Draw minimum number of horizontal and vertical line so as to cover all the
zeros.
Step IV
Smallest element from the uncovered entries is chosen.
(i) This smallest entry is subtracted from all the uncovered entries.
(ii) This entry is now added to all those entries which are there at the
intersection of any two lines.
Step V
Thus the number of zeroes is now increased. Now the matrix is modified using
step ii and the assignment of task is obtained.
All the above steps would become clearer after seeing the following example:
John has three children Shane, Stuart and Maria who want to earn some money for
their personal expenses during a picnic in summer. John has decided to give three
tasks namely: garage door painting, family car washing and lawn mowing. So as to
avoid sibling competition john asks them for secret bid submission according to their
12
choices for which each task is fair pay according to them. All the three children will
abide the fathers decision as to who will do which task.
Table summarizes the received bids. How Mr John should do the assignment based on
this information?
The assignment problem would be solved by using Hungarian method.
Step1. First the row minimum is identified and it is subtracted from all the entries of
that row in the original cost.
Shane
Stuart
Maria
mowing
15
9
10
painting
10
15
12
washing
9
10
8
Step 2. Then column minimum is identified and subtracted from all the entries of that
column in the matrix obtained from step 1.
Step 3. Obtain the optimal solution by the feasible assignment with zero entries of the
matrix resulted in step 2.
Suppose Pi and qj are the minimum costs that are associated with the row i and column
j as explained in steps 1and 2. The row minimums are calculated using step 1 from the
initial cost matrix as shown in Table below.
Shane
Stuart
Maria
Mowing
Painting
Washing
15
9
10
10
15
12
9
10
8
Row minimum
p1=9
p2=9
p3=8
Next, from each row, its row minimum is subtracted to get the reduced matrix in the
below table
Shane
Stuart
Maria
Column minimum
Mowing
6
0
2
q1=0
Painting
1
6
4
q2=1
Washing
0
1
0
q3=0
13
The above table shows the column minimum by applying step 2. The reduced matrix
is obtained by subtracting the column minimum values from corresponding columns.
The reduced matrix is shown in the table below:
Mowing
6
0
2
Shane
Stuart
Maria
Painting
0
5
3
Washing
0
1
0
The cells which are having zero entries give the optimum solution. This means Shane
gets to painting of garage door, Stuart gets to lawn mowing, and Maria has to wash the
family cars. The total cost incurred to Mr John is 9 + 10 + 8 = 27. This amount should
always be equal to (PI + P2 + P3) + (ql + q2 + q3) = (9 + 9 + 8)+(0 + 1 + 0) = 27.
(Next section explains the justification of the result).
The Hungarian method steps which are given here apply well in the previous example
because a feasible assignment is produced by the zero entries of the final matrix.
(in a way that each task is assigned by different child). But there are some cases where
zeroes produced by step 1 and step 2 might not provide the direct feasible solution,
and more steps are required to find out the feasible and the optimal solution.
The following instance explains this situation.
Suppose that the problem discussed in the previous example is changed and extended
to four tasks and four children. The below given Table provides the cost entries of the
problem.
Tasks
Child
1
2
3
4
1
9
4
8
4
7
5
7
6
10
11
8
3
9
7
5
14
Tasks
Child
1
2
3
4
0
2
0
3
3
0
1
2
2
0
4
0
2
2
3
0
(ii) Then the smallest entry which is uncovered is selected, subtract this entry
from every remaining uncovered entry, then this smallest entry is added to
every entry which is located at the intersection of two lines.
(iii) Repeat the above step (2A) in case if the feasible assignment cannot be
found using the resulting zero elements, otherwise, apply step 3 to obtain the
optimal assignment.
15
By applying step 2a to the final matrix gives the shaded cells in above table. The only
smallest entry which is unshaded equals 1. This entry is then added to the intersection
of the shaded lines and subtracted from the unshaded entries resulting into matrix
given in the below table.
Tasks
Child
1
2
3
4
0
3
0
4
2
0
0
2
1
0
3
0
1
2
2
0
16
17
Solution.
(a)
18
ASSIGNEE
(d)
A
B
C
D
DEMAND
1
8
6
7
6
1
UNIT COST
2
6
5
8
7
1
3
5
3
4
5
1
4 SUPPLY
7
1
4
1
6
1
6
1
1
19
Solution.
(a) Since ships are assignees and ports are assignments, this is assignment problem.
20
21
Solution.
(a) & (b)
22
23
Solution.
(a)
If we add a dummy stroke in which everyone can swim in 0 sec, the problem becomes
assignment model 5 swimmers and 5 strokes. See the cost table below:
COST TABLE
SWIMMERS
STROKE
CARL
CHRIS
DAVID
TONY
KEN
BACK
37.7
32.9
33.8
37
35.4
BREAST
43.4
33.1
42.2
34.7
41.8
FLY
33.3
28.5
38.9
30.4
33.6
FREE
29.2
26.4
29.6
28.5
31.1
DUMMY
0
0
0
0
0
(b)
24
25
Solution.
(a) The assignments are the loads needed at sites 1,2 and 3and the three trucks from
north and 2 from south are the assignees.
(b)
26
Solution.
(a) & (b) Let assignees 1 and 2 represent plant A, assignees 3 and 4 represent plant B,
tasks be the distribution centres.
27
28
29
30
31
32
33
7. Appendix
How to use EXCEL SOLVER
1. Model formulation
The model will look like as given the excel snapshot given below:
34
Enter the solver parameters (read on). The result should be consistent with the
picture below.
You have the choice of typing the range names or clicking on the cells in the spread
sheet.
2. Enter TotalCost for the Objective.
3. Click Min.
4. Enter Assignment for the Changing Variable Cells.
5. Click Add to enter the following constraint.
35
36
37
8. References
http://www.lindo.com/index.php?option=com_content&view=artic
le&id=2&Itemid=10
Operations_Research_An_Introduction_8th_Ed_Hamdy_A_Taha
Introduction to Operations Research - Hillier & Liebermann
http://www.lindo.com/index.php?option=com_content&view=artic
le&id=2&Itemid=10
http://www.exceleasy.com/examples/assignmentproblem.html