-
LINEAR OPTIMIZATION IN ApPLICATIONS
-
LINEAR OPTIMIZATION IN ApPLICATIONS
S.L.TANG
香港付出版社
HONG KONG UNIVERSITY PRESS
-
Hong Kong University Press
141F Hing Wai Centre
7 Tin Wan Praya Road
Aberdeen, Hong Kong
。 Hong Kong University Press 1999
First Published 1999
Reprinted 2004
ISBN 962 209 483 X
All rights reserved. No portion of this publication may
be reproduced or transmitted in any form or by any
recording, or any information storage or retrieval system,
without permission in writing from the publisher.
Secure On-line Ordering
http://www.hkupress.org
Printed and bound by Liang Yu Printing Factory in Hong Kong, China
-
CONTENTS
Preface
C hapl er I : Inlroduclion ' . 1 Formulation of a linear programming problem 1.2 Solving a linear programming problem
1.2.1 Graphical method 1.2.2 Simplex method 1.2.3 Revised si mplex method
Chapler 2 : Primal and Dual Models 2.1 Sharlow price I opportunity cost 2.2 The dual model 2.3 Comparing primnlnnd dual 2.4 Algebraic .... '3y to find shadow prices 2.5 A worked example
Chapler 3 : Formulating linear Optimization Problems 3.1 Transportation problem 3.2 Transportation problem with distributors 3.3 Trans-shipment problem 3.4 Earth moving optimization 3.5 Production schedule optimization 3.6 Aggregate blending problem 3.7 Liquid blending problem 3.8 Wastewater treatment optimization 3.9 Critical path ora precedence network 3. 10 Time-cost optimization ofa project network
C hapter 4 : Transport'siion Problem and Algorithm 4. 1 The general form of a transportation problem 4,2 The algorithm 4.3 A furthe r example 4.4 More applications of Iran sport al i on algorithm
4.4. 1 Tmns-shipment problem 4.4.2 Earth moving problem 4.4.3 Product schedule problem
4.5 An interesti ng example using transportation algorithm
vii
I 2 3 4 6
9
• 9
II 13 15
I. 19 22 24 27 30 32 34 37 40 42
51 51 53 59 65 65 68 6. 71
-
VI Linear Optimization In Applications
Chapter 5 : Integer Programming Formulation 5.1 An integer programming example 5.2 Use of zero-one variables 5.3 Transportation problem with warehouse renting 5.4 Transportation problem with additional distributor 5.5 Assignment problem 5.6 Knapsack problem 5.7 Set-covering problem 5.8 Set-packing problem 5.9 Either-or constraint (resource scheduling problem) 5.10 Project scheduling problem 5.11 Travelling salesman problem
557914790258 『I
司/呵/吋
/OOOOOOOOAYAVJAYAVJ
Chapter 6 : Integer Programming Solution 6.1 An example of integer linear programming solutioning 6.2 Solutioning for models with zero-one variables
105 105 112
Chapter 7 : Goal Programming Formulation 7. 1 Linear programming versus goal programming 7.2 Multiple goal problems 7.3 Additivity of deviation variables 7.4 Integer goal programming
117 117 120 122 127
Chapter 8 : Goal Programming Solution 8.1 The revised simplex method as a tool for solving goal
programming models 8.2 A further example 8.3 Solving goal programming models using linear
programming software packages
131 131
137 140
AppendixA Appendix B Appendix C
Appendix D
Examples on Simplex Method Examples on Revised Simplex Method Use of Slack Variables, Artifical Variables and Big-M Examples of Special Cases
145 153 161
162
-
PREFACE
This b∞k is 001 wriUen 10 disεuss the malhematicsof linear programming. lt isdesigncd
10 illustrate, with praclical cxamples, thc applications orlîncaroptimi且tion techniques
The simplcx mcthod and the rcvised s implcx mcthod. thcre forc , 3re includcd as
叩pcndiccs only in thc book
啊lC book is wrillcn in simple 3nd easy 10 understand languagc. 11 has put logelhcr
a very useful and comprehcnsivc sct ofworked examplcs. bascd 011 fcallifc problcms
using lin閏 r progmmming and ÎIS c .Klcnsions including intcgcr programming and goal
programming. The examplcs 3rc uscd 10 explain how lincar optimi甜tion can be app1ied
in cnginceri ng and busin閏s/managcmcnl problems. Thc stcps shown in cach w可orkcd
cxamplc 3re clear and 間sy 10 rcad
Thc book is likcly 10 be uscd by tcachers. taught course students and 悶search
studcnts orboth engincering :md businesslmanagcment disciplincs. l t 惱 , howevcr, not
suitablc for studcnlS or purc rnalhcmalics becausεthc conlentS or Ihe book cmphasizc
叩抖ications ralher than theories
-
INTRODUCTION
1 .1 Formu lation of a Li near Programming Problem
Linear programming îs a powe血1 mathematical 1001 for the optimization of an
objcctive under a numbcr of constraints in any given situation. Its application
C曲 be in maximizing profils or minimizing costs whlle making the best use of
the limited resources avaîlable. B目ause it is a malhematical t∞1 , it is best
explained using a prac!ical example
Example 1.1 A pipe manufacluring company produces tWQ types of pipes, type I 叩d Iype n
The storage space, raw material requirement 胡d production rale are given as
below:
且==目 b且i 工站直且 (&固paoy Ay晶ilallili!)!
Storage space 5m月p'pe 3 m2/pipe 750 m2
Raw materials 6 kglpipe 4 kglpipe 8∞ kglday
Production rate 30 pipesthour 20 pipeslhour 8 hourslday
SJHO
也
du
tctnu 阱呵
1
耐心
hm心帥叫
8U尸坤扭曲
si-oco 的月
AMh
川1
日肘。恤詢
問廿
sw
心
何vmmM
叫
巾帥的叫仙
伽叫岫咕則
叫自問宙間血
M叫
mm
肌
川
ω
叩MVm
Mh
吶仰」聞
仲叫叫間耐
iy
s
uh
lb
戶
l
s
呻師叫叭咖
m
t
zmvhd
μ
帥
Mm間
m
memcdm ddhM3a ihk-Rm H
:
叫-
h
帥吋
h7
世
叫別叫心向明
叫咱們
mN
叫
TF
山
hkmv
Solution 1. 1 LetZ =
X) =
100al profit
number of Iype I pipes produced each day
number of type n pipcs pr'吋uced each day '‘, =
Sînce our obj且llve IS lO maxlmlze pro缸 , we write 曲。bj配tive function,
equation (0)、 whîch wîll calculale lhe IOlal profil
MaximizeZ= 10xI +8X2 (0)
-
2 Linear Optimization 的 Applications
Xl and X2 in equation (0) are called decision variables.
There are three constraints which govem the number of type 1 and type 11 pipes
produced. These constraints are: (1) the availability of storage space, (2) the raw
materials available, and (3) the working hours of labourers. Constraints (1), (2)
and (3) are written as below:
Storage space: 5Xl + 3X2 三 750 、‘',
.E.A /,.‘、、
、
Raw material 6x 1 + 4X2 三 800 一一一一一一一一一一一一一一-一一-一一 (2)
x x W orking hours :一土+一土豆 8 一一一一一一一一一一一一一… (3)
30 20
When constraint (3) is multiplied by 60, the unit of hours will be changed to the
unit of minutes (ie. 8 hours to 480 minutes). Constraint (3) can be written as :
2Xl + 3X2 三 480 (3)
Lastly, there are two more constraints which are not numbered. They are Xl 三 O
and X2 三 0, simply because the quantities Xl and X2 cannot be negative.
We can now summarize the problem as a linear programming model as
follows:
勻,旬
x nxu + xm nununuAU E』《
Jnunδ
=弓
IOOA
『
Z<
一歪歪
咒。
222
utxxx n1343 .m﹒戶+++
a-b!lll AUXXX EWSζJfO
司4
、‘.,/
nU J'.‘、、
(1)
(2)
(3)
Xl ~O
X2~ 0
1.2 Solving a Linear Programming Problem
There are two methods in solving linear prograrnming models, namely, the
graphical method and the simplex method. The graphical method can only
solve linear programming problems with two decision variables, while the
simplex method can solve problems with any number of decision variables.
Since this book will only concentrate on the applications of linear prograrnming,
-
Introduction 3
the rnathernatical details for solving the rnodels will not be thoroughly treated.
In this section, the graphical method and the simplex method will only be briefly
described.
1.2.1 Graphical Method
Let us look at the linear prograrnrning rnodel for Exarnple 1.1:
Max Z = 10Xl + 8X2 “…一
subject to
5Xl + 3X2 至 750..._..... 的 自…"“…“…叮叮………“凹,叫“_........ (1)
、‘,/
AU /EE‘、
6Xl + 4X2 至 800 ...叮叮叮叮“ “一 …......................_.......呵 呵 ω 叮叮叮叮一 "曰 “ … (2)
2Xl + 3X2 歪 480 山_..……"叮叮叮………… 一。" “ _.......“…… 一 " “ … (3)
Xl ~O
X2~ 0
The area bounded by (1) : 5Xl + 3X2 = 750, (2) : 6Xl + 4X2 = 800, (3) : 2Xl + 3X2
= 480, (4) : Xl = 0 and (5) : X2 = 0 is called the feasible space, which is the
shaded area shown in Fig. 1.1. Any point that lies within this feasible space wi11
satisfy all the constraints and is called a feasible solution.
X2
Note: the x) and X2 axes are not drawn on the same scale.
X)
Fig. 1.1 Graphical Method
The optirnal solution is a feasible solution which, on top of satisfying all
constraints, also optirnizes the objective function , that is, rnaxirnizes profit in
this case. By using the slope of the objective function , -(10/8) in our case, a line
can be drawn with such a slope which touches a point within the feasible space
-
4 Linear Optimization 的 Applications
and is as f;缸 away as possible from the point of origin O. This point is
represented by A in Fig. 1.1 and is the optima1 solution. From the graph, it can
be seen that at optimum,
Xl = 48 (type 1 pipes)
也= 128 (type 11 pipes)
max Z = 1504 (profit in $), ca1culated from 10(48) + 8(128)
From Fig. 1.1 , one can also see whether or not the resources (i.e. storage space,
raw materials, working time) are fully utilized.
Consider the storage space constraint (1). The optima1 point A does not lie on
line (1) and therefore does not satisfy the equation 5Xl + 3X2 = 750. If we substitute Xl = 48 and X2 = 128 into this equation, we obtain:
5(48) + 3(1 28) = 624 < 750
Therefore, at optimum, only 624 m2 of storage space are used and 126 m2 (i.e.
750 - 624) are not used.
By similar reasoning, we can see that the other two resources (raw materia1s and
working time) are fully utilized.
If constraint (1) of the above problem is changed to 5Xl + 3X2 三 624, that is, the
available storage space is 624 m2 instead of 750 m2, then line (1) will a1so touch
the feasible space at point A. In this case, lines (1), (2) and (3) are concurrent at
point A and a11 the three resources are fully utilized when the maximum profit is
attained. There is a technical term ca11ed “optima1 degenerate solution" used for
such a situation.
1.2.2 Simplex Method
When there are three or more decision variables in a linear programming model,
the graphica1 method is no more suitable for solving the model. Instead of the
graphical method, the simplex method will be used.
-
5 Introduction
As mentioned earlier, the main theme of this book is applications of linear
Therefore, programming, not mathematical theory behind linear programming.
no detail description of the mathematics of linear programming will be
presented here. There are many well developed computer programs available in
the market for solving linear programming models using the simplex method.
One of them is QSB+ (Quantitative Systems for Business Plus) written by Y.L.
Chang and R.S. Sullivan and can be obtained in any large bookshop world-wide.
The author will use the QSB+ software to solve all the problems contained in the
later chapters of this book.
Examples of the techniques employed in the simplex method wi1l be illustrated
in Appendix A at the end of this book. Some salient points of the method are
summarized below.
First of all we introduce slack variables SI,也 and S3 (S 1, S2, S3 ~ 0) for Example
1.1 to change the constraints from inequalities to equalities such that the model
becomes:
(Oa) Z - 10Xl - 8X2 = 0
subject to
(1 a) 5Xl + 3X2 + SI = 750
(2a) 6Xl + 4X2 + S2 = 800
(3a) 2Xl + 3X2 + S3 = 480
The initial tableau of the simplex method is shown in Table 1.1. It is in fact a
rewrite of equations (Oa), (la) , (2a) and (3a) in a tableau format.
品一oool
已一oolo
趴一0100
也-A343
h﹒一心562
Z一1000
Basic Variable (Oa) Z (1a) SI (2a) S2 (3a) S3
Initial Simplex Tableau for Example 1.1 Table 1.1
-
Linear Optimization 的 Applications6
After two iterations (see Appendix A), the final tableau will be obtained and is
shown in Table 1.2 below.
Basic Variable (Oc) Z (1c) Sl (2c) Xl (3c) X2
3-82A6 s-aooa 2-4932 s-loan吋
趴一0100
也一oool
叫一oolo
z-1000
Table 1.2 Final Simplex Tableau for Example 1.1
To obtain a solution from a simplex tableau, the basic variables are equal to the
values in the RHS column. The non-basic variables (i.e. the decision variables
or slack variables which are not in the basic variable column) are assigned the
Therefore, from the final tableau, we can see that the optimal value zero.
solution is:
Z = 1504
Xl = 48
X2 = 128
Sl = 126 S2 = 0
} non仔.枷i比cvar缸ri昀岫a油bl臼叫a缸re叩a叫l ω
It can be seen that this result is the same as that found by the graphica1 method.
S 1 here is 126, which means that the slack variable for storage space is 126 and
therefore 126 m2 of storage space is not utilized. Sl and S2 are slack variables
S3 = 0
for the other two resources and are equa1 to O. This means that the raw materia1s
and the working time are fully utilized.
Revised Simplex Method
The revised simplex method is a1so ca11ed the modified simplex method. In
this method, the objective function is usually written in the last row instead of
1.2.3
the first. Ex剖nples of the technique are illustrated in Appendix B. QSB+ uses
the revised simplex method in solving linear programming models. The initial
tableau for Example 1.1 is shown in Table 1.3.
-
Introduct的n
Basic X) X2 S) S2 S3
Variable Q 10 8 。 。 。 RHS S) 。 5 3 。 。 750 S2 。 6 4 。 。 800 S3 。 2 3 。 。 480
L 。 。 。 。 。 。Cj -Zj 10 8 。 。 。
Table 1.3 Initial Simplex Tableau for Example 1.1 (Revised Simplex Method)
After two iterations (see Appendix B), the final tableau will be obtained. It is
shown in Table 1.4.
Basic x) X2 S) S2 S3 Variable Q 10 8 。 。 。 RHS
S) 。 。 。 -0.9 0.2 126 x) 10 。 。 0.3 -0.4 48 X2 8 。 。 -0.2 0.6 128
L 10 8 。 1.4 0.8 1504 Cj -Zj 。 。 。 -1.4 -0.8
Table 1.4 Fínal Símplex Tableau for Example 1.1 (Revísed Símplex Method)
7
-
PRIMAL AND DUAL MODELS
2.1 Shadow Price I Opportunity C。到
The shadow price (or called opportunity cost) of a resource is defined as the
economic value (increase in profil) of an exlra unit of resource at the optimal
point. For example, the raw material available in Example LI of Chapter I is
8曲旬; the shadow price of it means the increase in profit (or the increase in Z,
the objective fu nclîon) if the raw material is incre越ed by onc un叭 , 10801 kg
Now, I叭叭= shadow pricc of storage space($Im2)
Y2 = shadow price of raw material ($lkg)
Y3 = shadow price of working time($/minute)
This means that one additionaJ m2 of storage space available (i.e. 751 m2 is
available inslead of 750 m2) 圳11 increase Z by YI dollars; one additional kg of
raw malerials available wi l1 increase Z by y2 dollars; and one additional minute
of working time available will increase Z by Y3 dollars
8ased on the defini tion of shadow price, we can fonnu lale anolher Iinear
programming mode1 for Example 1.1. T >is new model is called the dual model
2.2 The Dual Model
Si nce thc productîon of a type I pipe requires 5 m2 of storage space, 6 kg of raw
material 朋d 2 minutcs of working time, the shadow price of producing one extra
type I pipe will be 句1 + 6 y2 + 2Y3. This means that the increase in profit (i .e. Z)
due to producing an additionallYpe I pipe is 5Yl + 6 y2 + 2狗, wh.ich should be
greater th曲。r at least equal 10 $ 10, Ihe profit level of selling one type I pi阱, m
order to juslify the extra production. Hence, we can writc thc constraint that
5Yl + 6Y2 + 2Y3 ;::: 10 (1)
A similar argument app l i臨 10 type II pi阱. and we can write another constraint
that
3Yl +4Y2+3Y3;::: 8 (2)
-
10 L的earOptl的7ization 的 Applications
It is impossible to have a decrease in profit due to an extra input of any
resources. Therefore the shadow prices cannot have negative values. So, we
can also write:
yl 這 O
y2 這 O
y3~ 0
We can also inte中ret the shadow price as the amount of money that the pipe
company can afford to pay for one additional unit of 自source so that he can just
break even on the use of that resource. In other words, the company can afford,
to pay, s旬, y2 for one extra kg of raw material. If it pays less than y2 from the
market to buy the raw material it will make a profit, and vice versa.
The objective this time is to minimize cost. The total price, P, of the total
resources employed in producing pipes is equal to 750Yl + 800Y2 + 480Y3. In
order to minimize P, the objective function is written as:
Minimize P = 750Yl + 800Y2 + 480狗一…一一一一一………一 (0)
We can now summarize the dual model as follows:
Min P = 750Yl + 800Y2 + 480Y3 subject to
一一一一一一……一一 (0)
5Yl + 6Y2 + 2Y3 ~ 10
3Yl + 4Y2 + 3Y3 ~ 8
yl ~O
y2 ~ 0
y3 ~ 0
The solution of this dual model (see Appendix A or Appendix B) is:
min P = 1504
yl= 0
y2 = 1.4
y3 = 0.8
(1)
(2)
We can observe that the optimal value of P is equal to the optimal value of Z
found in Chapter 1. The shadow price of storage space, yl , is equal to O. This
means that one additional m2 of storage space will result in no increase in profit.
-
Primal and Dual Models 11
This is reasonable because there has a1ready been unutilized storage space. The
shadow price of raw material,抖, is equa1 to 1.4. This means that one additiona1
kg of raw materia1 will increase the profit level by $1 .4. The shadow price of
working time,豹, is equal to 0.8. This means that one additiona1 minute of
working time will increase the profit level by $0.8. It can a1so be interpreted
that $0.8/minute is the amount which the company can afford to pay for the
extra working time. If the company pays less than $0.8/minute for the workers
it will make a profit, and vice versa.
2.3 Comparing Primal and Dual
The linear programming model given in Chapter 1 is referred to as a primal
model. Its dual form has been discussed in Section 2.2. These two models are
reproduced below for easy reference.
位也al 2屆l
Min P = 750Yl + 800Y2 + 480Y3
subject to
5Yl + 6Y2 + 2Y3 ~ 10
3Yl + 4Y2 + 3Y3 ~ 8
?但
x oo +OOO 1508 x784 的歪歪歪
=0222 FJtxxx 21343 LC+++ 、f﹒必刊J
111ll A
叫
xxx
hnsζJrO
呵,L yl 這 O
Xl ~O y2 這 O
y3 ~ 0 X2 ~ 0
It can be observed that :
(a) the coefficients of the objective function in the prima1 model are equal to the
RHS constants of the constraints in the dua1 model,
(b) the RHS constants of the constraints of the prima1 model are the coefficient
of the objective function of the dua1 model, and
(c) the coefficients of yt , y2 and 豹, when read row by row , for the two
constraints of the dua1 model are equa1 to those of Xl and X2, when read
column by column, in the primal model. In other words, the dual is the
transpose of the primal if the coefficients of the constraints are imagined as a
matnx.
-
12 Linear Optimization in Applications
The general fonn of a primal model is :
Max Z = C1X1 + C2X2 + .‘+ CnXn subject to
a11x1 + a12x2 + ., ... + a1nXn 三 b l
~月 I + ~2X2 + ..... + ~nXn 三 b2
丸llX I +丸泣X2 + ..... + ~Xn 三 bmall xj 主 O
The general fonn of the dual model wil1 be :
瓦1in P = b tYl + b2Y2 + .. ... + bmYm
subject to
allYI + ~tY2 + ., •.. +丸llYm 主 c 1
al2YI + ~2Y2 + ., •.. +丸。Ym 主 c2
a1nYI + ~nY2 + .. '" +丸mYm 這 cn
all Yi 這 O
The two models are related by :
(a) maximum Z = minimum P, and
、‘,/
ku /'.、
ð. Z Yi= 一一一
ð. bi
where Yi stand for the shadow price of the resource i and bi is the amount of the
ith resource available.
It should be pointed out that it is not necessary to solve the dual model in order
to find Yi' In fact, Yi can be seen 企om the final simplex tableau of the primal
model. Let us examine the final tableau of Example 1.1 :
-
13
地一oool
叫一oolo
z-1000
Primal and Dual Models
Basic Variable Z Sl XI X2
We can see that the coefficient of Sl , slack variable for storage space, in the first
row (the row of the objective function Z) is equal to Yh the shadow price of
storage space in $/rn2. The coefficient of 鈍, slack variable for raw rnaterial, in
the first row is equa1 to Y2, the shadow price of raw rnaterial in $/kg. Again, the
coefficient of 缸, slack variable for working tirne, in the first row is equal to 豹,
the shadow price of working tirne in $/rninute.
Therefore, it is not necess缸Y to solve the dua1 rnodel to find the values of the
decision variables (ie. YI,但 and Y3). They can be found frorn the prirnal rnodel.
The sarne occurs in the revised sirnplex rnethod. The final tableau of the revised
rnethod for Exarnple 1.1 is :
Basic Xl X2 Sl S2 S3
Variable q 10 8 。 。 。 RHS Sl 。 。 。 126 XI 10 。 。 48 X2 8 。 。 128
2日 10 8 1504 Cj -Zj 。 。
y3 Y2 Yl
In a sirnilar w呵, the values of yl , Y2 個d Y3 can be seen frorn the row of Zj .
Algebraic Way to Find Shadow Prices
There is a sirnple algebraic way to find the shadow price without ernploying the
2.4
sirnplex rnethod. Let us use the sarne ex缸nple, Exarnple 1.1 , again to illustrate
how this can be done. The linear prograrnrning rnodel is reproduced hereunder
、‘E/
AU /'.‘、、
for easy reference:
Z=10Xl +8X2 M位
-
14 Linear Optimization in Applications
AUAUAU P、JAUOO
司IOOA
且可
<一<一<一
0222 txxx d343 戶+++
:ll1 叫
XXX
S
《JfO
司4
(1)
(2)
(3)
As can be seen 企om the graphical method, storage space has no effect on the
optimal solution (see Section 1.2.1). Line (1) : 5x) + 3x2 750 therefore does
not pass through the optimal point. Since raw material and working time both
define the optimal point, the solution is therefore the intersection point of line
(2) : 6x) + 4x2 = 800 and line (3) : 2x) + 3x2 = 480.
Assuming that the raw material available is increased by ~L kg, the optimal
solution will then be obtained by solving:
6x) + 4x2 = 800 + ~L
and 2x) + 3x2 = 480
Solving, we obtain :
l=48+L aL 10
and x2 = 1孔令 ~L
Substituting x) and x2 into the objective function, we have:
z + ~Z =叫48 + 1~f\ ~L) +叩28 - +~L) 3 10 ~~I -,~-- 5
Simplifying, we get
z + ~Z = 10附 +8(128)+÷aL
Since Z = 10(48) + 8(128)
az=?aL
i.e-A三1.4 (i.e. shadow price ofraw material in $/kg) ~L
-
Primal and Dual Models 15
Similarly, if we assume that the working time available is increased by AM
minutes, we can, by the same method, obtain that :
各= 0.8 (i.e. s叫p心
2.5 A Worked Example
Let us now see a practical example of the application of shadow prices.
Example2.1
A company which manufactures table lamps has developed three models
denoted the “Standard",“Special" and “Deluxe". The financial retums from the
three models are $30, $40 and $50 respectively per unit produced and sold. The
resource requirements per unit manufactured and the total capacity of resources
available are given below:
扎1achining Assembly (hours) (hours)
Standard 3 2
Special 4 2
Deluxe 4 3
A vailable Capacity 20,000 10,000
σ。、』',
n3 ••• A
•• A
eELEa-mm 劃
h
DAit
2
3
6,000
(a) Find the number of units of each type of lamp that should be produced such
that the total financial retum is maximized. (Assume all units produced 缸e
also sold.)
(b) At the optimal product mix, which resource is under-utilized?
(c) If the painting-hours resource can be increased to 6,500, what will be the
effect on the total financial retum?
Solution 2. 1
(a) The problem can be represented by the following linear programming
model:
Max Z = 30Xl + 40X2 + 50月
-
16 Linear Optimization 的 Applications
subject to
3x1 + 4x2 + 4x3 至 20,000
2x1 + 2x2 + 3x3 至 10 ,000
x1 + 2x2 + 3x3 至 6 ,000
x,. x~. x, ~ 0 l' L'-2' .l"1t.. 3
where X 1 = number of Standard lamps produced
X2 = number of Special lamps produced
X3 = number of Deluxe lamps produced
Introduce slack variables Sl' S2 and S3 such that:
3x1 + 4x2 + 4x3 + Sl 20,000
2x1 + 2x2 + 3x3 + S2 10,000
x1 + 2x2 + 3x3 + S3 6,000
Using the simplex method to solve the model, the final tableau is:
Basic Variable Z
Sl x1 x
shadow price of painting hour
The final tableau of the revised simplex method is :
Basic x1 x2
Variable Cj 30 40
Sl 。 。 。x1 30 。x2 40 。
Zj 30 40 Cj -Zj 。 。
x3 Sl
50 。-2
。 。l.5 。60 。-10 。
S2 S3
。 。
-0.5 10 |T -10
shadow price of painting hour
RHS
4,000 4,000 1,000
160,000
From the final tableau of either method, we obtain the following optimal solution:
-
Primal and Dual Models
Basic varìable
S} = 4,000
x} = 4,000
X2 = 1,000
Z = 160,000
17
Non-basic variable
X3 = 0
S2 =0
S3 =0
Therefore, the company should manufacture 4,000 Standard lamps, 1,000
Special lamps and no Deluxe lamps. The maximum financial retum ìs
$160,000.
(b) Machìnìng ìs under-utilized. Since SI = 4,000, therefore 4,000 machining
hours are not used.
(c) The shadow price of painting-hours resource can be read from either
tableau and is equal to $10/hour. This means that the financial retum wi1l
increase by $10 if the painting-hour resource is increased by 1 hour. If the
painting hour is increased by 500 (from 6,000 hours to 6,500 hours) , then
the total increase in financial retum is $10 x 500 = $5 ,000, and the overall
fìnancial retum will be $160,000 + $5 ,000 = $165 ,000.
It should be noted that the shadow price $10/per hour may not be valid for
infinite increase of painting hours. In this particular problem, it is valid until
the painting hour is increased to 10,000. This involves post optimality
analysis which is outside the scope of this book. The software QSB,
however, shows the user the range of validity for each and every resource in
its sensitivity analysis function.
It is also worthwhile to note that while the 2月 values of the final revised
simplex tableau represent shadow prices of the corresponding resources, the
Cj - 2月 values 自P時sent the reduced costs. The reduced cost of a non-basic
decision variable is the reduction in profit of the objective function due to
one unit increase of that non咱basic decision variable. In Example 2.1 , the
non-basic decision variable is 肉, and so X3 is equa1 to 0 when the total profit
is maxirnized to $160,000. If we want to produce one Deluxe lamp in the
-
18 Linear Optimization in Applications
product mix (i.e. X3 = 1) under the origina1 available resources, then the total
profit will be reduced to $159,990 (i.e. 160,000 - 10) because the reduced
cost of X3 is -10 (the Cj - Zj va1ue under column X3).
Exercise
1. A precast concrete subcontractor makes three types of panels. In the production
the quantities of cement, co缸se aggregates and fines aggregates required are as
follows:
Cement Course aggregates Fines aggregates (m3/panel) (m3/panel) (m3/panel)
Panel 1 3 2
Panel II 2 3
Panel m 2 3 4
The subcontractor has the following quantities of cement, coarse aggregates and
fines aggregates per week :
Cement : 300 m3
Coarse aggregates : 500 m3
Fines aggregates : 620 m3
The financia1 retum for panel types 1, II and m 缸e 20, 18 and 25 respectively.
Find the number of panels of each type that should be made so that the total
financial retum is maximized. Which resource is under-utilized and why? If the
subcontractor can obtain some extra coarse aggregates, what is the maximum
cost per m3 the subcontractor can afford to pay for it?
-
In Chapter 1, we have seen how a Iinear programming model for maximizing
profit under limited resources is formulated. In Chapter 2, we have also seen
how its dual model is formulated. This chapter contains more examples on the
formulation of linear programming problems.
3.1 Transportation Problem
Example3.1
Goods have to be transported from three warehouses 1, 2 and 3 to two customers
1 and 2. The three warehouses have the following quantities of stock to be
transported per week.
warehouse Ouantitv of stock (tonnes)
2
3
勻,MQVAU
,且呵
JH43
The requirements of the two customers per week 訂e:
Customer O~reauired (tonnes)
2
29
33
The costs of transporting one tonne of stock from each warehouse to each
customer is given in Table 3.1.
Cost per stock
Warehouse
Table 3.1 Cost matrix of the transp。前ation problem
This means that it costs $9 to transport one tonne of stock from warehouse 1 to
customer 1, $10 to customer 2, and so on.
-
20 Linear Optimization in Applications
The problem is to determine how many tonnes of stock to transport from each
warehouse to each customer per week in order to minimize the overall
tr缸的portatíon cost.
Solution 3. 1 Let xij be the decision variables so that xij is the number of tonnes of stock
transported from warehouse i to customer j per week as follows:
warehouse Customer GGG
It is best to represent the problem in the form of a transportation tableau (Fig.
3.1).
Customer 2 Supply
之j l旦lX11 X12 12
丘l 斗W訂e- 2 X21 X22 20
house
3 主j ~
30 X31 X32
Demand 29 33
Fig. 3.1 A transpo叫ation tableau
The objective function is to minimize overall transportation cost:
Minimize P = 9X 11 + 10x12 + 6X21 + 7X22 + 8X31 + l1x32
There are three constraints on the amount of stock transported from each
warehouse; the amount must not exceed the supply available:
-
Formulating Linear Optimization Problems 21
Warehouse 1 : x lI + X12 $; 12 ………一…一………………一…………(1)
Warehouse 2: X21 + X22 三 20 … (2)
Warehouse 3: X31 + X32 三 30 …………一………一…………一…一… (3)
There are two constraints on the amount of stock demanded by the customers:
Customer 1 : X11
+ X21
+ X31
= 29 一…一………戶。"一……_._..._...……… (4)
Customer 2: X12
+ X22
+ X32
= 33 …… … "的“呵呵 "“一………_._...-帥_.......... (5)
So, the linear programming model for this problem is summarized as follows:
Min P = 9X 11 + 10x12 + 6X21 + 7X22 + 8X31 + l1x32
subject to
XII + X12 ~三 12
X 21 + X 22 ~三 20
X31 + X32 ~三 30
(1)
呵呵 (2)
一 (3)
向"一 (4)X11 + X21 + X31 = 29
X12 + X22 + X32 = 33 一一…………一…………一……… (5)
all xij 主 o (i = 1, 2, 3 and j = 1, 2)
The solution for this model is:
Overall minimum transportation cost = 503
XII = 0
X 21 = 0
X 31 = 29
X 12 = 12
X 22 = 20
X 32 = 1
The above example is usually called a transportation problem. A
transportation problem can be solved by the simplex method of course, or by
another algorithm technique which will be discussed in Chapter 4.
-
22 Linear Optimization 的 Applications
3.2 Transportation Problem With Distributors
Example3.2
This example is related to but a little more complicated than Example 3. 1.
Assume that the three warehouses ( i = 1, 2, 3) are transporting their stocks to
the two customers (k = 1, 2) directly and/or through two distributors G = 1, 2). Distributorships are offered at the discretion of the warehouses only when
needed. Distributors 1 and 2 have weekly capacities to store and distribute 40
and 35 tonnes of stock respectively. The system can be represented by Fig. 3.2.
warehouse Distributors Customers
Supply = 12
Demand= 29
Supply = 20
Demand= 33
Supply = 30
Fig. 3.2 A transportation problem with distributors
The costs Cik of transporting a tonne of stock from i to k on route Zik (i.e. direct
delivery without through the distributors) have already been given in Example
3. 1. The cost of transporting a tonne of stock from each warehouse to each
distributor (i.e. i to j) and from each distributor to each customer (i.e. j to k) are
as follows:
-
Formulating Linear Optimization Problems 23
Route i - i Unit cost C Route i - k Unit cost C
1-1 4 1-1 3
1-2 6 1-2 5
2-1 5 2-1 6
2-2 4 2-2 4
3-1 5
3-2 3
How should the stocks be distributed to the customers such that the overal1
distribution cost is minimized?
Solution 3.2 Objective function:
Minimize P = LCij xij + LCjk Yjk + L Cik Zik
= 4x"
+ 6XI2 + 5x21 + 4X22 + 5x31 + 3X32
+ 3y" + 5YI2 + 6Y21 + 4Y22
+ 9z11 + 10z'2 + 6z21 + 7Z22 + 8z31 + l1z32
Constraints:
The warehouse supply constraints:
LXii + LZik 三 Supply of warehouse for i = 1, 2, 3 j=1 - k=1
i.e. X11 + X12 + Zll + ZI2 三 12 一……………………一個……._--_._-_...……(1)
X21 + X22 + Z21 + Z22 ~ 20- (2)
X31 + X32 + Z31 + Z32 三 3。一一…一一…一…………一……._.-叫“一……… (3)
The distributor capacity constraints:
LXij 歪 Capacity of distributor for j = 1, 2
i.e. X11 + X21 + X31 三 40 ……一一一一……一一一……一一---_....._.-一 (4)
X12 + X22 + X32 三 35 一一一一一…一一一一一……一一一一…一… (5)
-
24 Linear Optimization 的 Applicat.的ns
The distributor input-output constraints:
~Xii ~ ~Yik for j = 1, 2 i=1 - k=1
i.e. xlI + X21 + X 31 ~ YII + Y I2 …一一一一一…一一一一一一一一一一一 (6)
X I2 + X22 + X32 ~ Y21 + Y22 -: (7)
The customer demand constraints:
~Zik +抖= Demand of customer for k = 1, 2
i.e. ZII + Z21 + Z31 + YII + Y21 = 29 …………一…一一一一----~.~…一一… (8)
ZI2 + Z22 + Z32 + Y I2 + Y22 = 33 …………一一--_._----………--一一一 (9)
The final set of constraints are:
all xij ~三 0, Yjk ~ 0, Zik 去。
The solution for this model is:
Minimum overall distribution cost = 417 X 11 = 12 YII = 12 ZII = 0
X I2 = 0 YI2 =0 Z I2 = 0
X21 = 0 Y21 = 0 Z21 = 17
X 22 = 0 Y22 = 30 Z22 = 3
X 31 =0 Z31 = 0
X32 = 30 Z32 = 0
3.3 Trans-shipment Problem
In Example 3.1 , we have seen what a transportation problem is. A
transportation problem involves a set of source locations and another set of
destinations. We have also seen an extension of the transportation problem in
Example 3.2 with the introduction of a set of distributors in between the sources
and the destinations. Now, we shall see another extension of the transportation
problem, called the trans-shipment problem, in which stock can flow into and
-
Formulatíng Línear Optímízatíon Problems 25
out of intermediate points in a network, depending upon where they are needed
most. Let us now see a trans-shipment example.
Example3.3
Fig. 3.3 A trans-shipment problem
In Fig. 3.3, the warehouses 1 and 4 have positive numbers, which means that 18
and 12 tonnes of stock respectively are to be transported out from these two
nodes in the network. Demand stations 3 and 6 have negative numbers, which
means that 14 and 16 tonnes of stock respectively are required by these two
nodes. Nodes 2 and 5 are intermediate nodes which neither supply nor demand
any items of stock. These two nodes are called trans-shipment nodes.
Sometimes, nodes 3 and 4 缸'e also called trans-shipment points because stock
can be both in and out in these nodes. The costs Cij are unit costs of
transportation, similar to those of Examples 3.1 and 3.2. Note that delivery is
possible in both directions between nodes 2 and 5. The unit costs C25 and C52
may be the same or may be different (in this example, they are different). Nodes
4 and 5 also allow travelling in both directions; C45 and C54 m旬, again , be the
same or different (in this ex缸nple, they are the same). The requirement is to
relocate the stocks at minimum cost.
Solution 3.3 Let xij be the tonnes of stock transported from i to j (i ~ j). The objective
function is:
-
26 Linear Optimization 的 Applications
Minimize P = C 12 XI2 + C23 X23 + C34 X34 + C25 X25 + C52 X52
subject to
+ C53 X53 + C45 X45 + C54 X54 + C46 X46 + C56 X56
10xI2 + 20X23 + 15x34 + 22x25 + 18x52
+ 12x53 + llx45 + llx54 + 13x46 + 16x56
At node 1 : x 12 歪 18 (1)
At node 2 : - x12 - X52 + X23 + x鈞、= 0 ……一一一一 (2)
Atnode3:-X23 - X53 + X34 = -14 一…一一一一 (3)At node 4 : - X34 - X54 + X45 + X46 至 12m…一……一 (4)
At node 5 : - X25 - X45 + X52 + X53 + X54 + X56 = 0 (5)
At node 6 : - X46 - X56 = -16 一一一一一一一一一一 (6)
all xij 主 O
The optimal solution of the above linear programming model can never have X25
and X52 both positive, nor X45 and X54 both positive.
The solution of this model is given below:
Total minimum trans-shipment cost = 768
X I2 = 18
X 23 = 14
X 25 = 4
X 46 = 12
X 56 = 4
other xij = 0
There are two modifications to a trans-shipment problem. The first modification
is the addition of capacity constraints to the nodes. For example, if node 2 can
only process the trans-shipment of a maximum of R2 tonnes of stock, node 3 can
only process R3 tonnes, and node 5 can only process R5 tonnes, then we have
three additional constraints:
-
Formulating Linear Optimization Problems
At node 2, x12 + XS2 三 R2 (7)
At node 3, x23 + X S3 三 R3 ..-“一……………一“一………………一一…叮叮叮曰“一 …… (8)
At node 5, X2S + X4S 三 RS …………一…………………一…………………一… (9)
27
The second modification is the addition of capacity constraints to the routes.
For example, if route 2-3 has only a flow capacity of L23, route 5-2 a flow
capacity of LS2' route 4-6 a flow capacity of L俑, and route 5-4 a flow capacity of
LS4' then we have four additional constraints:
For route 2-3: X23 三 L23
For route 5-2: XS2 三 LS2
For route 4-6: X46 三 L46
For route 5-4: XS4 三 LS4
3.4 Earth Moving Optimization
Example3.4
(1 0)
(1 1)
(12)
(1 3)
A highway contract requires a contractor to alter the terrain of a section of road
work. The work involves cut and fill of earth so that the origina1 profile will be
much flatter. The original profile and the finished profile are shown in solid line
and dotted line respectively in Fig. 3.4.
Section No. 2 3 4 5 6 7 8 9 Cut (m3xl03) 28 32 13
Fill (m3xl03) 10 14 16 10 12 11
Fig. 3.4 Original and finished profiles of cut and fill
-
28 Linear Optimization 的 Applications
The roadway is divided into nine sections. For ex缸nple, 10 x 103 m3 of fill is
required in section 1; 28 x 103 m3 of cut in section 2; and so on. The cost for
cutting including loading is $8 per m3 and that for filling including compaction
is $12 per m3• The unit cost of transporting earth by trucks from one section to
another is $2 per m3 per section.
Our task is to determine how much earth should be moved from where to where
so as to optimize the earth moving operations.
Solution 3.4 Let xij be the quantity of earth in thousand m
3 to be moved from section i to
section j (i *- j).
Therefore, there are 18 (i.e. 3 x 6) decision variables as follows:
Fill section
4 5 6 8 9
2 X 21 X24 X25 X26 X28 X29
Cut Section 3 X 31 X 34 X 35 X36 X 38 X 39
7 X71 X74 X75 X76 X78 X79
Cij can be calculated as follows:
C21 cost per m3 for moving earth from section 2 to section 1
= $8 + $2 X 1 + $12 = $22 •••
Cut Transport Fill
C24 cost per m3 for moving earth from section 2 to section 4
= $8 + $2 X 2 + $12 = $24
••• Cut Transport Fill
Other Cij can be calculated in the same way.
-
Formulating Linear Optimization Problems
Now, we can write the objective function:
Minimize P = I,Cjj X ij = 22x21 + 24x24 + 26x25 + 28x26 + 32x28 + 34x29
+ 24x31 + 22x34 + 24x35 + 26x36 + 30X38 + 32x39
+ 32x71 + 26x74 + 24x75 + 22x76 + 22x78 + 24x79
Constraints:
The constraints for cuts:
X21
+ X24
+ X25
+ X26
+ X28
+ X29
豆 28",,,,,,,,,---,,,,呵呵呵呵 …_.....-一 … ………- (1)
X31 + X34 + X35 + X36 + X38 + X39 至 32 -…ω 一………"………一…-,-" (2)
X71 + X74 + X75 + X76 + x78 + X79 三 13
The constraints for fills:
X21 + X31 + X71 = 10
X24 + X34 + X74 = 14 X25 + X35 + X75 = 16
X26 + X36 + X76 = 10 X28 + X38 + X78 = 12
X29 + X39 + X79 = 11
(3)
(4)
(5)
(6)
(7)
一……一… (8)
(9)
all xij 這 o for i = 2, 3, 7 and j = 1, 4, 5, 6, 8, 9
The solution for this model is given below:
Minimum overal1 earth moving cost = 1,816 X 103
X21 = 10
X 24 = 8
X 28 = 10
X 34 6
X 35 16
X 36 = 10
X78 = 2
X79 = 11
other X jj = 0
29
-
30 Linear Optimi世ation 的 Applications
We can observe that the model formulated for this earth moving problem is
similar to the one for Example 3.1, the transportation problem. In fact, this
example is indeed a transportation problem which can be solved by the simplex
method, or an algorithm which will be discussed in Chapter 4.
3.5 Production Schedule Optimization
Example3.5
A cement manufacturer provides cement for ready-mix concrete companies. In
the next four months its volume of sales, production costs and available worker-
hours are estimated as follows:
Month
2 3 4
Cement required (m3 x 103) 220 300 250 320
Cost of regular time production 2,500 2,600 2,700 2,800 ($ per thousand m3)
Cost of thoovuesratinmd e mp3r) oduction 3,000 3,100 3,200 3,300 ($ per
Regular time worker-hours 2,000 2,000 2,000 2,000
Overtime worker-hours 800 800 800 800
There is no cement in stock initially. It takes 10 hours of production time to
produce one thousand m3 of cement. It costs $150 to store one thousand m3 of
cement from one month to the next.
Now, the cement company wishes to know the optimal production schedule.
Solution 3.5 Let x\ , x2, x3 and x4 be the number of thousand m
3 of cement produced in months
1, 2, 3 and 4 respectively on regul訂 time.
Let y\ , y2' y3 個d Y 4 be the number of thousand m3 of cement produced in months
1, 2, 3 and 4 respectively on overtime.
-
Formulating Linear Optimization Problems 31
Let Zl' Z2 and Z3 be the number of thousand m3 of cement in stock at the end of
months 1, 2 and 3 respectively which have to be carried to the next.
After defining the decision variables, the problem can be presented
diagramatica11y as shown in Fig. 3.5.
220 300 250 320
Fig. 3.5 Cement company production model
The objective function is:
Minimize P = 2500x1 + 2600x2 + 2700x3 + 2800x4
+ 3000Yl + 3100Yl + 3200Y3 + 3300Y4
+ 150z1 + 150z2 + 150z3 subject to
Monthly demand constraints:
弘10nth 1 : x1 + Yl - Zl = 220 、‘,/
',A J'
.‘、、
"
Month 2: x2 + Y2 + Zl - Z2 = 300 心 F 叮叮叮叮叮。"一 …。...“白白 叫 “………… •. (2)
Month 3: x3 + Y3 + Z2 - Z3 = 250 叮 叮叮叮-_....- 叫叫一一_......._.…… 。… (3)
Month 4: x4 + Y4 + Z3 = 320 …一一一一一一一一一一一…… (4)
Monthly regular worker-hours constraints:
10x1 ::; 2000
10x2 三 2000
10x3 三 2000
10x4 三 2000
ω 叮叮叮 (5)
一一一一一一 (6)
"………一一"…"叮叮_..'一 (7)
……………………一……一一… (8)
-
32 L的ear Optimization in Applications
Monthly overtime worker-hour constraints:
10Yl ~三 800
10Y2 三 800
10Y3 ~ 800
10Y4 ~三 800
一一……一一……… (9)
(10)
一一一一…一一一…(1 1)
一一一一一一一一一一一(12)
all X j ~ 0, yj ~三 o and Zj ~三 O
The solution for this model is:
Total production cost = 2,458,500
X1 = 200 Yl = 50 Zl = 30 X2 = 200 Y2 = 80 Z2 = 10 X3 = 200 Y3 = 80 Z3 = 40 X4 = 200 Y4 = 80
3.6 Aggregate Blending Problem
Example3.6
The contract specifications of a building project require that the course
aggregate grading for concrete mixing must be within the following limits:
Sieve size
63.0mm
37.5 mm
20.0mm
10.0mm
5.0mm
Percenta2:e nassin2: bv wei2:ht
100%
95% to 100%
35% to 70%
10% to 40%
0% to 5%
The contractor has four quarry sites to supply aggregates. These aggregates,
however, do not individually satisfy the above specifications requirement. The
aggregate grading from each of qu缸Ty sites is shown below:
-
Formulating Linear Optimization Problems 33
Quarry sites
% by wt. passing each sieve 2 3 4
63.0mm 100% 100% 100% 100%
37.5 mm 90% 95% 100% 100%
20.0mm 50% 的% 80% 100%
10.0 mm 0% 25% 40% 90%
5.0mm 0% 0% 3% 30%
Transportation cost per tonne 12 14 10 11
The contractor needs to prepare 150 tonnes of aggregates for concrete mixing in
the next two days. How should he obtain the aggregates from the quarry sites so
th前 after blending them the aggregates wi11 satisfy the specifications?
Solution 3.6 Let X) , X2, X3 and X4 be the number oftonnes of aggregates supplied from quarry
sites 1, 2, 3 and 4 respectively.
The objective function:
Minimize P 12x) + 14x2 + 10月+ llX4
Constraints:
The constraints for 37.5 mm sieve:
0.95 至 0.90x) 十 0.95x2 + 1.00x3 + 1.00x4 三1.00X 1 + X2 + x3 + X4
This can be written as:
0.05x) - 0.05X3 - 0.05X4 三 O
and 0.10x) + 0.05X2 注。
The constraints for 20.0 mm sieve:
0.35 ~三 0.50x) + 0.65x2 + 0.80X3 + 1.00x4 三 0.70x) + X2 + X3 + X4
This can be written as:
0.15xl + 0.30X2 + 0.45X3 + 0.65x4 ~ 0
(1)
(2)
(3)
-
34 Linear Optimization in Applications
and - 0.20x) - 0.05x2 + 0.10x3 + 0.30x4 ~三 O
The constraints for 10.0 mm sieve:
0.10 ~三 0.00x) + 0.25x2 + 0.40x3 + 0.90x4 三 0.40x) + x2 + x3 + x4
This can be written as:
(4)
- 0.10x) + 0.15x2 + 0.30x3 + 0.80x4 ~ 0 …一一………一一.. (5)
and - 0.40x) - 0.15x2 + 0.50x4 ~ 0 個…一一…一…一 (6)
The constraints for 5.0 mm sieve:
o 三 0.00x) + 0.00x2 + 0.03x3 + 0.30x4 三 0.05x) + x2 + x3 + x4
This can be written as:
0.03x3 + 0.30x4 ~ 0 “………… (7)
and - 0.05x) - 0.05x2
- 0.02x3
+ 0.25x4 ~三 。 …呵呵呵呵呵 …叮叮叮叮叮叮… (8)
The constraints for demand:
x) + x2
+ x3
+ x4 = 150 .“白白白呵呵,“… 一 叮 叮叮叮叮叮個 …………一一一 (9)
Also, X) , x2,莉, x4 ~ 0
The solution for this model is given below:
Total minimum costs 1,690.16
x) = 65.26 tonnes
x2 = 10.04 tonnes
x3 = 55.22 tonnes
x4 19.48 tonnes
3.7 Liquid Blending Problem
In Example 3.6, we have seen a problem involving aggregate blending. For
blending liquids, the linear programming model can be formulated, in most
cases, in the very same way. However, we will now see an example of
-
Formulating Linear Optimization Problems 35
optimizing liquid blending problern in which the requirernents are specified in a
slightly different way.
Example3.7
A paint manufacturing company produces three enamels types 1, 11 and 111 by
mixing acrylic polyrners in three different forrnulations , types A, B and C.
Type A polyrner contains 55% solids and 45% solvent, type B polymer 45%
solids and 55% solvent, type C polyrner 35% solids and 65% solvent. Polymers
A, B and C cost $6 per litre, $7.5 per litre and $9 per litre respectively.
Type 1 enamel must contain at least 30% solids and at least 50% solvent, type 11
enamel at least 40% solids but no more than 60% solvent, type 111 enarnel not
more than 60% solids and not more than 70% solvent.
The p也nt manufacturing company has got a rush order for 800 litres of type 1
enamel, 950 litres of type 11 enamel and 650 litres of type 111 enamel. How
many litres of each polyrner should the company purchase for producing the
required enarnels?
Solution 3.7 The problem can be presented diagramatica11y as shown in Fig. 3.7.
800 950 650
Fig.3.7 A liquid blending problem
-
36 L的ear Optimization in Applications
The objective function:
Minimize P = 6(xA1 + XA2 + XA3) + 7.5(xB1 + XB2 + XB3)
+ 9(xc1 + XC2 + XC3)
Constraints:
The constraint for enamel 1 solids:
0.55xA1 + 0.45xB1 + 0.35xc1 ~ 0.30 XA1 + XB1 + XC1
i.e. 0.25xA1 + 0.15xB1 + 0.05xc1 ~。 一切一一一一一一…一一一一一…--- (1)
The constraint for enamel 1 solvent:
0.45xA1 + 0.55xB1 + 0.65xcl 主 0.50XA1 + XB1 + XC1
i.e. -0.05xA1 + 0.05xB1 + 0.1 5xc1 去。
The constraint for enamel 11 solids:
0.55xA2 + 0.45XB2 + 0.35xc~ ~ 0.40 XA2 + XB2 + XC2
(2)
i.e. 0.15xA2 + 0.05XB2 - 0.05xC2 ~ 0 …………………一一…… (3)
The constraint for enamel 11 solvent:
0.45XA2 + 0.55xB2 + 0.65xcL 三 0.60XA2 + XB2 + XC2
i.e. -0.15xA2 - 0.05XB2 + 0.05xC2 至 O
The constraint for enamel 111 solids:
0.55xA3 + 0.45xB3 + 0.35xc1 三 0.60XA3 + XB3 + XC3
(4)
i.e. -0.05XA3 - 0.15xB3 - 0.25xC3 三。 一一“一一一 一一 (5)
-
Formulating Linear Optimization Problems
The constraint for enamel III solvent:
0 .45XA3 + 0.55xB3 + 0.65xc ::; 0.70 XA3 + XB3 + XC3
i.e. -0.25xA3 - 0.15xB3 - 0.05xC3 ::; 0
The constraints for quantities of enamels:
(6)
XA1 + XB1 + XC1 = 800 ………..._..“一……"… (7)
XA2 + XB2 + xC2 = 950 。……………。"……_..-... (8) XA3 + XB3 + XC3 = 650 叮叮叮叮一一…何 呵呵… …….... (9)
and all xij 主 o where i = A, B, C
and j = 1, 2, 3
The solution for this model is:
Total minimum purchasing costs 15,000
XA1 = 600
XA2 = 950 XA3 = 650
XB1 0 XCI 200
XB2 = 0 XC2 = 0
XB3 = 0 XC3 = 0
3.8 Wastewater Treatment Optimization
Example3.8
37
An industrial company has three factories located along three streams as shown
in Fig. 3.8.
Q1
Fig. 3.8 An industrial wastewater treatment problem
Factory A generates a daily average of 1000 m3 industrial wastewater of 800
mgllitre of BOD5 (biological oxygen demand 剖 5 days, a measure of degree of
-
38 Linear Optimization in Applications
pollution), factory B 1500 m3 of wastewater of 600 mgllitre of BO叭, and
factory C 1800 m3 of wastewater of 1000 mgnitre of BOD5• Before the
wastewater is discharged into the stre缸肘, the industria1 company has to build
in-house treatment plants at each of the factories so as to remove the pollutants
to a level which is acceptable at the downstream waters.
The costs for treating 1 kg of BOD5 at factory A is $100, factory B $110 and
factory C $120. The rates of flow per day in the streams are QI' Q2 and Q3
which are 0.2 million m3, 0.22 million m3 and 0.25 million m3 respectively. The
flows in the streams are assumed to have no pollutants unless they 訂e
contaminated by the discharges from the factories.
The river requirement is that no water in any p訂t of the streams will exceed an
average standard of 2 mgnitre of BOD5• It can a1so be assumed that 20% of the
pollutants discharged at factory A will be removed by natural processes (e.g.
sunshine, oxidation etc.) before they reach factory B, and that 15% of the
pOllutants be removed by natural processes between factory B and factory C.
The company wishes to know the optima1 treatment capacities of the in-house
treatment plants at the three factories.
Solution 3.8 Let x1 = kg of BOD5 to be removed daily at factory A
x2 = kg of BOD5 to be removed daily at factory B x3 = kg of BOD5 to be removed daily at factory C
The objective function is:
Minimize P = 100x1 + 110x2 + 120月
subject to the following constraints:
The constraint for factory A:
Daily BOD5 generated by factory A = 800 mglL x 1000 m3
= 800 kg
-
Formulating Linear Optimization Problems
.'. Daily BODs released into stream = 800 - X 1
River standard = 2 mglL and Q2 = 0.22 mi l1ion m3
:.Allowable pollutants in stream 2 after passing factory A = 440 kg
Hence, 800 - X 1 三 440
and Xl 三 800
The constraint for factory B:
Daily BODs generated by factory B = 600 mg/L X 1500 m3
= 900 kg
'. Daily BODs released into stream = 900 - X2
River standard = 2 mg/L and Ql + Q2 = 0.42 million m3
(1)
(2)
:.Allowable pollutants in stream 1 after passing factory B 840 kg
20% of pollutants are removed by natural processes
Hence, 0.8(800 - Xl) + (900 - X2) 主 840
and X2 至 900
The constraint for factory C:
Daily BODs generated by factory C = 1000 mg/L X 1800 m3
= 1800 kg
:. Daily BODs released into stream = 1800 - X3
River standard = 2 mg/L and Ql + Q2 + Q2 = 0.67 million m3
(3)
(4)
.'. Allowable pollutants in stream 1 after passing factory C 1340 kg
15% of pollutants are removed by natural processes
Hence,
0.85[0.8(800 - Xl) + (900 - X2)] + (1 800 - X3) 至 1340 一…… (5)
and X3 至 1800 一一一 (6)
Other constraints:
Xl 三 0 , X2 2三 0, x3 ~ 0
The solution for this model is:
Total minimum treatment costs = 222,200
39
-
40
x) = 360 x2 = 412
x3 = 1174
Linear Optimization in Applications
3.9 Critical Path of a Precedence Network
A precedence network is usually refe叮ed to as an activity-on-node network, that
is, an activity is denoted by a node in a network diagram which shows the
sequence of the activities in a logica1 manner. There are of course methods
other than linear programming for tracing a critica1 path in a network. The
following example, however, shows how linear programming can do such a job.
Example3.9
Fig. 3.9 An activity-on-node network
The durations of the activities of a project are shown in the network diagram in
Fig. 3.9 and are as follows:
Activity Acti vity duratio且~豆豆ks}
10 5
20 4
30 3
40 6
50 2
60 9
70 3
-
Formulating Linear Optimization Problems 41
Find the shortest project duration (critical path) by the use of linear
programmmg.
Solution 3.9 Let x lO = start time of activity 10
X20 = start time of activity 20
X 70 start time of activity 70
X END = project duration
The objective is to:
Minimize P = X END
subject to
X 30 - X)。這 5
X40 - X20 ~ 4
X SO - X2。這 4
Xω - X 30 ~ 3
Xω- X40 ::三 6
X70 - Xs。這 2
X END - Xω~ 9
X END - X 70 ~ 3
一“…(1)
一.. (2)
(3)
........... (4)
m …一一一………........- (5)
(6)
(7)
一“ (8)
All Xj 這 o for i = 10, 20, 30, 40, 50, 60, 70, END
The solution for this model is:
Shortest project duration = minimum X END = 19 weeks X lO = 2
X20 = 0
X 30 = 7
X40 4
XSO 14
Xω= 10
X70 = 16
X END = 19
-
42 Linear Optimization 的 Applications
Readers can a1ways check whether the project duration is 19 weeks or not using
the critical path method.
3.10 Time-Cost Optimization of a project Network
In Example 3.9, we have seen how the critical path or the shortest duration in
a project network can be found using the linear programming method. Now,
we shall see how the time-cost optimization can be done if the normal duration
& cost and the crash duration & cost of each activity in the network are given.
Example 3.10
The normat duration and cost and those of the crash for the activities of the
network in the previous example (Fig. 3.9) are as follows:
Normal Crash Activity Duration (R) Cost (U) Duration (Q) Cost (V)
10 5 weeks $100 4 weeks $120
20 4 150 3 170
30 3 150 3 150
40 6 300 4 400
50 2 200 2 200
60 9 550 5 990
70 3 100 2 150
The indirect cost (overheads and so on) of the project is $60 per week. How
should the activities be compressed so that an optimal project duration can be
achieved with the minimum total direct and indirect costs of the project?
Solution 3. 10 Before formulating the linear programming model, some preliminary theories of
the normal point and the crash point of an activity must be discussed.
-
Formulating Unear Optimization Problems
Activity cost
Crash v l-----------------
M
U 一
Q
Normal
Activity duration
43
When additional resources (hence additional cost) is used to carry out an
activity, it wi1l usually be completed faster than its normal duration. The crash
point is reached when the duration of the activity cannot be further shortened
even if extra resources are input. We denote the normal duration and crash
duration by R and Q respectively, and normal cost and crash cost by U and V
respectively.
The cost slope of an activity between normal and crash = C = 芷主1lR-Q
Now, we can calculate C of each activity:
Activity C= 主主Jl
R-Q
10 20
20 20
30
40 50
50
60 110
70 50
An activity can be compressed to any duration between R and Q. We assume
that D is the activity duration after compressing (R 三 D 三 Q) such that the time
and cost of the overall project is optimized. M is the corresponding cost
associated with D.
-
44 Linear Optimization 的 Applications
By similar triangles, we can easily derive that
D = R -已 (M - U)
Therefore, for each activity:
DIo=5-L(Mlo-lO0) lU 20 ,_._/U
D20=4.L (M20.150) 山 2。“
D30 = 3
D的 =6--L(M的- 300) 制 50 叫
D50 = 2
D印 =9. 」-(Mω- 550) 110 山
D7OU-4(M7。 "100)50 '~-'V
Using the formulation discussed in Example 3.9, the activity duration
constramts are:
X30 - X\O ;;::: D \O (Remember that Xj is the
X40 - X2。這 D20 start time of activity i)
X50 - X50 ;;::: D20
Xω - X3。這 D30
Xω - X4。這 D40
X70 - X50 三 D50
XEND - Xω;;:::Dω
XEND - X70 ;;::: D70
These can be written as:
30 - ^l。這 5 -土 (M\O - 100) ……一一…一…一一一 (1) 20
的- ^2。這 4-4(Mo-150) 一一一一一一一一一…一一 (2) 20 ' ~
-
Formulating Linear Optimization Problems 45
。- ^2。三 4- 一 (M20 - 150) 一 (3)20
Xω- x3。三 3 一個 (4)
ω- 的這 6-4(Mω- 300) 一………一…………--一…… (5)50
X70 - x50 ~ 2 …… …一………叮叮叮叮一 ~....-“一一… (6)
xm-MM--L(Mω- 550) 110ω
(7)
7OM-L (M70-lO0) “ ……呵呵… …_._._.-.-......-… (8) 50
The second set of constraints is the minimum cost (or normal cost) constraints:
MJO ~ 100 “ (9)
M2。這 150 (10)
M30 ~ 150 (1 1)
M4Q ~ 300 ……白白白曰“……一… (12)
扎150 ~ 200 . (13)
Mω~550 • (14)
扎170 ~ 100 _.....一………………………(15)
The third set of constraints is the maximum cost (or crash cost) constraints:
MJO 三 120 .. (1 6)
M20 ~ 170 (17)
弘130 三三 150 (1 8)
M4Q至 400 “一…(19)
M50 至 200 (20)
Mω 三三 990 - (21)
M70 三三 150 (22)
-
46 Linear Optimization 的 Applications
Other constraints are:
M j ~三 o for i = 1, 2, .. ..., 7
and Xj ~三 o fori=I , 2,....., 7, END
The objective function is:
Minimize P = M \O + M20 + M30 + M40 + Mso + Mω+ M70 + 60XEND
The solution for this model is:
Total minimum project cost = 2,640
X\O = 0 M \O = 100
X20 0 M20 = 170
X30 = 5 M30 = 150
X40 = 3 M40 = 350
XSO = 3 Mso = 200
Xω= 8 Mω= 550
X70 = 14 弘170 = 100
X END = 17
Project duration = 17 weeks
We can observe that only M20 and M40 in the result are different from their
norma1 cost U20 and U40 respectively. By comparing M20 and U20, we can know
that activity 20 is shortened by 1 week. Similarly, we can know that activity 40
is also shortened by 1 week. The normal (origina1) project duration is 19 weeks
(see Example 3.9) and the optima1 project duration is found to be 17 weeks,
because the two activities (20 and 40) are each shortened by 1 week.
-
Formulating Linear Optimization Problems 47
Exercise
1. Formulate the following trans-shipment problem as a linear programming model.
+12 Q) þ 0 Þ ø -4
x xJ; @-6 +10 G)' ;@' ;0) -8
The unit cost from route to route are as follows:
hZL 3 4 5 6 7 33 45
2 39 28 . .
3 . 13 16 20 4 . 19 18 11
2. A manufacturing process involves 4 stages 1, 11, 111 and IV by inputting two
different raw materials A and B. There are four final products 1, 2, 3 and 4
coming out from the processes as shown in the following diagram:
-
48 Linear Optimization 的 Applications
Raw Material A Raw Material B
250 m3 and 200 m3 of raw materials A and B respectively are available per
week. Raw material A costs $2.6 x 103 per m3 and raw material B $3.2 x 103
perm3
Plant 1 has a capacity of 400 m3 per week. In plant 1, processing costs for
process 1 and process II respectively are $2.5 per m3 and $5.0 per m3.
Plant 2 has a capacity of 200 m3 per week. In plant 2, processing costs for each
final product and the yields associated with the processes are:
Finalorodl Process III Process IV FP 2 0.6 ' FP 3 0.3 0.5 FP4 . 0.4 Loss 0.1 0.1
Processing cost/m3 $2.5/m3 $10.5/m3
The company has to supply in the next week a minimum of 50 m3 of final
product 1, a minimum of 25 m3 of final product 2, a minimum of 60 m3 of final
product 3, and a minimum of 40 m3 of final product 4 to its customers. If the
-
Formulatíng Unear Optímízatíon Problems 49
production of final product 3 is in excess, it will cost the company to store it at
$250 per m3• The selling price of the final products 訂e:
Final Product FP 1 FP2 FP3 FP4
Formulate a linear programming model for the problem so that the financial
return of the company is maximized.
-
In Example 3.1 of Chapter 3, we have seen what a typical transpo付ation
problem is. Examples 3.3, 3.4 and 3.5 are also transportation problems
although they are less obvious than example 3.1. Transportation problems can
be solved, of course, by the simplex method. However, there is an algorithm
which can also solve transp。吋ation problems without using the techniques of
the simplex method. In this chapter, we will discuss the techniques of this new
algorithm and will see how to use it to solve Examples 3.1 , 3.3, 3.4 and 3.5.
4.1 The General Form of a Transp。前ation Problem
Before discussing the general form of a transportation problem, we shall look at
the particular form again which has been illustrated in Example 3. 1. This
ex缸nple is now reproduced below for easy reference. Its transportation
tableau is as follows:
Customer 2 Supply
之j !QJ X l1 X12 12
~ 斗W缸e- 2 X21 X22 20
house 主j 叫
3 X31 X32 30
Demand 29 33
The warehouses 1, 2 and 3 supply 12, 20 and 30 tonnes of stock per week
respectively to customers 1 and 2 who demand 29 and 33 tonnes of stock per
week respectively. The cost of transporting one tonne of stock from warehouse
-
52 Linear Optimization in Applications
i to customer j is given in the small box at the left top corner of the decision
variable Xij. As already explained in Example 1.3, the linear programming
model for this typical transportation problem is:
Minimize P 9Xll + 10x12 + 6X21 + 7X22 + 8X31 + 11x32
subject to
Xll + X12 三 12
X21 + X22 三 20
X31 + X32 三 30);(1;ts
Xll + X21 + X31 = 29
X12 + X22 + X32 = 33
all xij 三 o for i = 1, 2, 3 and j = 1, 2
The above is a particular case of transportation problems. We can generalize it
and a general transportation tableau is shown in Fig. 4.1 below.
Demand stations
2 n Supply
叫 心| 心lXll X12 Xln SI
臼 83 區|Supply 2 X21 X22 X2n S2
statlOns
巨型| 凶 凶m Xml Xm2 Xmn Sm
Demand D1 D2 Dn
Fig. 4.1 A general transportation tableau
We can see that there are m supply stations and n demand stations. Cij is the
unit cost of transportation from supply station i to demand station j. Si is the
quantity available at supply station i and Dj is the quantity required at demand
-
Transportation Problem and Algorithm 53
station j. C ij , Si and Dj are given quantities in the problem. The decision
variables Xij are the ones which we want to find out by solving the problem. The
linear programming model can be formulated as:
Minimize P= C))X)) + C 12X12 + . .... ... + CijXij + . ........ + CmnXmn
口
z ECA (in a more compact form)
subject to
XII + X I2 + ……一一 + Xln 三 SI …一一……一………(1)
X21 + X22 + _...._._--… 一 + X2n 三 S2 一 白白白白_..... “……… (2) I m supply
I constraints Xml + Xm2 +…一…叮叮叮 + Xmn ~三 Sm
Xll + X21 + 叮叮叮一…… + Xml Dl …(m+l)
X I2 + X22 +…一一… + Xm2 = D 2 (m~2) I叫nd
I constraints Xl n + X2n +一一一一一 + Xmn = Dn (m+n)
and all Xij ~三 O for i = 1, 2, ....., m and j = 1, 2, ....., n
4.2 The Algorithm
As mentioned before, there is an algorithm other than the simplex method to
solve transportation problems. The algorithm is usually referred to as
transportation algorithm. It will be described in this section using examples.
Example4.1
Use the transportation algorithm to solve the transportation problem in Example
3. 1.
-
54 Línear Optimization in Applications
Solution 4. 1
There are four steps in the a1gorithm.
品且i
Draw the transportation tableau as shown in Fig. 4.2.
Customer 2 Supply
之| 叫12
~ l工JW訂e- 2 20
house
3 主J i山
30
Demand 29 33 62 正ω~alt
Fig. 4.2 Transportation tableau for Example 4.1
It should be observed that in this example, the tota1 supply (12 + 20 + 30 = 62) is equal to the total demand (29 + 33 = 62). This will make our problem simpler.
Cases where total supply is not equa1 to total demand will be discussed later.
We must firstly find an initia1 feasible a11ocation. It is reasonable to start by
allocating as many tonnes of stock as possible to the route i-j with the lowest C吵
and in our ex剖nple, this is route 2-1 (C21 = 6). The maximum quantity that can
be allocated to this route is 20, because warehouse 2 can supply only 20 tonnes.
This is followed by the a110cation of the remaining demand to customer 1, who
will demand a further 9 tonnes, making a tot叫 of 29 tonnes. The most
inexpensive route to do so is through route 3-1 (C31 = 8).
After allocating 9 tonnes to route 3-1 , the items of stock remained in warehouse
3 wi1l be reduced to 21 (i.e. 30-9). Then, a110cate 21 tonnes to route 3-2 so a11
30 tonnes of stock in warehouse 3 will be used up. Then, allocate 12 tonnes to
-
Transportation Problem and A旬orithm 55
route 1-2 so that the to叫 demand of customer 2 can be satisfied. Note that the
supply of warehouse 1 is also automatically satisfied because in this problem
total supply is equal to total demand.
Now, we have finished the initial allocation and this initial feasible solution is
shown in the transportation tableau in Fig. 4.3.
Customer 2 Supply
主j |且l12 12
~ 工jW訂'e- 2 20 20
house
主J 叫3 9 21 30
Demand 29 33 62 (total)
Fig. 4.3 Initial feasible solution
The total transportation costs for this initial feasible solution is
20 x 6 + 9 x 8 + 12 x 10 + 21 x 11
= 543
這起且2
Next, we have to see if this total costs can be further reduced by using the
unused routes. So we examine the unused routes (1-1 and 2-2 in our example)
one by one.
For route 1-1: if one tonne is allocated to route 1-1 , then one tonne must be
subtracted from route 3-1 , one tonne added to route 3-2 and one tonne subtracted
from route 1-2 in order to maintain the supply and demand to be satisfied (see
Fig.4.4).
-
56 Linear Optimization 的 Applications
Customer 2 Supply
主j |凶12 - 1 +1 12 ~ |工J
W訂e- 2 20 20 house
主j 門3 9 - 1 30
Demand 29 33 62 (tota1)
Fig.4.4 Testing route 1-1
The change in cost when 1 tonne of stock is a110cated to route 1-1
= C11 - C31 + C32 - CI2
= 9 - 8 + 11 - 10
= +2 (a positive cost change)
We usua11y call such cost change (+2 in this case) the improvement index of
the unused route 1-1. A positive improvement index means that the use of route
1-1 will increase the transportation cost rather than reducing it. Therefore, we
reject using route 1-1.
For route 2-2 : if one tonne is a110cated to route 2-1 , then one tonne must be
subtracted from route 2-1 , one tonne added to route 3-1 and one tonne subtracted
from route 3-2. Fig. 4.5 shows this modification.
-
Transportation Problem and Algorithm
Customer 2
主j I!QJ 12
~ 斗W訂e- 2 20 - 1 +1
house 主j 叫 21 - 1 3 9+1
Demand 29 33
Fig. 4.5 T esting route 2-2
The improvement index of the unused route 2-2
= C22 - C21 + C31 - C32
= 7-6+8-11
= -2 (a negative cost change)
57
Supply
12
20
30
62 (total)
A negative improvement index indicates that a reduction in transportation cost is
possible by using the unused route 2-2.
S且主
Now, we try to utilize route 2-2 and use it as fully as possible. Let x be the
maximum number of tonnes of stock th剖 route 2-2 c組 be allocated (see Fig.
4.6).
-
58 Linear Optimization in Applications
Customer 2 Supply
之j 些l12 12
~ l斗W訂'e- 2 20 - x +x 20
house
主l i叫3 9+x 21 - x 30
Demand 29 33 62 (tota1)
Fig. 4.6 Allocating x to route 2-2
By inspection, the maximum x is 20 since route 2-1 cannot tak:e a negative va1ue
if x is large than 20. So we allocate 20 tonnes of stock to route 2-2. The new
(or second) feasible solution is shown in Fig. 4.7.
Customer 2 Supply
1.J 11旦l12 12
~ |斗W訂e- 2 20 20
house 主j |叫
3 29 30
Demand 29 33 62 (tota1)
Fig.4.7 Second feasible solution
The tota1 transportation costs for this second feasible solution is
29 x 8 + 12 x 10 + 20 x 7 + 1 x 11
503
-
Transportation Problem and A旬orithm 59
We can see that 503 now is lower than 543 which is calculated from the initial
feasible solution.
品且.4
We now repeat step 2 to see if the unused routes 1-1 or 2-1 have negative
improvement index.
Improvement index of route 1-1
= C l1 - C31 + C32 - C12
= 9 - 8 + 11 - 10
= +2
Improvement index of route 1-2
= C21 - C31 + C32 - C22
= 6-8+11-7
= +2
There is no negative improvement index. Therefore, the second feasible
solution is the optima1 solution with total transportation costs equal to 503.
Readers should now comp缸'e this result with that of Example 3.1 in Chapter 3.
4.3 A Further Example
In Example 4.1 , the total supply of the three warehouses is equal to the total
demand of the two customers. We sha11 now see an example with different total
supply and total demand.
Example4.2
Redo Example 4.1 if the supply of stock in warehouses 1, 2 and 3 per week are
15 , 35 and 32 tonnes respectively while the weekly demands of the customers
remain unchanged.
-
60
Solution 4.2
品且i
Linear Optimization 的 Applications
Since the total supply is greater than the tota1 demand, we introduce a dummy
customer, customer 3, and so a new column (column 3) is added to the
transportation tableau. The C3 in the column is equa1 to zero. This is shown in
Fig.4.8.
Customer 2 3 Supply
(dummv) 主j i立l 主j
15
豆」 l工j IJlJ W缸e- 2 35
house 主j |叫 IJLJ
3 32
Demand 29 33 20 82 (tot~n
Fig.4.8 Transportation tableau with dummy customer
We can observe that the demand of customer 3 (the dummy customer) is 20
tonnes, so that the total demand is made equa1 to the tota1 supply.
品且.2
Next, we use the same method as described in step 1 of the solution of Example
4.1 to obtain an initial feasible solution. In this case, the first a11ocation is to use
route 3-3 and put 20 tonnes in this route. Then the remaining procedures are the
same. The initial allocation is shown Fig. 4.9 below.
-
Transportation Problem and Algorithm 61
Customer 2 3 Supply
(dummv)
之j 凶 J?J 15 15
~ |工j 4 W缸'e- 2 17 18 35
house 主j 叫 IJLJ
3 12 20 32
Demand 29 33 20 82 (total)
Fig.4.9 Initial feasible solution
The unused routes are 1-1 , 1-3, 2-3 and 3-2. So we have to find the
improvement index of these routes.
Improvement index of route 1-1
= Cll - C21 + C22 - C12
= 9-6+7-10
= 0
For finding the improvement index of route 1-3, the method is a little more
complicated. The loop for it is not rectangular but irregul缸, as shown in Fig.
4.10.
-
62 Linear Optimization in Applications
Customer 2 3 Supply
(dummv) 之j |到15 - 1 IJ?J +1 15 ~ 叫“! |且|
W旺e- 2 35 house
主j UJ 主JI3 12 + 20 - 1 32
Demand 29 33 20 82 (total)
Fig. 4.10 The loop for calculating improvement index of route 1-3
The reason for using such a strange loop is that for finding the improvement
index of a particular unused route, no other unused routes should be involved.
Readers should have observed this point in the previous examples of calculating
improvement indices.
Now, the improvement index ofroute 1-3 can be calculated by:
C 13 - C 12 + C22 - C21 + C31 - C33
= 0 - 10 + 7 - 6 + 8 - 0
The calculations of improvement indices of routes 2-3 and 3-2 are rather simple,
and are shown as follows:
Improvement index of route 2-3
C23 - C21 + C31 - C33
= 0-6+8-0
+2
-
Transportation Problem and A旬orithm
Improvement index of route 3-2
C32 - C22 + C21 - C31
11-7+6-8
= +2
品且主
63
Now, we know that the improvement indices of unused routes 1-1 , 1-3, 2-3 and
3-2 征e 0, -1 , +2 and +2 respectively. We should use the unused route with the
most negative improvement index, and in our case it is route 1-3. So, we use
route 1-3 as fully as possible. Let x be the maximum number of tonnes of stock
that route 1-3 can be allocated (see Fig. 4.11).
Customer 2 3 Supply
(dummv) 主j l凶15 - x IJU +x 15 ~ 同時 +x IJU W缸e- 2 17 - x 35
house 主j 叫 JLJ
3 12 + x 32
Demand 29 33 20 82 (total)
Fig. 4.11 Allocating x to route 1-3
The maximum x is 15. So we allocate 15 tonnes of stock to route 1-3. The
second feasible solution is shown in Fig. 4.12.
-
64 L的ear Optimization 的 Applications
Customer 2 3 Supply
的ummv)
主j l到 IJU 15 15
~ |工j IJlJ W缸e- 2 2 33 35
house 主j 叫 主l
3 27 5 32
Demand 29 33 20 82 (tota1)
Fig. 4.12 Second feasible solution
In the second feasible solution (Fig. 4.12), the unused routes are routes 1-1 , 1-2,
2-3 and 3-2. The improvement indices of these unused routes are ca1culated as
follows.
.
.且
•••
A hh3 1l mC VA EEA.
。
而‘J
ph
••
4‘J
mC AU n+ eEL--鬥U
句3
眩
C
副
Vl :l WAc h
= 9-8+0-0
= +1
Improvement index of route 1-2
= C I2 - C22 + C21 - C31 + C33 - C13 = 10 - 7 + 6 - 8 + 0 - 0
+1
Improvement index of route 2-3
C23 - C21 - + C31 - C33
= 0-6+8-0
= +2
-
Transportation Problem and A旬orithm 65
句ru
司、d
e &E ••••
且
,圖,句、
d
mC TA "﹒?且,
OI F‘ ..
而F缸
白
C
M+8 Mn6 時
C+
臼
-7
V2. 。缸,
i
勻,
FCl+ h==
Since a11 the improvement indices are positive, there cannot be further
improvement. Therefore we stop here and conc1ude that the second feasible
solution is the optima1 solution. Curious readers may use the simplex method to
check the solution.
We should have observed that there are usua11y m+n-l used routes in a feasible
solution. If fewer routes are used and the supply and demand conditions are
satisfied, we ca11 such a case degeneracy. When a non-optima1 degenerate
feasible solution occurs, we have to add a zero a11ocation to a route and treat it
as a used route such that the total number of used routes is equa1 to m+n-l in
order that the algorithm can be continued.
4.4 More Applications of Transp。吋ation Algorithm
In Sections 4.2 個d 4.3, we have seen how to use the transportation algorithm to
solve a typica1 transportation problem. However, some linear programming
problems which are less obvious compared with these two examples can also be
solved by the a1gorithm. They are problems in Examples 3.3, 3.4 and 3.5 of
Chapter 3.
4.4.1 Trans-shipment Problem
Firstly, let us see Example 3.3 of Chapter 3. It is a trans-shipment problem. The
problem is reproduced below for easy reference.
-
66
C25 (22)
C52 (1 8)
Linear Optimization 的 Applications
We can construct a transportation tableau for this problem. In the tableau, non-
feasible routes (such as 2-1 or 4-3) are excluded by assigning Cij as a big-M unit
cost. Routes from a node to the same node are assigned zero Cij where i = j. Fig.4.13 shows the required transportation tableau for this trans-shipment
problem (the problem without modification, see Solution 3.3).
s、u、4ur》cesetfn\atlOns 2 3 4 5 6 Supply
.!.Ql 凶 凶 凶 坐i18
2 ~ 凶 坐l 凶 坐l
B
3 坐l U 盟 凹 凶
B - 14
但l 些l ~ w 凶4 B + 12
5 自i 主l 且l 主l 間
B
4B + 16 Demand B B B B 16 (total)
Fig. 4.13 Transpo吋ation tableau for trans-shipment problem (Example 3.3)
In this problem, only node 1 is strictly a source and node 6 strictly a destination.
A l1 other nodes have arrows both in and out so that they can be both sources and
destinations and are trans-shipment nodes. Node 1 has a supply of 18 and node
6 has a demand of 16 since they are strict1y source and destination. A buffer
-
Transportation Problem and Algorithm 67
stock (i.e. B) that is sufficiently large for feasible moves must be introduced at
the trans-shipment nodes. In this problem, the buffer stock B is equal to 30
because the total tonnes to be moved is 30 and is big enough for its purpose.
For demands, all the nodes except node 6 (a strict demand node) have been
given demands of B items (or 30 tonnes). But for supplies, they are a little
more complicated. Those nodes with no net increase or decrease in stock (nodes
2 and 5) have demand equal to supply, are assigned value B. However, node 3,
which has a net demand of 14, has been given a supply of B - 14 (or 30 -14 = 16) tonnes. Node 4, which has a net supply of 12 tonnes , has been given a
figure of B + 12 (or 30 + 12 = 42) tonnes.
Readers may use the transportation algorithm to solve this trans-shipment
problem. The optimal solution is shown in Fig. 4.14.
、s\ouEmheestSmiat、:ions 2 3 4 5 6 Supply
且 凶 坐l 且l 也l18 18
心j @Ql 且l 且l 坐l2 12 14 4 30
也l U 世l 叫 凶3 16 16
且i 叫 U llJJ u1 4 30 12 42
區l 且l lu1 企」 l1Æ 5 26 4 30
136 Demand 30 30 30 30 16 (total)
Fig. 4.14 Optimal solution for Example 3.3
Readers may comp缸e this solution with the one given in Chapter 3 (Solution
3.3).
-
68 Linear Optimization in Applications
4.4.2 Earth Moving Problem
Now, let us look at Example 3.4 of Chapter 3. It is an earth moving
optimization problem. In fact, it is very similar to a typica1 transportation
problem. Its transportation tableau is shown in Fig. 4.15.
Fill Section
4 5 6 8 9 Supply
隍l 且l 起l ~ 隍l 自主l2 28
Cut μl 平l 起l 且l 凶i 且l3 32
sechon
平l 且l 但l 區l 每l 且l7 13
73 Demand 10 14 16 10 12 11 (total)
Fig. 4.15 Transportation tableau for earth moving problem (Example 3.4)
Readers may try solving this problem using the transportation a1gorithm and
comp征e the resu1t with that of Solution 3.4 in Chapter 3. The optimal solution
is shown in Fig. 4.16.
Fill Section
4 5 6 8 9 Supply
~ @1J 且i 凶 22l 10 主l2 28
Cut 起l 凶 起l 起l ßllJ 且i3 6 16 10 32
sectIon 陣l 起l 起l 陸l 問2 問117 13
73 Demand 10 14 16 10 12 11 (total)
Fig. 4.16 Optimal solution for Example 3.4
-
Transportation Problem and A旬orithm 69
4.4.3 Production Schedule Problem
Example 3.5 of Chapter 3 is a production schedule problem. Apparently it is
hard to do