LINEAR OPTIMIZATION IN ApPLICATIONS
LINEAR OPTIMIZATION IN ApPLICATIONS S.L.TANG
香港付出版社
HONG KONG UNIVERSITY PRESS ...
124 downloads
1576 Views
3MB Size
Report
This content was uploaded by our users and we assume good faith they have the permission to share this book. If you own the copyright to this book and it is wrongfully on our website, we offer a simple DMCA procedure to remove your content from our site. Start by pressing the button below!
Report copyright / DMCA form
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's iion 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 Iransport al ion 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
『I
55791
司/呵/吋
/OOOOOOOOAYAVJAYAVJ
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 Chapter 6 : Integer Programming Solution 6.1 An example of integer linear programming solutioning 6.2 Solutioning for models with zero-one variables
105
Chapter 7 : Goal Programming Formulation 7. 1 Li near programming versus goal programming 7.2 Multiple goal problems 7.3 Additivity of deviation variables 7 .4 Integer goal programming
117
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
AppendixA Appendix B Appendix C
145 153
Appendix D
Examples on Simplex Method Examples on Revised Simplex Method Use of Slack Variables, Artifical Variables and Big-M Examples of Special Cases
105 112
117 120 122 127
137 140
161 162
PREFACE Thi s b∞k
is 001 wriUen 10 di sε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 mctho d. thcre forc , 3re includcd as 叩 pcndiccs
啊l C
only in thc book
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 .K lcnsions including intcgcr programming and goal
programming. Th e examplcs 3rc uscd 10 explain how lincar optimi甜tion can be app1i ed in cnginceri ng and
bus in閏s/managcm c nl
cxamplc 3re clear and
間 sy
problems. Thc stcps shown in cach
w可orkcd
10 rcad
Thc book is likcly 10 be uscd by tcachers. taught course students
and 悶 sea rch
l t 惱,
howevcr, not
studcnts orboth engincering :md businesslmanagcment disciplincs.
suitablc for studcnlS or purc rnalhcmalics becausεthc conlentS or Ihe book cmphasizc 叩抖 ications
ralher than theories
INTRODUCTION 1 .1
Form u lation of a Li near Programming Problem Li near 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
t∞1 ,
it is a malhematical
it is best
explained using a prac!ical example Examp le 1.1
A pipe manufacluring company produces tWQ types of pipes , type The storage space, raw material
requirement 胡 d
I 叩d
Iype n
production rale are given as
below: 工站直且
(&固 paoy Ay晶ilallili!)!
4 kglpipe
8∞ kglday
Production rate
30 pipesthour
20 pipeslhour
8 hourslday si-oco tctnu
也
du
1 耐心
number of Iype I pipes produced each day
阱呵
=
川 1
100al profit
的月 AMh
叫
心
世
=
sw
問廿
s
何 vmmM
巾帥的叫仙
l
叩MVm
叫自問宙間血
ω
戶
叫-
h7
伽叫岫咕則
川
:
uh
M 叫 mm 肌
Mh 吶仰」聞
帥吋
hkmv
mN 叫
仲叫叫間耐
lb
H
山
呻師叫叭咖
h
t
s zmvhd
Solution 1. 1 Le tZ X)
ddhM3a iy m memcdm ihk-Rm
SJHO
6 kglpipe
hm心帥叫
Raw materials
8U 尸坤扭曲
750 m2
2
日肘。恤詢
3 m /pipe
μ 帥 Mm 間 m
5m月p'pe
叫別叫心向明
Storage space
TF
b且i
叫咱們
且==目
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)
Linear Optimization 的 Applications
2
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:
6x 1 + 4X2
三 800
Raw material
x
x
30
20
:一土+一土豆 8
W orking hours
、‘',
三 750
、 、、 /,.‘
Storage space: 5Xl + 3X2
.E.A
一一一一一一一一一一一一一一-一一-一一 (2)
一一一一一一一一一一一一一… (3)
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 and
X2 三 0 ,
Xl 三 O
simply because the quantities Xl and X2 cannot be negative.
We can now summarize the problem as a linear programming model as follows: J'.‘、、
勻,旬
』《
E
=弓
咒。
nU
、‘.,/
Z
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 (1)
5Yl + 6Y2 + 2Y3 ;::: 10 A similar argument
app l i臨 10
type II
pi阱 .
and we can write another constraint
that 3Yl +4Y2+3Y3;::: 8
(2)
L的earOptl的7ization 的 Applications
10
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~
We can also
0
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 cos t. 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
一一一一一一……一一
(0)
subject to 5Yl + 6Y2 + 2Y3
~
10
3Yl + 4Y2 + 3Y3 ~ 8 yl
~O
y2
~
0
y3
~
0
(1) (2)
The solution of this dual model (see Appendix A or Appendix B) is: min P = 1504 yl= 0 y2 = 1.4 y3 = 0.8 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 addition a1
kg of raw materi a1 will increase the profit level by $1 .4. The shadow price of working
time ,豹,
is equal to 0.8. This means that one addition a1 minute of
working time will increase the profit level by $0.8. It can a1 so 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. 2屆l ?但
叫
、f﹒必刊J
A
hnsζJrO
的歪歪歪
位也al
21343 FJtxxx +OOO x 2 x784 LC+++ 1 1 1 l loo = 0 2 2 1 5 08
Min P = 750Yl + 800Y2 + 480Y3 subject to
xxx
5Yl + 6Y2 + 2Y3 ~ 10 3Yl + 4Y2 + 3Y3 ~ 8
呵L ,
yl
這 O
Xl
~O
y2
這 O
X2
~
y3
~
0
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 du a1 model , (b) the RHS constants of the constraints of the prima1 model are the coefficient of the objective function of the du a1 model , and (c) the coefficients of yt , y2 and
豹,
when read row by row , for the two
constraints of the du a1 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.
L inear Optimization
12
in Applications
The general fonn of a primal model is : Max Z = C1X 1 + C2X2 + . ‘ + CnXn subject to a11x 1 + a 12x2 + ., ...
三
+ a1nX n
~月 I + ~2X2 + ..... + ~nXn
丸ll X I
三 b2
+丸泣X 2 + ..... + ~Xn
all
bl
三 bm
xj 主 O
The general fonn of the dual model wil1 be : 瓦1in P
= b tY l
b 2Y2
+
+ .. ... +
bmYm
subject to allYI
+ ~tY2 + ., •.. +丸llYm 主
c1
a l2 YI
+ ~2Y2 + ., •.. +丸。Ym 主
c2
a1nYI
+ ~nY2 + .. '" +丸mYm 這
cn
all
Yi 這 O
The two models are related by : (a) maximum Z = minimum P, and /'.、
、‘,/
ku
Yi=
ð. Z ð. b i
一一一
where Yi stand for the shadow price of the resource i and b i 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 mode l. Let us examine the final tableau of Example 1.1 :
Primal and Dual Models
13
Z
Sl XI X2
地一oool
叫一oolo
z-1000
Basic Variable
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 equ a1 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
decision variables (ie.
to solve the du a1 rnodel to find the values of the
YI ,但 and
Y3). They can be found frorn the prirnal rnode l.
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
。
。
Sl XI X2
10 8
。
。
。
。 。
2日
Cj -Zj
。 10 。
8
RHS 126 48 128 1504
。 。
。 Yl
y3
Y2
In a sirnilar w呵, the values of yl , Y2 個d Y3 can be seen frorn the row of Zj .
2.4
Algebraic Way to Find Shadow Prices There is a sirnple algebraic way to find the shadow price without ernploying the 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 for easy reference: AU 、‘ E/
Z=10Xl +8X2
/'.‘、、
M位
Linear Optimization
14
in Applications
P 、JAUOO 司IOOA