Beruflich Dokumente
Kultur Dokumente
DBM
Quantitative Techniques in Management
Semester - 1
Session - 10
OPERATION RESEARCH
4.
Minimize
Z 2 x1 x 2
subject to
x1 2
3 x1 4 x 2 24
4 x1 3x 2 12
x1 2 x 2 1
Minimize
Z 2 x1 x 2
subject to
x1
x 3 2
3 x1
4 x 2
x 4 24
4 x1
3 x 2
x5 12
x1
2 x 2
x6 1
Example 1:
Example 2:
Destinatio
n
S1
Source S2
S3
(D)
Demand
Supply
D1
D2
D3
D4
50
65
40
0
75
80
70
0
35
60
45
0
75
65
55
0
15
10
15
10
12
17
11
10
Transportation Tableau:
Non-basic cells:
Assumptions:
1. There is a cost assignment matrix for the m
people to be assigned to m tasks. (If necessary
dummy rows or columns consisting of all 0s are
added so that the numbers of people and tasks are
the same.)
2. All costs are nonnegative.
3. The problem is a minimization problem.
Iterative Steps
1. Make as many 0 cost assignments as possible. If
all workers are assigned, STOP; this is the minimum
cost assignment. Otherwise draw the minimum
number of horizontal and vertical lines necessary to
cover all 0s in the matrix. (A method for making the
maximum number of 0 cost assignments and
drawing the minimum number of lines to cover all
0s follows.)
2. Find the smallest value not covered by the lines;
this number is the reduction value.
3. Subtract the reduction value from all numbers not
covered by any lines. Add the reduction value to any
number covered by both a horizontal and vertical
line.
Example:
Minimum uncovered
number
Minimum uncovered
number
CONVERSION OF A MAXIMIZATION
PROBLEM TO A MINIMIZATION
PROBLEM
The Hungarian algorithm works only if the matrix is a
cost matrix. A maximization assignment problem can be
converted to a minimization problem by creating a lost
opportunity matrix. The problem then is to minimize the
total lost opportunity.
Profit Matrix:
J1 J2 J3 J4
W1
67 58 90 55
W2
58 88 89 56
W3
74 99 80 22
(D)
41
W2
16 11 1
W3
(D)
74 99 90 56
10 34
A Heuristic Solution
A heuristic (intuitive) argument can be made for the solution to a
problem. It follows the steps below:
. Identify the cell with the lowest cost
. Allocate as many units as possible to that cell and cross out
the row or column (or both) that is exhausted by this
assignment
. Find the cell with the next lowest cost from among the
feasible cells
. Repeat the second and third steps until all units have
been allocated
A Heuristic Solution
Lets take a look at how the heuristic is applied to this problem
. Identify the cell with the lowest cost
Factory
1
2
3
Demand
A
4
12
8
80
Warehouse
B
C
D
Supply
7
7
1
100
3
8
8
200 Total
10
16
5
150 Supply
90
120
160
450
Total Demand
450
A Heuristic Solution
. Allocate as many units as possible to that cell
Factory
1
2
3
Demand
A
4
12
8
80
Warehouse
B
C
D
Supply
7
7 100/1
100
3
8
8
200 Total
10
16
5
150 Supply
90
120
160
450
Total Demand
450
A Heuristic Solution
. And cross out the row or column (or both) that is
exhausted by this assignment
Factory
1
2
3
Demand
A
4
12
8
80
Warehouse
B
C
D
Supply
7
7 100/1
100
3
8
8
200 Total
10
16
5
150 Supply
90
120
160
450
Total Demand
450
A Heuristic Solution
. Find the cell with the next lowest cost from among
the feasible cells
Factory
1
2
3
Demand
A
4
12
8
80
Warehouse
B
C
D
Supply
7
7 100/1
100
3
8
8
200 Total
10
16
5
150 Supply
90
120
160
450
Total Demand
450
A Heuristic Solution
. Allocate as many units as possible to that cell
Factory
1
2
3
Demand
A
4
12
8
80
Warehouse
B
C
D
Supply
7
7 100/1
100
90/3
8
8
200 Total
10
16
5
150 Supply
90
120
160
450
Total Demand
450
A Heuristic Solution
. And cross out the row or column (or both) that is
exhausted by this assignment
Factory
1
2
3
Demand
A
4
12
8
80
Warehouse
B
C
D
Supply
7
7 100/1
100
90/3
8
8
200 Total
10
16
5
150 Supply
90
120
160
450
Total Demand
450
A Heuristic Solution
. Find the cell with the next lowest cost from among
the feasible cells
Factory
1
2
3
Demand
A
4
12
8
80
Warehouse
B
C
D
Supply
7
7 100/1
100
90/3
8
8
200 Total
10
16
5
150 Supply
90
120
160
450
Total Demand
450
A Heuristic Solution
. Allocate as many units as possible to that cell
Factory
1
2
3
Demand
A
4
12
8
80
Warehouse
B
C
D
Supply
7
7 100/1
100
90/3
8
8
200 Total
10
16
60/5
150 Supply
90
120
160
450
Total Demand
450
A Heuristic Solution
. And cross out the row or column (or both) that is
exhausted by this assignment
Factory
1
2
3
Demand
A
4
12
8
80
Warehouse
B
C
D
Supply
7
7 100/1
100
90/3
8
8
200 Total
10
16
60/5
150 Supply
90
120
160
450
Total Demand
450
A Heuristic Solution
. Find the cell with the next lowest cost from among
the feasible cells In this case there is a tie choose one
arbitrarily.
Factory
1
2
3
Demand
A
4
12
8
80
Warehouse
B
C
D
Supply
7
7 100/1
100
90/3
8
8
200 Total
10
16
60/5
150 Supply
90
120
160
450
Total Demand
450
A Heuristic Solution
. Allocate as many units as possible to that cell
Factory
1
2
3
Demand
A
4
12
80/8
80
Warehouse
B
C
D
Supply
7
7 100/1
100
90/3
8
8
200 Total
10
16
60/5
150 Supply
90
120
160
450
Total Demand
450
A Heuristic Solution
. And cross out the row or column (or both) that is
exhausted by this assignment
Factory
1
2
3
Demand
A
4
12
80/8
80
Warehouse
B
C
D
Supply
7
7 100/1
100
90/3
8
8
200 Total
10
16
60/5
150 Supply
90
120
160
450
Total Demand
450
A Heuristic Solution
. Find the cell with the next lowest cost from among
the feasible cells
Factory
1
2
3
Demand
A
4
12
80/8
80
Warehouse
B
C
D
Supply
7
7 100/1
100
90/3
8
8
200 Total
10
16
60/5
150 Supply
90
120
160
450
Total Demand
450
A Heuristic Solution
. Allocate as many units as possible to that cell
Factory
1
2
3
Demand
A
4
12
80/8
80
Warehouse
B
C
D
Supply
7
7 100/1
100
90/3 110/8
8
200 Total
10
16
60/5
150 Supply
90
120
160
450
Total Demand
450
A Heuristic Solution
. And cross out the row or column (or both) that is
exhausted by this assignment
Factory
1
2
3
Demand
A
4
12
80/8
80
Warehouse
B
C
D
Supply
7
7 100/1
100
90/3 110/8
8
200 Total
10
16
60/5
150 Supply
90
120
160
450
Total Demand
450
A Heuristic Solution
. Find the cell with the next lowest cost from among
the feasible cells
Factory
1
2
3
Demand
A
4
12
80/8
80
Warehouse
B
C
D
Supply
7
7 100/1
100
90/3 110/8
8
200 Total
10
16
60/5
150 Supply
90
120
160
450
Total Demand
450
A Heuristic Solution
. Allocate as many units as possible to that cell
Factory
1
2
3
Demand
A
4
12
80/8
80
Warehouse
B
C
D
Supply
7
7 100/1
100
90/3 110/8
8
200 Total
10 10/16
60/5
150 Supply
90
120
160
450
Total Demand
450
A Heuristic Solution
. And cross out the row or column (or both) that is
exhausted by this assignment The distribution cost is 80*8
+ 90*3 + 110*8 + 10*16 +100*1 + 60*5 = 2,350 per unit
Factory
1
2
3
Demand
A
4
12
80/8
80
Warehouse
B
C
D
Supply
7
7 100/1
100
90/3 110/8
8
200 Total
10 10/16
60/5
150 Supply
90
120
160
450
Total Demand
450
Heuristic vs LP Solution
The Heuristic Solution Cost = 2,350
Factory
1
2
3
Demand
4
12
80/8
80
Warehouse
B
C
D
Supply
7
7
100/1
100
90/3
110/8
8
200 Total
10
10/16
60/5
150 Supply
90
120
160
450
Total Demand
450
A
4
12
80/8
80
Warehouse
B
C
D
Supply
7
10/7
90/1
100
90/3
110/8
8
200 Total
10
16
70/5
150 Supply
90
120
160
450
Total Demand
450
Assignment Problem
Flow Diagram
a assignee
t tasks
a1
c11
1
c12
a2
a3
an
t1
t2
t3
t4
assignees
cnn
tasks
Assignment Problem
Cost Matrix
Let the following represent the standard assignment problem cost matrix, c:
Tasks
Assignees
1
c 11
2
c 12
n
c 1n
c 21
c n1
c 22
c 2n
c n2
c nn
Assignment Problem
Conversion to Standard Cost Matrix
Consider following cost matrix, how do you convert to satisfy the standard
definition of the assignment problem?
Tasks
Assignees
1
2
3
1
10
4
2
2
9
1
3
8
5
8
4
7
6
-
Assignees
1
2
3
4
1
10
4
2
0
2
9
M
1
0
3
8
5
8
0
4
7
6
M
0
Assignment Problem
Math Formulation
m
Minimize
s.t.
Z cij xij
Total Cost
i 1 j 1
x
j 1
ij
x
i 1
ij
xij 0
( xij is binary, for all i and j )
Does this formulation look familiar?
Is this a Linear Program?
Assignment Problem
Hungarian Method
Consider following cost matrix.
Tasks
Assignees
1
2
3
4
1
14
2
7
2
2
5
12
8
4
3
8
6
3
6
4
7
5
9
10
3
3
4
0
4
0
4
2
3
6
8
2
Tasks
Assignees
Column Min
1
2
3
4
1
9
0
4
0
0
2
0
10
5
2
0
Row Minimum
5
2
3
2
Assignment Problem
Hungarian Method
Reduced by Column Minimum:
Tasks
Assignees
1
2
3
4
1
9
0
4
0
2
0
10
5
2
3
3
4
0
4
4
0
1
4
6
Assignment Problem
Hungarian Method
Solution is now optimal since minimum number of lines to cover all 0 is 4
(equal to n).
Assignment Problem
Hungarian Method
Summary of Hungarian Method:
Step 1 Find the minimum element in each row. Construct a new matrix by
subtracting from each cost the minimum cost in its row. For this new matrix,
find the minimum cost in each column. Construct a new matrix by
subtracting from each cost the minimum cost in its column.
Step 2 Draw the minimum number of lines (horizontal or vertical) that are
needed to cover all the zeros in the reduced cost matrix. If n lines are
required, an optimal solutions is available among the covered zeros in the
matrix. If fewer than n lines are needed, proceed to step 3.
Step 3 Find the smallest nonzero element (call its value k) in the reduced
cost matrix that is uncovered by the lines drawn in Step 2. Now subtract k
from each uncovered element of the reduced cost matrix and add k to each
element that is covered by two lines. Return to step 2.