DMM Merged
DMM Merged
2021 1
OR : Research on Operations
Text References:
⚫ Hiller, F. S. and Lieberman, G. J., Introduction to Operations Research,
McGraw-Hill, Ninth Edition, 2010.
⚫ Hiller & Hiller. Introduction to Management Science: A Modeling and Case
Studies Approach with Spreadsheets, 6th edition, 2019.
⚫ Render, B., Stair, R. M, Quantitative Analysis for Management, Prentice
Hall of India Private Limited, Tenth Edition, 2009.
⚫ Taha, H. A., Operation Research: An Introduction, Pearson Education,
Eighth Edition, 2007.
⚫ Sharma, S. D., Operations Research, Kedar Nath Ram Nath & Co,
Fourteenth Edition, 2005.
2021 2
1
24-09-2021
2021 3
2021 4
2
24-09-2021
Manager analyzes
situation (alternatives)
Makes decision to
resolve conflict
Decisions are
implemented
2021 5
Analysis
Model Results
Interpretation
Abstraction
Symbolic
World
Real
World
Management Intuition
Decisions
Situation
2021 6
3
24-09-2021
Phases of OR Study:
2021 7
Maximize/Minimize
Objective Function
Subject to
Constraints
2021 8
4
24-09-2021
Types of Models:
⚫ Optimizations Models
⚫ Analytic Models
⚫ Decision Analysis Models
⚫ Simulations Models
⚫ Knowledge-Based Models
2021 9
Service Industrial
⚫ Portfolio management ⚫ Food and chemical blending
⚫ Location of retail facilities ⚫ Optimal inventory policies
⚫ Insurance and risk ⚫ Capital budgeting
management ⚫ Distribution of products
⚫ Airplane scheduling ⚫ New product introduction
⚫ Advertising media mix ⚫ Assignment of facilities
⚫ Public Transportation ⚫ Queuing analysis of facilities
2021 10
5
24-09-2021
2021 11
2021 12
6
24-09-2021
2021 13
2021 14
7
24-09-2021
⚫ The Problem. The Distribution Unlimited Co. will be producing the same new
product at two different factories, and then the product must be shipped to two
warehouses, where either factory can supply either warehouse. The distribution
network available for shipping this product is shown in DN Fig. , where F1 and F2
are the two factories, W1 and W2 are the two warehouses, DC is a distribution
center. The amounts to be shipped from F1 and F2 are shown to their left, and the
amounts to be received at W1and W2 are shown to their right. Each arrow
represents a feasible shipping lane. Thus, F1can ship directly to W1 and has three
possible routes (F1->DC-> W2, F1->F2->DC->W2, and F1->W1->W2) for
shipping toW2. Factory F2 has just one route to W2 (F2->DC->W2) and one to W1
(F2->DC->W2->W1).The cost per unit shipped through each shipping lane is
shown next to the arrow. Also shown next to F1->F2 and DC->W2 are the
maximum amounts that can be shipped through these lanes. The other lanes have
sufficient shipping capacity to handle everything these factories can send.
The decision to be made concerns how much to ship through each
shipping lane. The objective is to minimize the total shipping cost.
2021 15
2021 16
8
24-09-2021
⚫ XF1-F2 + 40 = XF2-DC
⚫ XF1-DC + XF2-DC = XDC-W2
⚫ XF1-W1 + XW2-W1 = 30 + XW1-W2
⚫ XDC-W2 + XW1-W2 = 60 + XW2-W1
⚫ Upper bound constraints
⚫ XF1-F2 <= 10, XDC-W2 <= 80
⚫ Non-negativity constraints
2021 17
2021 18
9
24-09-2021
2021 19
2021 20
10
24-09-2021
Characteristics of LP Problems
2021 21
Assumptions of LPP
2021 22
11
24-09-2021
2021 23
Maximize
Z = CX
Subject to
AX ≤ B,
X ≥ 0.
Minimize
or, Z = CX
Subject to
AX ≥ B,
X ≥ 0.
2021 24
12
24-09-2021
Common Terminology :
2021 25
2021 26
13
24-09-2021
Example 1.
2021 27
Example 1.
H: 2 1 <= 600
2021 28
14
24-09-2021
Continued…
2021 29
Example 2.
A glass company produces high-quality glass products, including
windows and glass doors. It has three plants. Aluminum frames and
hardware are made in Plant 1, wood frames are made in Plant 2 and
Plant 3 produces the glass and assembles the products. Two new
products having large sales potential are launched.
2021 30
15
24-09-2021
Continued…
2021 31
Continued…
2021 32
16
24-09-2021
Example 3.
Evening shift resident doctors in a Govt. hospital work five consecutive
days and have two consecutive days off. Their five days of work can
start on any day of the week and the schedule rotates indefinitely. The
hospital requires the following minimum number of doctors working:
No more than 40 doctors can start their five working days on the same
day. Formulate the general LP model to minimize the number of
doctors employed by the hospital.
2021 33
Continued…
2021 34
17
24-09-2021
Continued…
Let the farmer decide x1, x2, x3 acre of his land to grow
tomatoes, lettuce and radishes respectively.
2021 36
18
24-09-2021
Example 5.
2021 37
Continued..
2021 38
19
24-09-2021
Case Study
Acme Manufacturing Company has contracted to deliver home windows over
the next 6 months. The demands for each month are 100, 250, 190, 140, 220,
and 110 units, respectively. Production cost per window varies from month to
month depending on the cost of labor, material, and utilities. Acme estimates
the production cost per window over the next 6 months to be $50, $45, $55,
$48, $52, and $50, respectively. To take advantage of the fluctuations in
manufacturing cost, Acme may elect to produce more than is needed in a given
month and hold the excess units for delivery in later months. This, however,
will incur storage costs at the rate of $8 per window per month assessed on
end-of-month inventory. Develop a linear program to determine the optimum
production schedule.
2021 39
Continued…
Decision variables
Let for i = 1 to 6
Xi = Number of units produced in month i
Ii = Inventory units left at the end of month i
x1 x2 x3 x4 x5 x6
I=0 I1 I2 I3 I4 I5 I6
2021 40
20
24-09-2021
Continued..
Objective function:
Min (Total Prod. Cost + end-of-month inventory cost)
Constraints:
Beginning Inv.+ Prod. Amount - Ending Inv. = Demand
2021 41
Continued…
2021 42
21
24-09-2021
Graphical LP Solution
2021 43
Graphical LP Solution
2021 44
22
24-09-2021
Graphical LP Solution
2021 45
Graphical LP Solution
2021 46
23
24-09-2021
Graphical LP Solution
2021 47
2021 48
24
24-09-2021
Convex Set:
2021 49
2021 50
25
24-09-2021
Graphical Solution
x2 I
A(0,6) B (2,6), Z* = 36
II
z
Feasible C(4,3)
Region
O(0,0) D(4,0) x1
2021
III 51
Example 2.
Minimize z = 2 x1 + x2
Subject to the constraints
3 x1 + x2 9
x1 + x2 6
x1 , x2 0
2021 52
26
24-09-2021
(0.9)
Feasible region
(0,6)
Minimize Z = x1 + x2
Subject to the constraints
5 x1 + 9 x2 45
x1 + x2 2
x2 4
x1 , x2 0
zmin = 2
2021 54
27
24-09-2021
Maximize Z = 3x1 + 4 x2
Subject to the constraints
x1 − x2 0
− x1 + 3 x2 3
x1 , x2 0
2021 55
Maximize Z = 2 x1 − 3x2
Subject to the constraints
x1 + x2 2
2 x1 + 2 x2 8
x1 , x2 0
2021 56
28
24-09-2021
Maximize Z = 2 x1 − x2
Subject to the constraints
x1 − x2 1
x1 3
x1 , x2 0 Z max (3,2) = 4
2021 57
2021 58
29
24-09-2021
2021 59
Primal Problem
Maximize
Z = CX
Subject to Dual Problem
AX ≤ b,
X ≥ 0. Minimize
W = b'Y
Subject to
A'Y ≥ c',
Y ≥ 0.
2021 60
30
24-09-2021
2021 61
2021 62
31
24-09-2021
n
Maximize Z = c xj =1
j j
subject to
n
a
j =1
ij x j bi for i = 1, 2...., m
Dual
Objective subject to
W
m
a
i =1
ij yi c j for j = 1, 2...., n
Primal
Objective Z
and yi 0 for i = 1, 2...., m.
2021 63
x 1, x2 > 0
2021 64
32
24-09-2021
y1, y2 , y3 > 0
2021 65
Example 2.
2021 66
33
24-09-2021
Primal
Objective Z
2021 67
2021 68
34
24-09-2021
Economic Interpretation:
n m
z= c j x j bi yi = w
j =1 i =1
Primal
Objective Z
i.e.; total revenue from all the activities is less than the worth of
the resources. Optimality occurs when the two quantities are
equal.
2021 69
⚫ Dual Constraints:
m
We know that a
i =1
ij yi c j
2021 70
35
24-09-2021
2021 71
2021 72
36
24-09-2021
2021 73
2021 74
37
24-09-2021
Graphical Solution
x2 I
A(0,6) B (2,6), Z* = 36
II
Shadow Price
2021 76
38
24-09-2021
2021 77
2021 78
39
24-09-2021
Z= C1x1+ 5x2
2021 79
Graphical Solution
x2 I
A(0,6) B (2,6), Z* = 36
II
40
24-09-2021
⚫ 0<=C1<=7.5
2021 81
2021 82
41
24-09-2021
Constraint Coefficient
2021 83
42
9/29/2021
Integer Programming
SOM608
Application Areas…
◼ Investment Analysis
◼ Site Selection
◼ Designing Production and Distribution Network
◼ Dispatching Shipments
◼ Scheduling Activities
◼ Portfolio Asset Allocation
◼ Airline Applications…
1
9/29/2021
Integer Programming
◼ Types of ILP
Examples
◼ Solutions of an ILP
Excel Solver
Graphical concepts
Branch and Bound Algorithm
Idea of Cutting Plane Method
◼ Application Areas:
◼ Binary ILP
Project/Portfolio Selection
Either-Or Constraints
◼ Fixed Charge Problem as IP
◼ Facility Location Problem as IP
◼ Assignment Problem as IP
3
2
9/29/2021
Integer Programming
◼ IP
Max Z = 21x1+ 11x2
s.t.; 7x1+ 4x2 < 13
x1, x2 > 0 and integers
◼ LP Relaxation of IP
[integrality of variables dropped]
Max Z = 21x1+ 11x2
s.t.; 7x1+ 4x2 < 13
x 1, x 2 > 0
6
3
9/29/2021
Example 1 (Continued…)
x2
3
◼ As an LPP, x1= 13/7 , x2=0 Feasible Points
2
◼ Rounding off
x1=2 , x2=0 → infeasible 1
(0,0) 1 2 x1
4
9/29/2021
Example 2. x2
Max Z = 4x1+ x2 5
s.t. 4
2x1+ x2 < 5
3 2x1 +x2 < 5
2x1+ 3x2 = 5
2
x1, x2 > 0; 2x1 +3x2 = 5
1
x1, x2: integers
(0,0) 1 2 3 4 5 x1
Example – 2(Continued…)
x2
2
2x1 +3x2 = 5
(0,0) 1 2 3 4 5 x1
10
5
9/29/2021
Example – 2 (Continued…)
◼ As an LPP, the solution is Z= 10, x1=5/2, x2=0
◼ Rounding off,
x1= 2, x2= 0
x1= 3, x2= 0
11
12
6
9/29/2021
13
Example 3.
Evening shift resident doctors in a Govt. hospital work five consecutive
days and have two consecutive days off. Their five days of work can
start on any day of the week and the schedule rotates indefinitely. The
hospital requires the following minimum number of doctors working:
No more than 40 doctors can start their five working days on the same
day. Formulate the general ILP model to minimize the number of
doctors employed by the hospital.
14
7
9/29/2021
Continued…
15
16
8
9/29/2021
17
18
9
9/29/2021
19
Example 4.
◼ Max Z = 5x1+4x2
St
x1 + x2<5
10x1+ 6x2<45
X2<=1
x1, x2>0
x1, x2 :
20
10
9/29/2021
Example 4. 1
( B & B Tree)
LP1
x1=3.75, x2 =1.25, z = 23.75
7 2
LP3 LP2
x1=3, x2 =2, z = 23 x1=4, x2 =0.83, z = 23.33
Lower bound (optimum)
4 3
LP4 LP5
x1=4.5, x2 =0, z = 22.5 No feasible solution
6 5
LP6 LP7
x1=4, x2 =0, z = 20 No feasible solution
Lower bound 21
St
x1 + x2<5 LP2: x2<1; LP3: x2>2
10x1+ 6x2<45
x1, x2>0
(3.75,1.25)
x1<3 x1>4
22
11
9/29/2021
Example 4.
LP1
◼ (LP1) Max Z = 5x1+4x2 x =3.75, x =1.25, z = 23.75
1 2
St
x1 + x2<5 LP2: x1<3; LP3: x1>4
10x1+ 6x2<45
x1, x2>0
(3.75,1.25)
x1<3 x1>4
23
◼ LP2 ◼ LP3
◼ Max Z = 5x1+4x2 ◼ Max Z = 5x1+4x2
St St
x1 + x2<5 x1 + x2<5
10x1+ 6x2<45 10x1+ 6x2<45
x1<3 x1>4
x1, x2>0; x1, x2: integers x1, x2>0; x1, x2: integers
24
12
9/29/2021
Example 4. 1
( B & B Tree)
LP1
x1=3.75, x2 =1.25, z = 23.75
7 2
LP2 LP3
x1=3, x2 =2, z = 23 x1=4, x2 =0.83, z = 23.33
Lower bound (optimum)
4 3
LP4 LP5
x1=4.5, x2 =0, z = 22.5 No feasible solution
6 5
LP6 LP7
x1=4, x2 =0, z = 20 No feasible solution
Lower bound 25
26
13
9/29/2021
27
14
9/29/2021
Project Selection
◼ Max Z= 100y1+120y2+10y3 + 250y4+285y5+215y6
+310y7+335y8+350y9
◼ Subject to
29
Example 7.
◼ John is considering four investments. Investment 1 will yield a
net present value (NPV) of 16 lakhs; investment 2, an NPV of
22 lakhs; investment 3, an NPV of 12 lakhs and investment 4,
an NPV of 8 lakhs. Each investment requires a certain cash
outflow at the present time: investment 1 : 5 lakhs, investment
2 : 7 lakhs, investment 3 : 4 lakhs and investment 4 : 3 lakhs.
At present, 14 lakhs is available for investment. Formulate this
problem to maximize the NPV obtained from these
investments.
◼ If investment 2 is made, investment 1 also should be made.
◼ If investment 2 is made, investment 4 cannot be made.
30
15
9/29/2021
31
32
16
9/29/2021
y = 1 ; if xj> 0
0 ; if xj= 0
33
34
17
9/29/2021
35
1 88 15 29 67 38 120 42 418
2 59 82 37 7 19 54 30 302
3 21 80 21 15 32 30 48 362
4 38 30 18 27 21 94 40 168
Annual 21 12 17 6 8 20
demand
36
18
9/29/2021
Annual 21 12 17 6 8 20
demand
37
Example 9…
To illustrate, plant 3 has a total annual capacity of 48 thousand cars, the demand at warehouse 2 is
12,000 cars per annum; the cost of transporting 1,000 cars from plant 3 to warehouse 5 is Rs 32,000
and plant 4 has an annual fixed operating cost equal to Rs 168,000. Currently, the company is sending
the cars as per the following schedule:
This schedule involves a total cost of Rs 4,41,000 by way of transportation and Rs 1,250,000 as
annual fixed operating costs. The management is contemplating to change the present schedule so as
to attempt to reduce the total cost to the minimum, even considering the closure of some plants. You
are requested to formulate the problem as ILP.
38
19
9/29/2021
◼ Objective Function?
◼ Minimize Z= sum (transportation cost)+ sum (production cost)
= 88x11+15x12+…..+21x45+94x46 +418y1+…+168y4
◼ Constraints?
1 88 15 29 67 38 120 42 418
2 59 82 37 7 19 54 30 302
3 21 80 21 15 32 30 48 362
4 38 30 18 27 21 94 40 168
Annual 21 12 17 6 8 20
demand 39
Example.
◼ Formulate the assignment problem as an
Binary-IP form.
40
20
9/29/2021
Examples
◼ Assigning airline crews to flights in order to minimize costs.
◼ Assigning sales personnel to sales districts in order to
maximize sales.
◼ Assigning rescue units to rescue tasks in order to minimize
total combined time to complete all rescue tasks.
◼ Assigning boats or planes to charter trips in order to
maximize total profit.
◼ Assigning social workers to welfare cases in order to
maximize the number of cases closed within a specified
period.
41
21
9/29/2021
Assignment Problem
43
44
22
9/29/2021
Job
Worker
A B C D
1 45.x11 x12 51 67
2 57 42 63 55
3 49 52 48 64
4 41 45 60 55
45
x11+x21+x31 +X41= 1
x12+x22+x32 +x42= 1
x13+x23+x33 + x43 = 1
x14+x24+x34 + x44 = 1
23
9/29/2021
Job Assignment
Solution
Constraints
x11 x12 x13 x14 x21 x22 x23 x24 x31 x32 x33 x34 x41 x42 x43 x44
1 1 1 1 1 = 1
1 1 1 1 1 = 1
1 1 1 1 1 = 1
1 1 1 1 1 = 1
1 1 1 1 1 = 1
1 1 1 1 1 = 1
1 1 1 1 1 = 1
1 1 1 1 1 = 1
Solution 0 1 0 0 0 0 0 1 0 0 1 0 1 0 0 0
47
Either-or Constraints
◼ A research and development program might be
approved if available scientific personnel are
used from one of two laboratory facilities but
not from both laboratories.
Either 3x1+ 2x2 < 18
or x1+ 4x2 < 16
48
24
9/29/2021
Either-or Constraints
◼ Let us add a big M (very large value) to either of the constraints
so that M is large enough that it will not eliminate any feasible
solutions.
Either 3x1+ 2x2 < 18 + M
x1+ 4x2 < 16
or
3x1+ 2x2 < 18
x1+ 4x2 < 16 + M
This formulation is equivalent to the set of constraints
3x1+ 2x2 < 18 + 10000y
x1+ 4x2 < 16 + 10000(1-y);
y must be either 0 or 1.
49
25
10/16/2021
Transportation, Transshipment
and Assignment Problems
Transportation Problems
1
10/16/2021
2
10/16/2021
In the past the company has shipped the wood by train. However, because shipping
costs have been increasing, the alternative of using ships to make some of the
deliveries is being investigated. This alternative would require the company to invest in
some ships. Except for these investment costs, the shipping costs in thousands of
dollars per million board feet by rail and by water (when feasible) would be the following
for each route:
Considering the expected useful life of the ships and the time value of money, the
equivalent uniform annual cost of these investments is one-tenth the amount given in the
table. The objective is to determine the overall shipping plan that minimizes the total
equivalent uniform annual cost (including shipping costs).
3
10/16/2021
You are the head of the OR team that has been assigned the task of
determining this shipping plan for each of the following three options.
4
10/16/2021
10
5
10/16/2021
m n
◼As
S = di
i =1
i
, the number of basic variables in any
j =1
11
12
6
10/16/2021
13
14
7
10/16/2021
Solution 0 20 0 55 80 45 0 0 0 0 70 30
16
8
10/16/2021
Example-2
◼ A power company has three electric power plants that
supply the needs of four cities. Each power plant can
supply the following numbers of kilowatt-hours of
electricity:
Plant 1 35 million;
Plant 2 50 million;
Plant 3 40 million.
◼ The demands in these cities are as follows:
City 1 45 million;
City 2 20 million;
City 3 30 million;
City 4 30 million.
17
Example – 2
◼ The costs (in ’00 Rs) of sending 1 million kwh of
electricity from plant to city depend on the distance the
electricity must travel and is given below
9
10/16/2021
L P Formulation
xij: number of (million) kwh produced at plant i and sent to
city j
Min Z = 8x11+ 6x12+10x13+ 9x14
+ 9x21+ 12x22+ 13x23+ 7x24
+ 14x31+ 9x32+ 16 x33+ 5x34
Subject to:
x11+x12+x13+x14 = 35
x21+x22+x23+x24 = 50
x31+x32+x33+x34 = 40
x11+x21+x31 = 45
x12+x22+x32 = 20
x13+x23+x33 = 30
x14+x24+x34 = 30
Xij > 0 i = 1,2,3 j = 1,2,3,4
19
Example – 2
Solution: Example 2
constraints
x11 x12 x13 x14 x21 x22 x23 x24 x31 x32 x33 x34
1 1 1 1 35 = 35
1 1 1 1 50 = 50
1 1 1 1 40 = 40
1 1 1 45 = 45
1 1 1 20 = 20
1 1 1 30 = 30
1 1 1 30 = 30
Objective
function 8 6 10 9 9 12 13 7 14 9 16 5 Min 1020
Solution 0 10 25 0 45 0 5 0 0 10 0 30
20
10
10/16/2021
◼ The new location that yields the minimum cost for the
entire system is the one that should be chosen
21
◼ Which new location will yield the lowest cost for the firm
in combination with the existing plants and warehouses
22
11
10/16/2021
Seattle $53
Birmingham $49
23
TO LOS
FROM DETROIT DALLAS NEW YORK ANGELES
CINCINNATI $25 $55 $40 $60
SALT LAKE 35 30 50 40
PITTSBURGH 36 45 26 66
SEATTLE 60 38 65 27
BIRMINGHAM 35 30 41 50
24
12
10/16/2021
TO LOS FACTORY
FROM DETROIT DALLAS NEW YORK ANGELES CAPACITY
73 103 88 108
CINCINNATI 10,000 1,000 4,000 15,000
85 80 100 90
SALT LAKE 1,000 5,000 6,000
88 97 78 118
PITTSBURGH 14,000 14,000
84 79 90 99
BIRMINGHAM 11,000 11,000
WAREHOUSE
10,000 12,000 15,000 9,000 46,000
REQUIREMENT
25
26
13
10/16/2021
27
TO LOS FACTORY
FROM DETROIT DALLAS NEW YORK ANGELES CAPACITY
73 103 88 108
CINCINNATI 10,000 4,000 1,000 15,000
85 80 100 90
SALT LAKE 6,000 6,000
88 97 78 118
PITTSBURGH 14,000 14,000
113 91 118 80
SEATTLE 2,000 9,000 11,000
WAREHOUSE
10,000 12,000 15,000 9,000 46,000
REQUIREMENT
28
14
10/16/2021
29
30
15
10/16/2021
Period 1 2 3 4
Demand 50 70 85 75
The regular production capacity for each period is 60 units while with overtime
working, an additional of upto 20 units can be produced in each period. The
unit cost of production in regular time is worked out to be Rs 6 whereas it
would cost Rs 10 per unit for the items manufactured during overtime. You
may assume that the cost would be identical in all the periods. Any production
in excess of the requirement in the current period may be held at a cost of Rs
3 per unit per period. No holding cost is involved if a unit is sold in the period
in which it is produced.
31
32
16
10/16/2021
Destination
Origin Supply
1 2 3 4 D
R1 6 9 12 15 0 60
O1 10 13 16 19 0 20
R2 M 6 9 12 0 60
O2 M 10 13 16 0 20
R3 M M 6 9 0 60
O3 M M 10 13 0 20
R4 M M M 6 0 60
O4 M M M 10 0 20
Demand 50 70 85 75 40 320
33
Solution: Optimal
Destination
Origin Supply
1 2 3 4 D
R1 6 (50) 9 (10) 12 15 0 60
O1 10 13 16 19 0 (20) 20
R2 M 6 (60) 9 12 0 60
O2 M 10 13 (5) 16 0 (15) 20
R3 M M 6 (60) 9 0 60
O3 M M 10 (20) 13 0 20
R4 M M M 6 (60) 0 60
O4 M M M 10 (15) 0 (5) 20
Demand 50 70 85 75 40 320
34
17
10/16/2021
35
Northern Airplane Company produces commercial airplanes. The last stage in production
is to produce the jet engines and install them. The company must meet the delivery
deadline indicated in column 2. An option is to produce some engines one month or more
before they are scheduled for installation and store them. Production and storage costs
vary from month to month.
Question: How many engines should be produced in each of the four months so that
the total of the production and storage costs will be minimized?
(*) storage cost is incurred at the end of the month for just those engines that are being held over to
the next month; 36
18
10/16/2021
??? if i >j
• si = ??
37
Destinations (installation
in month j)
Source
(production
in month i) 1 2 3 4 SUPLLY
1 1.080 1.095 1.110 1.125 ?
2 ? 1.110 1.125 1.140 ?
3 ? ? 1.100 1.115 ?
4 ? ? ? 1.130 ?
Demand 10 15 25 30
Question: How many engines should be produced in each of the four months so
that the total of the production and storage costs will be minimized?
(*) storage cost is incurred at the end of the month for just those engines that are being held over to
the next month; 38
19
10/16/2021
(*) The dummy destination can be seen as a slack variable that represents the
unused production capacity. Cost is zero because it is the cost of distributing to a
fictional destination. Note that it would be inappropriate to assign M since we do
not want to force the corresponding values to be zero. In fact these values need
to sum 30.
39
40
20
10/16/2021
Example
◼ SunRay Transport ships truckloads of grain from three silos
to four mills. The supply (in truckloads) and the demand
(also in truckloads) together with the unit transportation
costs per truckload on the different routes are summarized in
the transportation model in Table-2.
◼ The unit transportation costs, cij, (shown in the northeast
corner of each box) are in hundreds of dollars. The model
seeks the minimum-cost shipping schedule xij between silo i
and mill j (i=1,2,3; j=1,2,3,4)
41
Example
Table: Sunray Transportation Model.
Mill
1 2 3 4 Supply
10 2 20 11
1 15
x11 x12 x13 x14
12 7 9 20
Silo 2 25
x21 x22 x23 x24
4 14 16 18
3 10
x31 x32 x33 x34
Demand 5 15 15 15
42
21
10/16/2021
43
Mill
1 2 3 4 Supply
10 2 20 11
1 5 10 15
12 7 9 20
Silo 2 5 15 5 25
4 14 16 18
3 10 10
Demand 5 15 15 15
44
22
10/16/2021
◼ Step-2: Identify the row or column with the largest penalty. Break
ties arbitrarily. Allocate as much as possible to the variable with the
least unit cost in the selected row or column. Adjust the supply and
demand, and cross out the satisfied row or column. If a row and a
column are satisfied simultaneously, only one of the two is crossed
out, and the remaining row (column) is assigned zero supply
(demand).
45
46
23
10/16/2021
12 7 9 20 2 2 11 20
Silo 2 15 10 25, 10
4 14 16 18 10 2 2 18
3 5 5 10, 5
Demand 5 15 15 15, 5
Colmn I 6 5 7 7
Penalty II -- 5 7 7
III -- -- 7 2
IV -- -- -- 2
47
12 7 9 20 2 2 11 20
Silo 2 15 10 25, 10
4 14 16 18 10 2 2 18
3 5 5 10, 5
Demand 5 15 15 15, 5
Colmn I 6 5 7 7
Penalty II -- 5 7 7
III -- -- 7 2
IV -- -- -- 2
48
24
10/16/2021
Example – 4
D1 D2 D3 D4 Supply
O1 1 2 1 4 30
O2 3 3 2 1 50
O3 4 2 5 9 20
Demand 20 40 30 10
49
Example – 4
10 1
O2 3 3 2 1 50
2
O3 4 2 5 9 20
Demand 20 40 30 10
Colum n Penalty 2 0 1 3
50
25
10/16/2021
Example – 4
10 1 1
O2 3 3 2 1 50 40
20 2 2
O3 4 2 5 9 20
Demand 20 40 30 10
Colum n Penalty 2 0 1 3
2 0 20 1 --
51
Example – 4
10 1 1 1
O2 3 3 2 1 50 40
20 2 2 --
O3 4 2 5 9 20 0
Demand 20 40 30 10
Colum n Penalty 2 0 1 3
2 20 0 20 1 30 -- 0
2 1 1 --
52
26
10/16/2021
Example – 4
D1 D2 D3 D4 Supply Row Penalty
20 10 0 0 0 1
O1 1 2 1 4 30 10
10 1 1 1 1
O2 3 3 2 1 50 40
20 2 2 -- --
O3 4 2 5 9 20 0
Demand 20 40 30 10
Colum n Penalty 2 0 1 3
2 0 20 1 -- 0
2 1 1 --
-- 1 1 20 --
53
Example – 4
D1 D2 D3 D4 Supply Row Penalty
20 10 0 0 0 1
O1 1 2 1 4 30 10
20 20 10 1 1 1 1
O2 3 3 2 1 50 40
20 2 2 -- --
O3 4 2 5 9 20 0
Demand 20 40 30 10
Colum n Penalty 2 0 1 3
2 0 20 1 -- 0
2 1 1 --
-- 1 1 20 --
54
27
10/16/2021
28
10/16/2021
Interpretation
◼ ui: Multiple of original row i that has been subtracted from
original row 0 by the simplex method during all iterations
leading to the current simplex table.
◼ vj: Multiple of original row m+j that has been subtracted from
original row 0 by the simplex method during all iterations
leading to the current simplex table.
◼ ui and vj can be interpreted as dual variables. For a non basic
variable, cij–ui–vj denotes the rate at which Z will change as xij
is increased. For any transportation problem with m sources
and n destinations, the number of functional constraints is m+n
but the number of basic variables is m+n-1.
57
Example – 5
D1 D2 D3 Supply
O1 2 7 4 5
O2 3 3 1 8
O3 5 4 7 7
O4 1 6 2 14
Demand 7 9 18
58
29
10/16/2021
D1 D2 D3 Supply ui
5
O1 2 7 4 5 1
8
O2 3 3 1 8 -1
7
O3 5 4 7 7 -2
2 2 10
O4 1 6 2 14 0
Demand 7 9 18
vj 1 6 2
59
D1 D2 D3 Supply ui
5 0 1
O1 2 7 4 5 1
3 -2
8
O2 3 3 1 8 -1
6 7
7
O3 5 4 7 7 -2
2 2 10
O4 1 6 2 14 0
Demand 7 9 18
vj 1 6 2
60
30
10/16/2021
Example – 5
D1 D2 D3 Supply
5 0 1
O1 2 7 4 5
3 2 6
O2 3 3 1 8
6 7 7
O3 5 4 7 7
2 0 12
O4 1 6 2 14
Demand 7 9 18
61
Now, do the optimality test as it is. If one ∆ij is negative, then add ϵ to
this cell, because it is the most minimum among the concerned loop.
Do the optimality test again.
62
31
10/16/2021
D1 D2 D3 Supply
O1 8 7 3 60
O2 3 8 9 70
O3 11 3 5 80
Demand 50 80 80
63
32
10/16/2021
Yes
Convert it into a maximization problem:
subtract each element of the profit
Is it a Yes matrix from its highest value
maximization
problem?
No
No
No Is it a
Generate an improved solution
optimal?
Yes
The problem is solved
Stop 65
Transshipment Problems
66
33
10/16/2021
Transshipment Problems
67
Transshipment Problems
◼ Pure supply nodes
◼ Transshipment nodes
◼ Pure demand nodes
34
10/16/2021
69
70
70
35
10/16/2021
71
72
72
36
10/16/2021
73
74
37
10/16/2021
75
◼ The Problem. The Distribution Unlimited Co. will be producing the same new
product at two different factories, and then the product must be shipped to two
warehouses, where either factory can supply either warehouse. The distribution
network available for shipping this product is shown in DN Fig. , where F1 and F2
to are the two factories, W1 and W2 are the two warehouses, DC is a distribution
center. The amounts to be shipped from F1 and F2 are shown to their left, and the
amounts to be received at W1and W2 are shown to their right. Each arrow
represents a feasible shipping lane. Thus, F1can ship directly to W1 and has three
possible routes (F1->DC-> W2, F1->F2->DC->W2, and F1->W1->W2) for
shipping toW2. Factory F2 has just one route to W2 (F2->DC->W2) and one to W1
(F2->DC->W2->W1).The cost per unit shipped through each shipping lane is
shown next to the arrow. Also shown next to F1->F2 and DC->W2 are the
maximum amounts that can be shipped through these lanes. The other lanes have
sufficient shipping capacity to handle everything these factories can send.
The decision to be made concerns how much to ship through each shipping lane.
The objective is to minimize the total shipping cost.
76
38
10/16/2021
The decision to be made concerns how much to ship through each shipping
lane. The objective is to minimize the total shipping cost.
77
78
39
10/16/2021
Solution:
80
40
10/16/2021
Test Problem
81
Test Problem
D1 800
3 T1 5
1000 P1
6
4
7
D2 900
2
4
1200 5 3
P2
T2
9
D3 500
82
41
10/16/2021
Assignment Problems
83
Using an assignment model as part of a micro computer-based decision support system, the
American League was able to reduce travel mileage by about 4% during the first year of use.
This not only saved the league $30, 000 but improved the crew exposure balance.
Source: Interface, 1988
84
42
10/16/2021
Examples
◼ Assigning airline crews to flights in order to minimize costs.
◼ Assigning sales personnel to sales districts in order to
maximize sales.
◼ Assigning rescue units to rescue tasks in order to minimize
total combined time to complete all rescue tasks.
◼ Assigning boats or planes to charter trips in order to
maximize total profit.
◼ Assigning social workers to welfare cases in order to
maximize the number of cases closed within a specified
period.
85
43
10/16/2021
Assignment Problem
87
88
44
10/16/2021
Job Assignment
A Production supervisor is considering how he should assign the four jobs
that are to be performed, to four of the workers. He wants to assign the
jobs to the workers such that the aggregate time to perform the jobs is the
least. Based on previous experience, he has the information on the time
taken by the four workers in performing these jobs, as given in the table
below:
Job
Worker
A B C D
1 45 40 51 67
2 57 42 63 55
3 49 52 48 64
4 41 45 60 55
89
x11+x21+x31 +X41= 1
x12+x22+x32 +x42= 1
x13+x23+x33 + x43 = 1
x14+x24+x34 + x44 = 1
45
10/16/2021
Job Assignment
Solution
Constraints
x11 x12 x13 x14 x21 x22 x23 x24 x31 x32 x33 x34 x41 x42 x43 x44
1 1 1 1 1 = 1
1 1 1 1 1 = 1
1 1 1 1 1 = 1
1 1 1 1 1 = 1
1 1 1 1 1 = 1
1 1 1 1 1 = 1
1 1 1 1 1 = 1
1 1 1 1 1 = 1
Solution 0 1 0 0 0 0 0 1 0 0 1 0 1 0 0 0
91
Basic Principle
◼ The optimal assignment is not affected if a constant is
added or subtracted from any row or column of the
standard assignment cost matrix
◼ e.g. if the cost of doing any job on machine 1 is
reduced by k, then the objective function of the
assignment problem becomes
n n
Min z = (c1 j − k ) x1 j + cij xij
j i = 2 j =1
n n n
= cij xij − k xij
i =1 j =1 j =1
s.t.
n
xi
j =1
j =1 i
92
46
10/16/2021
Hungarian Algorithm
◼ Step1 : Find the minimum element in each row of
the n x n cost matrix. 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.
93
Hungarian Algorithm
◼ Step 2 : Draw the minimum number of lines
(horizontal and/or vertical) that are needed to cover
all the zeros in the reduced cost matrix.
If n lines are required, an optimal solution is
available among the covered zeros in the matrix. If
fewer than n lines are needed, proceed to Step 3.
94
47
10/16/2021
Hungarian Algorithm
◼ Step 3: Find the smallest element (say 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.
Example
Machines
M1 M2 M3 M4
J1 8 26 17 11
J2 13 28 4 26
JOBS
J3 38 19 18 15
J4 19 26 24 10
96
48
10/16/2021
Example
Machines
M1 M2 M3 M4
J1 0 18 9 3
J2 9 24 0 22
JOBS
J3 23 4 3 0
J4 9 16 14 0
97
Example
Machines
M1 M2 M3 M4
J1 0 14 9 3
J2 9 20 0 22
JOBS
J3 23 0 3 0
J4 9 12 14 0
98
49
10/16/2021
J1 0 14 9 3
J2 9 20 0 22
JOBS
J3 23 0 3 0
J4 9 12 14 0
99
Example 2?
Machines
M1 M2 M3 M4
J1 18 26 17 11
J2 13 28 14 26
JOBS
J3 38 19 18 15
J4 19 26 24 10
100
50
10/16/2021
Example 2?
Machines
M1 M2 M3 M4
J1 7 11 5 0
J2 0 11 0 13
JOBS
J3 23 0 2 0
J4 9 12 13 0
101
Example 2?
Machines
M1 M2 M3 M4
J1 2 6 0 0
J2 0 11 0 18
JOBS
J3 23 0 2 5
J4 4 7 8 0
102
51
10/16/2021
Example
Table- 1: Maximization problem
I II
A 3 9
B 6 4
I II
A 6 0
B 3 5
104
52
10/16/2021
Example
◼ Jobshop needs to assign 4 jobs to 4 workers. The
cost of performing a job is a function of the skills of
the workers. Table-1 summarizes the cost of the
assignments. Worker 1 cannot do job 3 and worker 3
cannot do job 4.
105
Example
Table- 1: Cost data
Job
J1 J2 J3 J4
1 50 50 − 20
2 70 40 20 30
Worker
3 90 30 50 −
4 70 20 60 70
106
53
10/16/2021
Example
Table- 1: Cost data
Job
J1 J2 J3 J4
1 50 50 M 20
2 70 40 20 30
Worker
3 90 30 50 M
4 70 20 60 70
107
Start
Schematic presentation of Assignment Problem
Yes
Convert it into a maximization problem:
either (i) by changing the signs of the
Is it a Yes elements of the table; or by subtracting
maximization
all the values from the largest value
problem?
No
Stop 108
54