Академический Документы
Профессиональный Документы
Культура Документы
OPTIMIZATION IN
ApPLICATIONS
LINEAR
OPTIMIZATION IN
ApPLICATIONS
S.L.TANG
香港付出版社
Preface vii
C hapl er I : Inlroduclion
' . 1 Formulation of a linear programming problem I
1.2 Solving a linear programming problem 2
1.2.1 Graphical method 3
1.2.2 Simplex method 4
1.2.3 Revised si mplex method 6
55791
『I
Chapter 5 : Integer Programming Formulation
司/呵/吋
5.1 An integer programming example
5.2 Use of zero-one variables
/OOOOOOOOAYAVJAYAVJ
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
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 only in thc book
啊l C 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 problems. Thc stcps shown in cach w可orkcd
Thc book is likcly 10 be uscd by tcachers. taught course students and 悶 sea rch
Examp le 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:
且==目 工站直且 (&固 paoy Ay晶ilallili!)!
b且i
Storage space 5m月p'pe 2
3 m /pipe 750 m2
Raw materials 6 kglpipe 4 kglpipe 8∞ kglday
仲叫叫間耐
巾帥的叫仙
hm心帥叫
Mh 吶仰」聞
M 叫 mm 肌
伽叫岫咕則
阱呵
叫咱們
日肘。恤詢
叫自問宙間血
8U 尸坤扭曲
μ 帥 Mm 間 m
川
TF
ddhM3a
何
si-oco
問廿
h
iy
的月 AMh
m
memcdm tctnu
vmmM
SJHO
ihk-Rm
lb
H
帥吋
t
:
1 耐心
叩MVm
山
sw
zmvhd
s
戶
mN 叫
h7
hkmv
uh
也
l
叫-
心
叫
du
1
s
世
Solution 1. 1
Le tZ = 100al profit
X) = 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
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:
/,.‘
、‘',
.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
Z<
AUXXX + nxux
EWSζJfO
utxxx xm
咒。
n1343nununuAU nU
=弓
、‘.,/
J'.‘、、
a-b!lll
E
』《
勻,旬
222
IOOA
Jnunδ
一歪歪
(1)
(2)
司4
(3)
Xl ~O
X2~ 0
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.
、‘,/
/EE
Max Z = 10Xl + 8X2 “…一
‘、
subject to
5Xl + 3 X 2 至 750..._..... 的 自…"“…“…叮叮………“凹,叫“_........ (1)
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 w i11
satisfy all the constraints and is called a feasible solution.
X2
X)
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(1 28)
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 materi a1 s 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 m2instead of 750 m2, then line (1) will a1 so 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.
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 forma t.
已一oolo
品一oool
趴一0100
也-A343
Z 一1000
﹒
h 一5心
Basic Variable
(Oa) Z
62
(1 a) SI
(2a) S2
(3a) S3
Table 1.1 Initial Simplex Tableau for Example 1.1
6 Linear Optimization 的 Applications
After two iterations (see Appendix A), the final tableau will be obtained and is
shown in Table 1.2 below.
s-aooa
s-loan 吋
趴一0100
z-1000
也一oool
叫一oolo
Basic Variable 3-82A6
2-4932
(Oc) Z
(1 c) Sl
(2c) Xl
(3c) X2
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
value zero. Therefore , from the final tableau , we can see that the optimal
solution is:
Z = 1504
Xl = 48
X2 = 128
Sl = 126
S2 = 0
} non仔.枷i比cvar
缸ri昀a油
岫
bl臼叫a缸re 叩a叫l ω
S3 = 0
It can be seen that this result is the same as that found by the graphic a1 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
for the other two resources and are equ a1 to O. This means that the raw materi a1 s
and the working time are fully utilized.
X) X2 S) S2 S3
Basic
Variable Q 10 8
。 。 。 RHS
S)
。 5 3
。 。 750
S2
。 6 4
。 。 800
S3
。 2 3
。 。 480
L 。 。8 。 。 。 。
Cj -Zj 10
。 。 。
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
-0 .4
126
x) 10
。 。 0.3 48
X2 8
。 。 -0.2 0.6 128
1.4
L 10 8
。 -1. 4
0.8 1504
Cj -Zj 。 。 。 -0.8
Table 1.4 Fínal Símplex Tableau for Example 1.1 (Revísed Símplex Method)
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($I m2)
Y2 = shadow price of raw material ($lk g)
Y3 = shadow price of working time($/minute)
This means that one addition aJ m2 of storage space available (i.e. 751 m2 is
available inslead of 750 m 2 ) 圳 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 definition of shadow price, we can fonnu lale anolher Ii near
programming mod e1 for Example 1.1. T > is new model is called the dual model
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
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 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)
subject to
5Yl + 6Y2 + 2Y3 ~ 10 (1)
yl ~O
y2 ~ 0
y3 ~ 0
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.
位也al 2屆l
的歪歪歪
21343
FJtxxx
A
hnsζJrO
LC+++
11=1
0 l
2loo
x784
2x 2
+OOO
、f﹒必刊J
subject to
xxx
yl 這 O
Xl ~O y2 這 O
X2 ~ 0 y3 ~ 0
(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.
12 L inear Optimization in Applications
all xj 主 O
all Yi 這 O
Yi= 一一一
ð. 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
地一oool
z-1000
叫一oolo
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 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 豹,
Therefore , it is not necess缸Y to solve the du a1 rnodel to find the values of the
decision variables (ie. 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
。 。 。 RHS
Sl
。 。 。 126
XI 10
。 。 48
X2 8
。 。 128
2日 10 8 1504
Cj -Zj
。 。
Yl Y2 y3
In a sirnilar w呵, the values of yl , Y2 個d Y3 can be seen frorn the row of Zj .
、‘
M位 Z=10Xl +8X2
E/
14 Linear Optimization in Applications
叫
戶+++
0222txxx
d343
S
:ll1
<一<一<一
司IOOA
《 JfO
AUAUAU
P
XXX
、JAUOO
(1)
(2)
司4
且可
(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.
l=48+L aL
10
and x2 = 1 孔令 ~L
Substituting x) and x 2 into the objective function , we have:
z + ~Z =叫48 1~f\
3
+ 10 ~L)
~~I
+叩 28
-,~--
- +~L)
5
Simplifying , we get
z + ~Z = 10附 +8(128)+÷aL
az=?aL
各= 0.8 (i.e. s叫 p心
mm
n3
DAiteELEa-
劃 h
σ。、』',
•••
扎1achining Assembly A
••
(hours) (hours) A
Standard 3 2
Special 4 2 2
Deluxe 4 3 3
(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
3x 1 + 4x 2 + 4x 3 至 20,000
2x 1 + 2x 2 + 3x 3 至 10 , 000
x 1 + 2x 2 + 3x 3 至 6 , 000
x ,.l' x~.
L'-2' x3,
.l"1t..
~ 0
where X1 = number of Standard lamps produced
X2 = number of Special lamps produced
X3 = number of Deluxe lamps produced
Using the simplex method to solve the model , the final tableau is:
Sl
。 。 。 -2 4 ,000
x1 30
。 。
l. 5
。 4 ,000
x2 40
。 。 -0.5 1,000
Zj 30 40 60
。 10
|T
160,000
Cj -Zj
。 。 -10
。 -10
shadow price of
painting hour
From the final tableau of either method, we obtain the following optimal solution:
Primal and Dual Models 17
(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 hou r. 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 equ a1 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 origin a1 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
2
3
The requirements of the two customers per week 訂e:
Customer O~reauired (tonnes)
29
2 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
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 cos t.
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
Customer
2 Supply
之j l旦l
X11 X12 12
丘l 斗
W訂e- 2 X21 X22 20
house
主j ~
3 X31 X32 30
Demand 29 33
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
There are two constraints on the amount of stock demanded by the customers:
Customer 1 : X11 + X21 + X31 = 29 一…一………戶。"一……_._..._...……… (4)
X 21 + X 22 ~三 20 呵呵 (2)
all x ij 主 o (i = 1, 2, 3 and j = 1, 2)
Supply = 12
Demand= 29
Supply = 20
Demand= 33
Supply = 30
The costs C ik 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
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 + 6X I2 + 5x 21 + 4X 22 + 5x 31 + 3X32
"
+ 3y" + 5YI2 + 6Y21 + 4Y22
+ 9z 11 + 10z '2 + 6z21 + 7Z22 + 8z 31 + l1z32
Constraints:
The warehouse supply constraints:
~Xii ~ ~Yik
i=1 - k=1
for j = 1, 2
i. e. x lI + X 21 + X 31 ~ YII + Y I2 …一一一一一…一一一一一一一一一一一 (6)
out of intermediate points in a network, depending upon where they are needed
mos t. Let us now see a trans-shipment example.
Example3.3
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 cos t.
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
all x ij 主 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
At node 2, x 12 + X S2 三 R 2 (7)
At node 3, x 23 + X
S3 三
R3 ..-“一……………一“一………………一一…叮叮叮曰“一 …… (8)
At node 5, X 2S + X4S 三 RS …………一…………………一…………………一… (9)
Section No. 2 3 4 5 6 7 8 9
Cut (m 3xl0 3) 28 32 13
Fill (m 3xl0 3) 10 14 16 10 12 11
The roadway is divided into nine sections. For ex缸nple, 10 x 103 m 3 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 m 3 • The unit cost of transporting earth by trucks from one section to
another is $2 per m 3 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 m3 to be moved from section i to
section j (i *- j).
Cut Section 3 X 31 X 34 X 35 X 36 X 38 X 39
7 X 71 X 74 X 75 X 76 X 78 X 79
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.
Now , the cement company wishes to know the optimal production schedule.
Solution 3.5
Let x\ , x 2, x 3 and x4 be the number of thousand m3 of cement produced in months
1, 2 , 3 and 4 respectively on regul訂 time.
Let Zl' Z2 and Z3 be the number of thousand m 3 of cement in stock at the end of
months 1, 2 and 3 respectively which have to be carried to the nex t.
、‘,/
all Xj ~ 0 , yj ~三 o and Zj ~三 O
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 w t. 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 w i11 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.
Also , X) , x 2 ,莉, x4 ~ 0
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% solven t. 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% solven t.
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 diagramatic a11y as shown in Fig. 3.7.
Q1
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
3 3
which are 0.2 million m3, 0.22 million m and 0.25 million m respectively. The
flows in the streams are assumed to have no pollutants unless they 訂e
The river requirement is that no water in any p訂t of the streams will exceed an
average standard of 2 mgnitre of BOD 5• It can a1 so 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 x 1 = kg of BOD 5 to be removed daily at factory A
x2 = kg of BOD5 to be removed daily at factory B
x 3 = kg of BOD5 to be removed daily at factory C
Other constraints:
Xl 三 0 , X2 2三 0, x3 ~ 0
x) = 360
x2 = 412
x 3 = 1174
Example3.9
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
X 20 = start time of activity 20
subject to
X 30 - X) 。這 5 一“…(1)
X SO - X 2。這 4 (3)
Xω - X 30 ~ 3 . . . . . . (4)
Xω- X 40 ::三 6 m …一一一………........- (5)
X 70 - X s。這 2 (6)
X END - X 70 ~ 3 一“ (8)
All Xj 這
o for i = 10, 20 , 30, 40 , 50, 60 , 70, END
XSO 14
Xω= 10
X 70 = 16
X END = 19
42 Linear Optimization 的 Applications
Readers can a1 ways check whether the project duration is 19 weeks or not using
the critical path method.
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 43
Activity
cost
Crash
v l-----------------
M
U一 Normal
Activity
Q duration
主主Jl
Activity C=
R-Q
10 20
20 20
30
40 50
50
60 110
70 50
D = R -已 (M - U)
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ω-
110 山
550)
D7OU-4(M7。
50 "100) '~-'V
Xω - X 3。這 D 30
Xω - X 4。這 D40
X70 - X 50 三 D 50
XEND - Xω;;:::Dω
Xω- x 3。三 3 一個
(4)
X
70 - x 50 ~ 2 …… …一………叮叮叮叮一 ~....-“一一… (6)
xm-MM--L(Mω-
110ω
550) (7)
The second set of constraints is the minimum cost (or normal cost) constraints:
MJO ~ 100 “ (9)
M 2。這 150 (1 0)
M 30 ~ 150 (1 1)
M 4Q ~ 300 ……白白白曰“……一… (1 2)
Mω~550 • (1 4)
The third set of constraints is the maximum cost (or crash cost) constraints:
MJO 三 120 . (1 6)
M 20 ~ 170 (17)
弘130 三三 150 (1 8)
M4Q至 400 “一…(1 9)
M 50 至 200 (20)
Mω 三三 990 - (21)
M 70 三三 150 (22)
46 Linear Optimization 的 Applications
We can observe that only M20 and M40 in the result are different from their
norma1 cost U 20 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 (origin a1) 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 mode l.
+12 Q) þ 0 Þ ø -4
x xJ; @-6
+10 G)' ;@' ;0) -8
3 4 5 6 7
hZL 33 45
2 39 28 . .
3 . 13 16 20
4 . 19 18 11
250 m 3 and 200 m 3 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
perm 3
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 m 3 and $5.0 per m 3 .
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:
FP 3 0.3 0.5
FP4 . 0 .4
Loss 0.1 0.1
Processing cost/m 3 $2.5/m3 $10.5/m 3
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.
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:
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
Demand stations
2 n Supply
叫 心| 心l
Xll X12 Xln SI
Supply 2
臼 83 區|
X21 X22 X2n S2
statlO ns
巨型| 凶 凶
m Xml Xm2 Xmn Sm
Demand D1 D2 Dn
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
subject to
XII + X I2 + ……一一 + Xln 三 SI …一一……一………(1)
+ _...._._--… 一 三 S2 一
白白白白_.....
X21 + X22 + X2n “……… (2) I m supply
Xml + X m2 +…一…叮叮叮
+ X mn ~三 Sm
Iconstraints
叮叮叮一……
Xll + X21 + + Xml Dl …(m+l)
(m~2)
II constraints
X I2 + X22 +…一一… + X m2 = D2 叫 nd
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 a1 gorithm.
品且i
Customer
2 Supply
之| 叫
12
~ l 工J
W訂e- 2 20
house
主J i山
3 30
Demand 29 33 62
正ω~alt
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 Fi g. 4.3.
Customer
2 Supply
主j |且l
12 12
~ 工j
W訂'e- 2 20 20
house
主J 叫
3 9 21 30
Demand 29 33 62
(total)
這起且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
+1 |凶12 - 1 12
~ |工J
W訂e- 2 20 20
house
3
主j
9-1 門 30
Demand 29 33 62
(tota1)
We usu a11y 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 57
Customer
2 Supply
主j I!QJ
12 12
~ 斗
W訂e- 2 20 - 1 +1 20
house
3
主j
9+1 叫 21 - 1 30
Demand 29 33 62
(total)
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 些l
12 12
~ l斗
W訂'e- 2 20 - x +x 20
house
主l i叫
3 9+x 21 - x 30
Demand 29 33 62
(tota1)
By inspection , the maximum x is 20 since route 2-1 cannot tak:e a negative v a1ue
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旦l
12 12
~ |斗
W訂e- 2 20 20
house
主j |叫
3 29 30
Demand 29 33 62
(tota1)
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.
Readers should now comp缸'e this result with that of Example 3.1 in Chapter 3.
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 Linear Optimization 的 Applications
Solution 4.2
品且i
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 equ a1 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
品且.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)
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
= C ll - C 21 + C22 - C 12
= 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 J?J +1
I
15
~ 叫“! |且|
W旺e- 2 35
house
主j UJ 主JI
3 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.
The calculations of improvement indices of routes 2-3 and 3-2 are rather simple ,
and are shown as follows:
C32 - C 22 + C 21 - C31
11-7+6-8
= +2
品且主
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
W缸e- 2
~
17 - x 同時 +x IJU 35
house
主j 叫 JLJ
3 12 + x 32
Demand 29 33 20 82
(total)
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)
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.
h WAc mC mC
n+
眩
AU
:ll
副
..且
。
V eEL--
1hh3
l EEA. •••
鬥U
ph VA
••
A
C
‘
句3
而‘
4
J
= 9-8+0-0
= +1
h== M+8
Mn6
時
e
"﹒?且,
句ru
mC
司、
FCl+
V2. ‘.. OI
。 缸,
,圖,句、
TA &E
F
d
••••
C+
C
-7
而F缸
d
且
i
勻,
Since a11 the improvement indices are positive , there cannot be further
improvement. Therefore we stop here and conc1 ude 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 usu a11y 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 equ a1 to m+n-l in
order that the algorithm can be continued.
C25 (22)
C52 (1 8)
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 C ij as a big-M unit
cos t. 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 凶 凶 凶 坐i
18
~ 凶 坐l 凶 坐l
2 B
坐l U 盟 凹 凶
3 B - 14
4
但l 些l ~ w 凶
B + 12
自i 主l 且l 主l 間
5 B
4B + 16
Demand B B B B 16 (total)
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 strict1 y 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.
、s\ouEmheestSmiat、:ions 2 3 4 5 6 Supply
且 凶 坐l 且l 也l
18 18
心j @Ql 且l 且l 坐l
2 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)
Readers may comp缸e this solution with the one given in Chapter 3 (Solution
3.3).
68 Linear Optimization in Applications
Fill Section
4 5 6 8 9 Supply
隍l 且l 起l ~ 隍l 自主l
2 28
Cut μl 平l 起l 且l 凶i 且l
3 32
sechon
平l 且l 但l 區l 每l 且l
7 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 凶 22l10 主l
2 28
Cut 起l 凶 起l 起l ßllJ 且i
3 6 16 10 32
sec tI on
陣l 起l 起l 陸l
7 問2 問11 13
73
Demand 10 14 16 10 12 11 (total)
Mon'曲 (usage)
2 3 4 Supply
Regular 200
1 I time
JLr|在 80
Regular 200
3 I time
80
Regular 200
4 I time
凶 且j 凶 且也j 且J
lovertune 80
Fig. 4.17 Transp。前ation tableau for production schedule problem (Example 3.5)
Month (usage)
2 3 4 Excess Supply
capaclty
Overtime
且也
20l 233l
陸旦旦j 起到
到。 80
且l
Regular
可 平且j 且必l ~
200
Month 2 11口le
(production
Overtimc::
且l 且盟
70l 旦旦
lOl 但也l 立j
80
阻j 且l 且J
f號
主」
Regular 200
4 tI口le
且l 恤j 且j 且必l 且」
Overtimc:: 80 80
Example4.3
A plant hire chain has excess stock of adjustable props at two stores and
shortages at two others. The objective is to redistribute the stock at minimum
transportation cost. The following tables give stock position and unit
transportation cost respectively:
Stores
2 3 4
Excess 40 60
Shortage 35 50
Stock Posìtìon
To store
3 4
$80 $70
From store
2 $50 $60
TransDortation Cost Matrix
(a) Find the solution th剖 minimizes the total transportation costs of transporting
excess stocks from Stores 1 and 2 to Stores 3 and 4.
(b) It is expected that 前 some time in the near future the unit transportation costs
will increase. By letting the unit costs from store 1 increased by an amount
αand those from store 2 increased by an amount ß, show that there will be a
new optimal solution if
(α- ß) + 10 < 0
(c) Find the relation between αand ß when the problem has more than one
optima1 solution.
72 LinearOptl的lization 的 Applications
Solution 4.3
(a) The problem can be presented as a transportation tableau in Fig. 4.19.
3 4 Supply
到 ~ 40
凶 旦l
2 60
Demand 35 50
;三久
Fig. 4.19 Transpo叫ation tableau for Example 4.3
(Dummy)
3 4 5 SUDDlv
幽 .IQ\ 主j
40
l2Q\ 也| lQJ
2 35 25 60
Demand 35 50 15 100
(tota1)
(b) In the near future , the unit cost from Store 1 will increase by α, and that
from Store 2 will increase by ß. The transportation tableau will become the
one as shown in Fig. 4.2 1.
(Dummy)
5
40
2 60
Demand 35 50 15 100
(total)
(c) The problem has more than one optima1 solutions when (1 .1.)2-5 = 0
ie. (α,-ß) +10 = 0
ie.α+ 10 =戶
Exercise
1. Use the transportation algorithm to solve the trans-shipment problem given in
Exercise 1 of Chapter 3. Hints: use a destination node “ S" to equalize the total
supply and to叫 demand (see the following diagram). Unit costs of I-S and 2-S
are zero.
74 Linear Optimization in Applications
@-6
。 -8
6 100,000 30 5.000
2 5 80 ,000 35 6,000
3 4 60 ,000 40 7,000
The total repair costs should not exceed $65 ,000 in a ye 訂. No more than 12
vehicles are required. Determine the number of vehicles of each type to be
purchased so that the rate of delivery can be optimized.
76 Linear Optimization in Applications
$olution 5. 1
Let X1 = number of type 1 vehic1es
X2 = number of type 2 vehic1es
X3 = number of type 3 vehi c1es
Since the number of vehicles must be a whole number , therefore , X I,也 and X3
must be integers.
X} + X2 + X3 三 12 一一一一…一一一 (3)
subject to
100,000x} + 80 ,OOOX2 + 60 ,000月三 1 ,000 ,000 一一…一一一一一一 (1)
X} + X2 + X3 ~ 12 …………………一 (3)
的teger Programming Formulation 77
Note that if Xl and X2 were not constrained to be integers , the solution would be:
Xl = 4
X2 = 7.5
X3 =0
Example5.2
A product can be manufactured by five different plantlequipment. The set叫p
costs (fixed costs) , production costs (variables costs) per unit product processed ,
and the capacity of each plantlequipment per period are given as follows:
78 Linear Optimization 的 Applications
1500 units of the product is demanded for a given period. Determine the
optimal combination of plantlequipment to be used.
Solution 5.2
Let x 1 = number of units produced by plant 1
X2 = number of units produced by plant 2
X3 = number of units produced by plant 3
X4 = number of units produced by plant 4
Xs = number of units produced by plant 5
', .1.1XX>=
PT且 PT且
AUAU
--
,且
AU eEt
= 1, 2, 3, 4, 5
AU
for i
subject to
,
x + X2 + X3 + X4 + Xs = 1500 扭扭曰“一 ……… (1)
Xl 三 700dl (2)
X3 三 600d 3 (4)
Integer Programming Formulation 79
X4 ~三 550c4 (5)
Unit transportation
Rental Warehouses Customers Cost C ij
$8 ,000 C I1 = 9
C 12 = 10
C21 = 6
C22 = 7
$10,000 C 31 8
C32 = 11
$9 ,500
Assume that all the three warehouses can be rented. One can rent all the
warehouses or rent only p缸t of them. The customer demand must be satisfied of
course. The weekly rental of warehouses 1, 2 and 3 缸e $8 ,000 , $10,000 and
$9 ,500 respectively. Determine which warehouses should be rented and how
many tonnes of stock from each warehouse should be transported to each
customer.
Solution 5.3
This example is an extension of a standard transportation problem. The new
element is to introduce zero-one variables to represent "to rent" or "not to rent"
the warehouses. Now , let
Xij 這 O
for i = 1, 2 , 3 and j = 1, 2
AU
-- fdttanu
-d\
/j=l"-. 一~Yll (3)
-τ0--今y n(5)
I k=l I Demand = 29
Route i-j Unit cost Cij Route j-k I Unit cost Cjk
1- 3 5 3- 1 4
2-3 4.5 3-2 5
3-3 4
The weekly storage capacity of the new distributor is 30 tonnes and this new
distributor will pose an additional cost of $60 per week to the company. An
expansion of distributor 1 from a weekly capacity of 40 tonnes to 55 tonnes will
cost $30 per week. Closing distributor 2 , on the other hand , will give the
company a saving of $70 per week.
Solution 5.4
Let d 1 = {~ if distributor 1 is expanded
if distributor 1 is 且且 expanded
.d2 r4t'lnu
= if distributor 2 is IlQ1 closeJ
if distributor 2 is closed
tinu
r
AU
if distributor 3 is opened
一一
』t
勻、J
if distributor 3 is n且 opened
Note that when d 1 is equal to 0 (i. e. distributor 1 is not expanded) , the capacity
of distributor 1 remains to be 40. When d2 is 0 (i .e. distributor 2 is closed) , then
X12 , X22 , and X32 will be o. Also , when d 3 is 0 (i. e. distributor 3 is not opened) ,
then X13 , X23 and X33 will be 0 too.
Example5.5
questions (each question carries 20 marks). The scores obtained by the foremen
on each question are shown in Fig. 5.3.
Foreman
2 3 4 5
15 7 12 17 10
2 7 10 18 19 11
Job 3 8 12 19 18 12
4 6 6 9 11 7
5 13 13 10 17 14
How should the project manager assign jobs to the foremen based on the result
ofthe test?
Solution 5.5
Our objective is to maximize the overall test scores. Since transportation
problems are usually minimization problems , therefore we must convert this
maximization problem into a minimization one. This can be done by using 20
(the full mark of each question) to subtract each score given in each box of Fig.
5.3 , yielding the transportation tableau as shown in Fig. 5 .4.
86 Linear Optimization 的 App/ications
Foreman
2 3 4 5 Supply
山 U1J ~ 山 且l
陣J l1.QJ 品J 山 山
2
且l ..8J 斗J 品j
~
Job 3
之」 山 .l.Q1 ~ 且」
5
Oemand 5
(tota J)
subject to
•••
A
for i = 1, 2, 3, 4 , 5 andj = 1, 2, 3, 4 , 5
X24 =
X33 =
X42 =
X55 =
How sbould tbe truck carry tbe cargo so tbat tbe total value of tbe cargo loaded
is maximized aud tbe maximum capacity of tbe truck is uot exceeded?
Solution 5.6
Tbis problem is a typical knapsack problem witb tbe followiug model
formulatiou.
Maximize Z = 3d 1 + 6d2 + 2d 3 + 9d4 + 4ds + 7d6 + 5d7
subject to
2d 1 + 3d2 + d3 + 4d4 + 6ds + 5d6 + 2d7 ~三 12
--
『dt
,且
句I
勻,』
AU OVA
PTA ••• ••
一
EA
nu
Solution 5.7
The data for the problem are summarized in Fig. 5.5.
Teacher
2 3 4 5
English 4 4
Maths 4 4 4 4
Physics 4 4
Chemistry 4 4 4
Geography 4 4
Music 4 叫 4
Cost 30 20 35 25 18
Fig. 5.5 A set-covering problem
a h AU
-- EAnv
r4t
for i = 1. 2‘ 3.4.5
JS
、‘
AEt
applicant i is employed
﹒、
EJ
、./
••
English: d2 + ds ~ 1 A
90 Linear Optimization in Applications
(b) If the overall cost is to be minimized , then the objective function will change
to:
Minimize P = 30dl + 20d2 + 35d3 + 25d4 + 18d5
All the constraints will be the same as in p訂t (a).
Example5.8
Reconsider ex缸nple 5.7. This time the headmaster wishes to have as many
subjects covered as possible but there must be no overlapping, that is, each
subject can be taught by only one teacher. How should the headmaster select the
applicants?
Solution 5.8
We have to assume the number of subjects known as the "v a1ue" of each teacher.
Maths: d 1 + d3 + d4 + ds ~三 l (2)
Physics: d 1 + d3 ~三 1 (3)
a d
r
一一
』t
' '
•••••
for 1, 2, ....., 5
AU
a A
Example5.9
There are three earthwork sites adjacent to each other undertaken by one
contractor. Since the sites 訂e so near to each other the transportation time for
moving equipment from one site to another is assumed negligible. The
contractor has only one backhoe , one bulldozer and one roller available and
these plant items have to be shared among the three sites.
Site 1 needs the backhoe first , then the bulldozer and then the roller to work
with. Site 2 needs the backhoe first and then the roller. Site 3 needs the
bulldozer first and then the roller. The time durations for which they need the
plant are shown below:
說一
ω
Help the contractor to find a schedule which will minimize the overa11 duration
of completing the three jobs.
Solution 5.9
There are two sets of constraints for this problem. The first set is for ensuring
the correct sequence of operations , and the second set is for ensuring that each
plant is not scheduled on different sites at the same time.
In order to model a correct sequence of operations , let Xij be the start time at
which plant j is scheduled to be on site i, and XEND be the tot祉 time required to
complete a11 the three jobs as shown in Fig. 5.6.
In但ger Programmin9 Formulation 93
Plant
2 3
國國
Site 2
國一國
3
The above figure looks like a critical path problem, and in fact, it is. We have
already discussed how to find the minimum overall duration of such a problem
in Example 3.9 of Chapter 3. Using the method as described in Ex缸nple 3.9, we
have the following objective function and constraints:
Minimize P = XEND
subject to
X12 - Xll 這 3 一…--一一一…一…一一一一一一"一一一……(1)
The second set of constraints ís to ensure that each plant is not scheduled on
different sites at the same time. In order to do so , we have to make use of
"either-or" constraints. For example , plant 1 (i. e. backhoe) can only be on site 1
or site 2 at any given time. 50, either plant 1 is on site 1 日rst and then on site 2,
or vice versa. That is:
94 Linear Optimization in Applications
either X\\ + 3 三 X 21
or X 21 + 4 三 X ll
where Ô1 and ô2 are zero-one variables and M is a large positive number. When
ô1 = 1 (i.e. ô2 = 0) , constraint (i) will become x ll + 3 - X 2 \ 三 M and is inactive ,
but at the same time constraint (ii) will become X 21 + 4 - X 11 三 0, implying that
plant 1 will be on site 2 first and then on site 1. Similarly, if ô2 = 1 (i.e. ô1 = 0) ,
it implies that plant 1 will be on site 1 first and then on site 2.
The three constraints (i) , (i i) and (iii) appe訂 to be a little clumsy and can be
reduced to two constraints by reducing a zero-one variable as follows:
X 11 + 3 - x21 ~三 Md\ (8)
Similarly , we can now write down all the other constraints ofthe second set:
Plant 2:
X 12 + 3 - X 32 ~三孔1d 2 (10)
X 32 + 5 - x 12 三 M(1 - d 2) (1 1)
Plant 3:
X 13 + 4 - x 23 三軒1d 3 (1 2)
X23 + 5 - x J3三 M(1 - d3) (13)
X 23 + 5 - X 33 三 Md4 (14)
Integer Programming Formulation 95
『4t
,且
a
•••
••• ,
G
一-
L瓜
AU
k = 1, 2 , 3 , 4 , 5
且
M in this example can be taken as the sum of durations of a11 plant on all sites ,
that is 27 , or any number larger than that.
construct , will need 120 full-time workers , and will contribute $115 x 106 per
year net when finished. Once the construction of a block commences , the
process will continue until it is completed , that is , it does not allow the
construction to be stopped and then continued afterwards.
There are only 250 full-time workers available. The monetary constraints of the
developer are such that he can start at most one building in any one year. All the
three buildings must be completed by the end of year 5. Determine for the
developer which office building(s) he should build and when he should start to
build each of them in order to maximize the rental income.
$olution 5. 10
Let d ij be zero-one variables such that i represents the block number and j the
year which the construction of the block commences. All possible ways of
constructing the blocks so that they can all be completed within five years are
shown in Fig. 5.7.
The objective is to maximize rental income and so we can write the objective
function as:
Maximize Z = (1 00 X 2)d ll + 100d l2 + (85 X 3)d 21
+ (85 x 2)d n + 85d 23 + 115d31
subject to:
Integer Programming Formulation 97
Constraints ensuring that one building block is only built at most once:
d ll + d l2 + d 13 至 1 一…一一一……一一…一一…一一 (1)
d 31 + d 32 ~三 1 (3)
Constraints ensuring that the developer can start at most one building block in
any one ye缸:
d l1 + d 21 + d 31 三 1 (4)
d l1 + d 12 + d 21 + d 22 + d 31 + d 32 ~三 2 一一一一…一一……一 (5)
d 13 + d 24 + d 32 三 3 (8)
a川= {~
d l1 =1 d 21 =0 d 31 =0
d 12 =0 d 22 =1 d 32 =0
d 13 =0 d 23 =0
d 24 =0
So , construct building block 1 in the first year and building block 2 in the
second ye訂. Block 3 is never constructed because of insufficient workers.
98 Linear Optimization in Applications
Start
In what order should the sa1esman travel from town to town so that the total
distance of his joumey is minimized?
Solution 5. 11
The distances between towns can be summarized in a matrix as shown in Fig. 5.9.
泣斗之
Town
2 3 4 5
。 7 3 8 6
10.5
2 7
。 6.5 5.5
Town 3 3 6.5
。5 5 4
4 8 5.5
。 7.5
5 6 10.5 4 7.5
。
Fig.5.9 Distances between towns (C ij )
E 且 AU
『4t
5Z 斗
5
M n .m
主 -F
C
D且
,芋
AU ri -tEJ
一一
戶UE
••• •••
71- V-s
A A
d = 1,2, "', 5
『
a for i
4t
一
•••
'
•••
A .HHJ
A
j = 1,2, "', 5
and 吋
d31 = 1
c42 = 1
d53 = 1
We can observe that the answer gives two discontinuous subtours. One subtour
is town 1 to town 5, town 5 to town 3, and town 3 to town 1. Another subtour is
town 2 to town 4 and town 4 to town 2. These are two disconnected loops.
However, what we require is not that but a complete and connected tour of all
towns. Therefore , constraints (1) through (1 0) alone are not adequate to model
what we want. We have to add some more constraints.
If there are n towns to be visited (starting from town 1), then introduce an
integer variable Xi ( i = 1, 2, "',的 for each town i such that if town i is the k
th
town the salesman visits then Xj = k. For ex缸nple, if he st缸ts from town 1, then
Xl = 1. If the next town he visits is town 2 , then X2 = 2 and d 12 = 1. If town 4 is
the one he visits after town 2, then X4 = 3 and d24 = 1, and so on. Therefore , if
town j is the town he visits immediately after town i, then dij = 1, and if town j is
not the town he visits immediately after town i , then djj = 0, but no matter what,
|利- Xi l 三 n - 1 because Xj and Xj must take the values from 1 to n.
Now , let us go back to our Example 5.11. The extra constraints we need 缸e:
Integer Programming Formu.佑tion 101
Xl =1 (11)
X2 - Xl ~ 5d 12 - 4 (1 2)
X2 咀 X3 ~ 5d32 - 4 (13)
X2 - X4 ~ 5 <42 - 4 (1 4)
dlddddd
>一>一>->一>一>一
'J
A
XXXXXX
XIXXXXX 且TA
、 ZJZJζJZJF
(1 5)
啊,心句
弓,,街句
ZJ
E3
且
TA
(1 6)
冒且布,
,1
3
(1 7)
兩LA--r3
TA
句3
句3
hAa
(1 8)
TA
弓3
句3
守軍
(1 9)
句
句
34aT
3AUT
A吋
、J
(20)
﹒且
,l
X4 - X2 ~至 5d2 4 - 4 (21)
X4 - X3 ~ 5d34 - 4 (22)
X4 - X5 ~ 5d54 - 4 (23)
X5 - xl ~ 5d 15 - 4 (24)
X5 - X2 ~ 5d25 - 4 (25)
X5 - X3 ~ 5d35 - 4 (26)
X5 - X4 ~ 5 <45 - 4 (27)
tinu o
rl ZJZJ
==斗爭
••
『4t
',',',
r且
AU
=
且
-HHd
•••
J
.•
•••
且
This time we have a complete tour. The salesman goes to town 2 日rst from
town 1, then from town 2 to town 4 , then to town 5 , then to town 3, and then
back to town 1.
102 Linear Optimization 的 Applications
Exercise
1. A site manager has a gang of c訂penters , a gang of steel fixers and a gang of
co臨時tors working under him. There are three jobs on the site. The first job
requires the c訂penters gang and then the concretors gang. The second job
requires the steel fixers gang and then the concretors gang. The third job
requires the c缸penters gang, then the steel fixers gang and then the concretors
gang. One gang can only work on one job at one time. The time required by the
gangs on each job is given by:
Help the site manager to minimize the completion time of these three jobs by
formulating the problem as a mixed integer programming mode l.
2. A contractor is looking for more jobs. Four jobs are available and they 訂e: (1)
an office building , (2) a shopping complex , (3) a high rise ap訂tment , and (4) a
low rise residential development consisting of 10 houses. If low rise housing
development is selected the contractor must inform the developer how many
houses he is able to undertake so that the remaining one will be given to another
contractor by the developer. The estimated profit from each job is estimated as
follows:
(1) office building 一- $300 X 103
(2) shopping complex 一 $360 X 103
(3) high rise apartment 一 $450 X 103
(4) low rise houses 一- $22 x 103 per house
Although the contractor would like to do all of them, he has certain resource
constraints. Each job will need a project manager, but he has only three
managers available. Jobs 1, 2 and 3 each need a crane , but he has only two
cranes in hand. During the period of construction of the 4 jobs, the contractor is
only confident in finding 160 x 103 man-hours of skilled labour and 360 x 103
Integer Programming Formulation 103
man-hours of unskilled labour for the jobs in the construction marke t. The man-
hours of skilled and unskilled labour required by the four jobs are as follows:
已.fan-hours
skilled labour unskilled labour
(1) office building 40,000 80 ,000
(2) shopping complex 55 ,000 125 ,000
(3) high rise ap缸tment 70,000 165 ,000
(4) low rise houses (per house) 6 ,000 14,000
(a) How should the contractor select the jobs in order to maximize the total
profit? If the low rise houses are selected, how many houses should he
build?
(b) If the contractor can hire an additional crane at $15,000 for the period of
construction, should he hire it?
(c) If he can pay the skilled and unskilled labourers to do overtime work at extra
costs of $12 and $8 per hour respectively, what will be his change of
decisions?
3. A man is now in Hong Kong. He wants to travel by air to six other cities ,
namely, Bangkok, Beijing , Jakar妞, Manila, Singapore and Tokyo. The flight
distances in km from city to city 缸e:
In what order should the man travel to the cities and finally come back to Hong
Kong so that the total distance travelled is minimized?
The most powerful method of finding solutions for integer linear programming
problems is the branch and bound method. In this chapter , we will consider
two examples using the branch and bound method. One example is a problem
with decision variables greater than zero but which must be integers. Another
example is a problem with zero-one variables.
2Xl + X2 三 6
2Xl + 3X2 三 9
Solution 6. 1
There are 4 steps in solving the model
品且i
2Xl + X2 三 6
2Xl + 3 X 2 三 9
X}, X2 三 O
The optimal solution, found by the simplex method or the graphical method (see
Fig. 6.1), of Pl is:
,因 Unear Optimization in Apρ 曲你開S
Z = 25.5
Xl = 2.25
X2 = 1. 5
1.5)
缸且主
Divide Pl inlo two problems , p2 and P3 、Ne branch on X2 by adding the bound
Xz :S; 1 10 Pl fonnir苟且, and adding the bound Xz 主 2 to P I forming P3. Th e
branching variable X1 is chosen because it is less near 10 an în teger 山 an XI. The
following shows the two branched and bound problems p2 and P3
也 fl
Max Z = 6Xl + 8X2 MaxZ = 6xI + 8X2
subj回tto '"剛回 tto
As a result of the branch 曲 d bound , the feasîble spaces for p2 and P3 are
separaled out from Ihe original feasible space of P 1, as shown in Fig. 6.2
Integer Programming So/ution 107
X2
Xl
The optimal solutions , found by the simplex method or the graphical method , of
P2 and P3 are:
P2 fJ
Z = 23 Z = 25
Xl = 2.5 Xl = 1. 5
X2 =1 X2 =2
We can see that the solutions of P2 and P3 , although still not all integers , are
c1 0ser to what we want after the first branch and bound. The branch and bound
process intentionally changes the non-integral X2 of Pl into an integer.
Usually, we use a tree diagram to represent the branch and bound process as
shown in Fig. 6 .3.
108 Linear Optimization in Applications
7 、;2
Fig. 6.3 Tree diagram for branch and bound process (a)
Now , we go to step 3.
品且主
E是 E三
Xl 三 1 Xl ~ 2
Xl , X2 ~ 0 Xl , X2 ~ 0
Integer Programming Solution 109
E是 E三
、
、三2
Now we have to tackle the two remaining problems , P2 and P4. Which one
should we tackle first? The answer is of course P4 because the Z value for P4
(i.e. 24.66) is larger than that of P2 (i.e. 23).
110 Linear Optimization in Applications
品且A
E豆 f1
Max Z = 6x 1 + 8X2 Max Z = 6Xl + 8X2
su句 ectto subject to
2Xl + X2 ~ 6 2Xl + X2 三 6
X2 ~ 2 X2 ~ 2
Xl 三 1 Xl ~ 1
X2 三 2 X2 ~ 3
Xl , X2 ~ 0 Xl , X2 三 O
E豆 E1
Z = 22 Z = 24
Xl = Xl 0
X2 =2 X2 ::;: 3
The tree diagram now becomes the one as shown in Fig. 6.5.
Integer Programming Solution 111
\之2
\;2
\:這 3
T
T Optimal solution
Fig. 6.5 Tree diagram for branch and bound process (c)
The QSB+ (Quantitative Systems for Business Plus) software has the function of
solving integer linear programming problems. The user only has to enter Pl
112 Linear Optimization in Applications
into the computer and also define that Xl and X2 are integers. The optimal
solution (i .e. resu 1t of P7) will be shown after a series of calculations are
automatically done by the computer.
Example6.2
Solve the following knapsack problem:
di = {b for i = 1, 2 , "', 5
Solution 6.2
起且i
d1 至 1
d2 三 1
d3 ::; 1
d4 三 1
ds 三 l
The solution of Pl is
Z = 26 .44
d 1 = 0.022
Integer Programming Solution 113
d2 = 1
d3 = 1
d4 = 0
ds = 0
S起草.2
Pl
Z = 26.44
d 1 = 0.022
d2 = 1
d3 = 1
d4 =0
ds =0
;Ý
d
、:;1
P2 P3
Z = 26.23 Z = 23.6
d 1 =0 d1 = 1
d2 = 1 d2 = 0.3
d3 = 1 d3 =0
d4 = 0.077 d4 =0
ds =0 ds =0
益且主
We tackle P2 first because it has a larger Z value. Divide P2 into P4 and P5 and
solve them as shown in Fig. 6.7.
114 Linear Optimization 的 Applications
“n
們一
l-faβ
201104
ZA
叫也白山也一
、支1
<一/
d
』
P2 P3
Z = 26.23 Z = 23.6
d l =0 dl = 1
d2 = 1 d2 = 0 .3
d3 =1 d3 =0
d4 = 0.077 c4 =0
ds = 0 ds =0
、
d4
P4 P5
Z = 26.17 Z = 23 .4
d l =0 d l =0
d2 = 1 d2 = 1
d3 = 1 d3 = 0.6
d4 =0 d4 = 1
ds = 0.17 ds = 0
品且且
Pl
Z = 26 .44
d 1 = 0.022
d2 = 1
d3 = 1
d4 =0
d5=0
d戶/\LLl
Zh計 恰是 6
d 1 =0 d1 = 1
d2 = 1 d2 = 0.3
d3 = 1 d3 =0
d4 = 0.077 d4 =0
d5 =0 d 5 =O
T
d4
、
1
P4 P5
Z = 26.17 Z = 23 .4
d 1 =0 d 1 =0
d2 = 1 d2 = 1
d3 = 1 d3 = 0.6
d4 =0 d4 = 1
d5 = 0.17 d5 = 0
T
P6
\ P7
Z =26 Z = 24.67
d 1 =0 d 1 =0
d2 = 1 d2 = 1
d3 = 1 d 3 = 0.83
d4 =0 d4 =0
d5=0 d5 = 1
Optima1 solution T
昀
P 6i站s the 叩
0 ptima
叫1 solution and pu
叫t a terminal 剖
s ig
伊 n"
P7.
卸1ax ,
Z = 20d + 12d2 + 14d3 + 3d4 + d s
subject to
,
45d + 20d2 + 30d3 + 13d4 + 6ds ~三 51
d, ~ 1
d2 三 1
d3 ~ 1
d4 三 1
ds ~ 1
d , 三 O
d4 主 O
ds 三 O
all d j ~ 0 for i = 1, 2 , \5
Exercise
Solve the following integer programming model and draw the tree diagram of
the branch and bound process.
,
Max Z = 100x + 60X2 + 70月+ 15x4 + 15xs
subject to
,
52x + 23x2 + 35x3 + 15x4 + 7xs 三 60
-inu
rioVA
而/甜
,Ea--、
x =
'、
一一
•••
, E且
A
GOAL PROGRAMMING
FORMULATION
7.1 linear Programming Versus Goal Programming
10 previous chapters , all examples involvcd the max imization or minimization of
onc singlc objective undcr conslrainls. In goaJ programming , il is possible for
us 10 optimize more than one obj血泊 ve in a problem. ln facI , an ordin 訂y linear
programming modcl (with only onc objeclivc) can also be formulated as a goal
programming mode l. The 伍的 t example in this chapter will iIl ustrate this. From
the second example onward , we will see how multiple obj血 l ives are optimizcd
under a number of constraints
Example 7.1
A fumi lure cQmpany sells two types of annchairs , the standard and the deluxe
Each of Ihese armch割的 requires time in the woodwork and Ihe painting
departments. The markcting manager of the company indicatcs that 00 more
than 50 deluxe anndmirs can be sold in the next week and is not sure about the
situation for standard amlchairs. The unit prorit for the standard and deluxe
annchairs are $4叩,nd 自由問 pectively. A standard annchair requires 1 man
hour ìn the w ∞dwork d叩 artment 祖d 1 man-hour in the painting department
A deluxc armchair, on the other hand , requires 2 個d 1 man-hours in thesc
re, p凹 tive departmcnts. The number of man-hours in the woodwork department
is limited to 120 and that in painting 10 80 in the week. These are regular
working hours avaìlable. Fonnulate the problem as
(的 a Ii near programming model , and
(b) a goal programming model
的 max i mize the company's profit in that week
$olution 7. 1
Le t XI = number of standard annchairs pr.吋 uced
l' X~
X.. ....2 ~。
、、',',
•••
Mind l - A
、
subject to
400x 1 + 500x 2 + d l - - d l + = 100,000 (1)
X1 + 2x 2 三 120 (2)
Goal Programming Formulation 119
Xl + X2 三 80 (3)
X2 至 50 (4)
X }, X2 , d 1-, d 1 + 去。
Readers should comp訂e this solution with the one in part (a).
且湛藍S
Examples 7.1 (b) has shown the formulation of a simple goal programming
problem. However, the usual practice in goal programming is that we always
write “=" signs in constraints instead of “豆 or “這"signs. The model in
example 7.1 (b) can therefore be written as:
弘1ind -
1 (0)
subject to
400x 1 + 500x2 + d l" - d l+ = 100,000 (1)
x1 + 2x 2 + d2" = 120 (2)
x1 + x2 + d3" = 80 (3)
x2 + d4" = 50 (4)
120 Línear Optimization 的 Applications
The solution for this rnodel is exac t1 y the sarne as that for the previous rnodel
(i. e. the one without d2\ d3- and d4-). It should be noted that d 2 +,也+ and d/ 缸e
not in the constraints because 120, 80 and 50 are rnaxirnurn possible values and
there cannot be over-achievernents. These are called “ absolute goals".
Example 7.2
This exarnple is a continuation of Exarnple 7.1. It is possible to increase the
nurnber of rnan-hours available by working overtirne. The rnanagernent of the
cornpany , however, wishes that the overtirne hours should be within 80 hours in
the two departrnents as far as possible. Furtherrnore , the rnanagernent
establishes a list , in the order of decreasing priority, on goal attainrnent as
follows:
Solution 7.2
Prjority 1 (1 st goal) : total overtirne hours should be within 80 as f;訂 as possible.
So , we rnust add the following constraint to the set of constraints in Exarnple
7.1:
Goal Programming Formu/afion 121
dH
+ + .G+ + AU AU +
-- OOAU
(5)
勻,&
'、
r3
句3
J
whupv ••
',
Note that these two are no more absolute goals because overtime is now
possible.
For the 2nd goal , no additional constraint is necess訂y. However, since the 2nd
goal is to minimize d4 -, we will include it as priority 2 in the objective function.
nu
/a
、‘圖,',
Min P\ds+ + P2d4- + P 3d\- + P4 (d2+ +
‘、
subject to
400x
圳\ + 500X2 + 向d\- - 也
d\+ = 100,000 自 m………咀一…呵~…"
X2 + d4- 50 . . . (4)
d2++ d3+ + d s" - ds+ = 80..... (5)
X\ , X2 , d\- , d\\d 2-, d 2+, d 3-, d 3+, d4 -, ds- , ds+去。
x\ 65
X2 = 50
d\- = 49000
d2+ = 45
d3+ = 35
other deviation variables = 0
In solving a prioritized goal programming model , the goal of the highest priority
must firstly be optimized to the fullest possible extent. When no further
improvement is possible in the highest goal , we then optimize the second
highest goal , and so on. Goals of lower priorities must not be optimized at the
expenses of goals of higher priorities. The detailed method for solving a
prioritized goal programming model will be discussed in Chapter 8.
When two goals are assigned the same priority, we must make sure that the units
of measure of the goals are commensurable. In other words , goals can be
assigned to a same priority level only if they can be expressed in terms of a
common unit of measure like priority 4 in Example 7.2; if not , some conversion
has to be devised so that the addition will make sense. This can be
Goal Programmíng Formulatíon 123
Example 7.3
This example is a continuation of Example 7.2. Assume that the number of
priority levels is reduced from four to three such that the profit göal (originally
goal 3) and the avoidance of overtime goal (originally goal 4) are both assigned
a priority of 3. Moreover, suppose that the marginal cost of working one hour
overtime in the woodwork dep旺tment is $75 and that in the painting department
is $65. Modify the model formulated in solution 7.2 to a new model according
to the new conditions.
$olution 7.3
So , priorities 1 and 2 remain the same. Priority 3 now is to achieve a profit
target of $100,000 and to avoid overtime hours. These two things are not of a
common unit of measure , that is , dollars cannot be added to hours in a
meaningful sense. So , some conversion is necessary before these items can be
added.
Since the marginal cost of working one hour overtime in the woodwork
dep缸tment is $75 and that in the painting department is $65 , one hour overtime
in woodwork and that in painting are equiv a1ent to $75 and $65 respectively in
profits. The coefficients in the objective function for goa13 will change to (d1- +
75d2+ + 65d3+) because it is sensible to have profit added to profits. Therefore ,
the new goal programming model is:
subject to
400Xl + 500X2 + d 1- - d 1+ = 100,000 妞.'………一"……一個_....-曰“ ……(1)
Xl + X2 + d3- - d/ = 80 一一 (3)
X2 + d4- = 50 - (4)
124 Linear Optimization in Applications
x\ = 65
X2 = 50
d\- = 49 ,000
d2+ = 45
dt =35
other deviation variables = 0
Example 7.4
A company produces two products 1 and n. The estimated sales for the next
month are 24 units and 8 units of products 1 and n respectively. Each unit of
products 1 and n contributes a profit of $4 ,000 and 5 ,000 respectively. The
man-hours needed to produce each unit of products in two work centres A and
B are given in the following table. The man-hours available of the two work
centres are also given in the table.
Pl: 1imit the production to the sa1es forecast but the limited market should be
as saturated as possible;
P2 : avoid the under-utilization of regular man-hour capacity to maintain stable
employment;
P3 : limit overtime operation as f;訂 as possible.
Solution 7.4
Let Xl = number of product 1 produced for the next month
X2 = number of product n produced for the next month
QQ.aLl: limit the production to the sales forecast but the 1imited market should
be as saturated as possible.
where
d s- under-utilization of overtirne capacity in work centre A
ds+ over-utilization of overtirne capacity in work centre A
dι= under-utilization of overtirne capacity in work centre B
d6 + = over-utilization of overtirne capacity in work centre B
subject to
X1 + d 1- = 24 .......-一一一一。"一…一一一一一…一一 一 (1)
X2 + d 2- = 8 月一 - (2)
d戶 20
Example 7.5
A company's management is considering undertaking three plans 1, II and III. A
plan must be either selected or rejected (i.e. partial adoption of a plan is not
allowed). The plans are of two ye缸s duration and the budget allowed for each
year appears to be insufficient to support all the three plans. The net profit ,
market share and the cost of each plan are given in the following table:
The allowable total budget for year 1 is 10 units , while that for year 2 is 9 units.
It is required that these budget levels should not be exceeded. The company's
management considers that profit maximization is most important. The second
important consideration is that the market shares should be within the limits as
128 Linear Optimization in Applications
Solution 7.5 ,且
h == plan 1 is adopted
,Ea--
xx
nu'AAU
-A
plan 11 is adopted
弓h
,
Bl!d斟
fuúï1
The profit goal can be expressed as:
8x\ + 4X2 + 9X3 + d3- - dt = 21 一一一一一一一一一一一一一…一 (3)
where
d 3- = under-achievement of profit goal
d 3+ over-achievement of profit go a1
The objective is to minimize P\d3-. The RHS value of 21 in constraint (3) is the
sum of the net profits of the three plans.
Market share
The market share can be expressed as:
5x\ + 3X2 + 3X3 + d4- - d/ = 11 (4)
where
Goal Programming Formulation 129
The objective is to minimize P2<4+. The RHS value of 11 in constraint (4) is the
sum of the market sh訂的 of the three plans.
subject to
7Xl + 2X2 + 5X3 + d 1- = 10 (1)
X1 , b
-
X3={;;dl\ d 2 , d3- ,趴缸,也+言。
Exercise
items of product 1 and 350 items of product 11 can be sold in a day. The
contribution of 1 is $20 per item and that of 11 is $15 per item.
The factory manager has the following goals arranged in the order of
decreasing priority:
P 1 : the number of products should never exceed the predicted market
demand;
P2 : the total profit should be maximized;
P3 : the overtime operation of the assembly line should be minimized;
P4 : the limited market should be as saturated as possible (i. e. sell as many
products as possible).
Example 8.1
Solve the following goal programming model:
Min P1dt + P2d4- + P3dl- + P4d2+ +肌肉+白白白白白白 的.........._.一 "“ (0)
subject to:
400Xl + 500X2 + d 1- - d 1+ = 100,000 (1)
Xl + 2X2 + d2- - d2+ 120 . . . (2)
X2 + d4- = 50 . . . . . . . . (4)
d2+ + d3 + + d5- - d5+ = 80 (5)
Solution 8. 1
We will use the revised simplex method (Appendix B) to solve this mode1. The
solutioning process will be discussed step by step.
品且i
As there are five constraints , there wi1l be five basic variables. The negative
deviation variables , dj - , are analogous to slack variables (for absolute goals) or
artificial variables (for non-absolute goals) in linear programming models (see
Appendix C). In other words , dj - always appe訂 as the basic variables in the
initial goal programming tableau. In this example , the initial tableau is shown in
Fig.8.1.
132 Linear Optímízatíon ín App1ícatíons
the bottom (see Appendix B). In goal programming, however, we omit the Zj
row in order to simplify the tableau. It requires a little more ca1culation in our
heads. Moreover, instead of having one Cj -月 row as in linear prograrnming,
we now have four rows 丸, P3' P 2 and P\ ofCj - 系 values arranged in increasing
order ofpriority.
坐盟主
In the RHS column , we simply put down the Zj value and not the Cj - Zj value.
In this column ,有 is 100000P3 + 50P2. Hence , we put 50 at the P2 row and
100000 at the P3 row.
Then , we calculate the RHS/~j values and determine the leaving variable. Since
50 is the smallest positive RHS/~j value , d4 - is the leaving variable.
S且主
As d4- is leaving and x2 is entering, the basic variables now are d t-, d 2- , d3-, x2 and
ds-' They must be expressed in terms of the non-basic variables x t, d t+ , d/ , d3+ ,
也- and d/ . To do so , readers should revise the examples given in Appendices A
and B. The second goal programming tableau is shown in Fig. 8.3.
X2 O O O O O O O O O O 50
且
=α2
O
ds O O O O O O O O 80
也 =α3
。
C j - Zj P4 O O O O O O O O O O
益也」生
Then, we express the basic variables d 1\ Xl , d3-, X2 and d5- in terms of the non-
basic variables d 1+, d 2-, d2+, d 3+, d4 - and d 5+. The third go a1 programrning tableau
is shown in Fig. 8.4.
X , O O O O O O -2 O O 20 -20
d3' O O O O O G 。 O 10 @
O O O 50
X2
。 O O O O O O 00
d5 O O O O O O O O 80 80
Cj- Zj P4 O O O O O O O O O O
P3 O O O 400 ~ 0 。 -300 O O 67000
P2 O O O O O O O O O O O
P, O O O O O O
。 O O O O
品盟主
By similar reasoning , d 3- is leaving and d2+ is entering. We can obtain the fourth
goal programming tableau as shown in Fig. 8.5.
Basic X , X2 d,' d,+ d2' d2+ d3' d3+ d4' d5' d5+
旦旦益
Variable Cj P,
RHS
O O P3 O O P4 O P4 P2
。 aij
d,' P3 O O O O -400 400 -100
。 O 63000 1575
X , O O O O O O O O 30 -30
d2+ P4 O O O O O O 10 -10
X2 O O O O O O O O O O 50 00
d5' O O O O O O @ 70 @
Cj- Zj P4 O O O O O 2 O O 10
P3 O O 4∞ @ 100 63000
O O O O
。
P2 O O O O O O O O O
。 O
P, O
。 。 。 。 。 。 。 O
。 。
Fig. 8.5 Fourth goal programming tableau
136 Linear Optimization in Applications
起且豆
This time , d s" is leaving and d/ is entering. The fifth goal programming tableau
is shown in Fig. 8.6.
X\ O O O O O O 二2 65
2 2 2 2 2
d2, + P4 O O O O O 45
2 2 2 2 2
X2 O O O O O O O O O O 50
d:
3 P4 O O O O O i 35
2 2 2 2 2
只- Zj P4 O O O O O O O O O 80
P3 O O O 200 O 200 O -100 200 -200 49000
P2 O O O O O O O O O
。 O
P\ O O O O O O O O O O O
Fig. 8.6 is the final tableau. If we examine rows P\ and P 2, there is no negative
coefficient. Row P 3 has the most negative coefficient -200 in column d/.
However, under -200, we have a positive coefficient in row P\. We therefore
cannot further optimize P 3 at the expense of P \. The next most negative
coefficient in row P 3 is -100 (in column d4l Under -100 we have a positive
coefficient in row P 2 and so we cannot further optimize P 3 at the expense of P 2.
Then , we move to row P 4. There is a negative coefficient in this row under
column d s". However, a positive coefficient is under it (in row P 3). Hence we
cannot further optimize P 4. Consequently, the optimal (final) solution ìs
achieved. The answer is as follows:
d\" = 49 ,000
x\ = 65
d/ = 45
x2 = 50
d/ 35
other deviation variables (non-basic) 0
Goal Programming Solution 137
Solution 8.2
Cj - Zj P4 O O O O O O 4 O O
。
P3 -3 O O O 3 。 O O 2800
P2 O O O O O O
。 O O O
P\ -2 O O O O 6400
O
。 O
In the initial tableau (Fig. 8.7) , Zj value for the X1 column is 5P 1 + 3P3. Cj value
in the X1 column is O. Hence , Cj - Zj value for this column is -5P 1 - 3P3. So , we
put -5 at the P 1 row and -3 at the P3 row in this column.
有 value for the d 3+ column is -P3. Cj value in this column is 4P4. Therefore ,
Cj -:2日 value is 4P4 - (-P3) or 4P4 + P3. Hence , we put 1 at the P3 row and 4 at
the P4 row in the d3+ column.
138 Linear Optímizafion in Applicafions
In this way, we can compute the Cj -氧 values for all rows P) , P2' P3 and P4 in all
columns. x) is the entering variable because it corresponds to the most negative
value -5 in row P) . d2• is the leaving variable because it corresponds to the
smallest positive RHS/ajj value 800. The second tableau is:
Basic X , X2 d d
,+ d2 d2
,+ d3 d'+3 d4
•
dJ
RHS RHS
Variable Cj O O P, O 3P 3 P4 P3 4P 4
O P2 aij
d: P, O 2 -5 5 O O O O 2400 一
24一0一
Q =480
5
X , O O O O O O O
。 800 一
80一
Q = -800
d3 P3 O O O O O O O 400 且旦=∞
。
d4 O O O O O O O O 100 呼='.}凹
P4 4
C j - Zj O O O O O O
。 O O
P3 O O O 3 O O O O 400
P2 O O O O O
。 O O O O
P, O -2 O 5 -5 O O O O 2400
Basic X , X2 d d ,+ d2 d2
,+ d3 d3+ d 4
"
d/
4
RHS RHS
Variable Cj O O P,
。 3P 3 P4 P3 4P
。 P2
→3且ι
4
d: P, O 2 -5 O O O -5 5 1900 80
X
, O O O O O O O 900 -900
d3 ‘
P3 O O O O O O O 400 α3
d2 ,+ P4 O O
。 O O O
。 100 -100
C j - Zj P4 O O O O O O O 4 100
P3 O O O 3 O O O O 400
P2 O
O O O O O O O
。 O
P, -5 1900
'---
O -2 O 5 O O
。 5
Basic ,
X X2 d.- d ,+ d2- d2+ d 3- d3,+ d4- d4+
RHS RHS
Variable q O O P , O 3P3 P4 P3 4P4 O P2 且
一旦
dJ P2 O 2
5 5 5 。 O
。 380 950
X, 。 2
5 5 5
O O O O O O 1280 3200
d3 P3 O O O O O O O 400 400
dz+ P4 O 2
5
i
5 5
O O
。 O 480 1200
Cj . Zj P4 O -2 O O 4 O O 480
5 5 5
P3 O O
。 3 O O O O 400
P2 O O O O O 380
5 5
P O O
, O O O O O O O O
一一一一
Basic X
, X2 d.- d ,+ dj d2+ d3 - dJ d4- d/
旦HS
Variable Cj O O P O 3P 3 P4 P3 4P 4 O P2 RHS
, aij
dJ P2 O O O 三Z5iz5 t .1 220 550
5 5
X , 。 O
5
O
。
-2
5
2
5
O O 1120 2800
5
X2 O O O O O O O O 400 -400
Cj - Zj P4 O O O 2 18 O O 320
5 5 5 5
O
P3 O O O O 3 O
。 O O
P2 O O i O 2 O 220
5 5 5
P , 。 O O O O O O
。 O
。
X2 O O
2 2
-5
2
O O
。 -5
2
5
2
950
100
d:
2 P4 O O O O
。 O O
C j - Zj P4 O O -2 10 O 4 O 9 -9 2300
2
P3 O O O O 3 O O O O O
P2 O O O O O O O O O O
P\ O O O O O O O O O O
The sixth tableau (Fig. 8.12) is the final tableau because there is no negative
value in any row (曳, P 2' P 3 or P 4) without having a positive value below it. The
optimal solution is:
d3 + = 550
x) = 900
x2 = 950
d2+ = 100
other deviation variables (non-basic) = 0
Example8.3
Use a linear programming software package to solve the goal programming
model of Example 8.2.
Solution 8.3
The goal programming model is:
Min P1d 1- + P2d/ + 3P3d2- + P3d3- + P4d 2+ + 4P4d3+ “一一一一一一一 (0)
subject to
5Xl + 2X2 + d 1- - d 1+ = 6400 ………………一一…………一個白 "“-_.._........-個且 曰“(1)
品且i
subject to
5Xl + 2X2 + d 1- - d1+ = 6400 (1)
Xl + d2- - d2+ = 800 (2)
X2 + d 3- - d 3+ = 400 一 (3)
坐盟主
Then, we optimize P2. The linear programming model in this step is:
nu
',.、
、‘
Min d4+
.y
subject to
5x) + 2x 2 + d)- - d)+ = 6400 (1)
x) + d 2- - d/ = 800 (2)
x 2 + d3- - d/ = 400 (3)
d/ + d4 - - d/ = 100 (4)
d ,- =0 (5)
The result is that the minimum value of the objective function is O. Similarly,
we now add an additional constraint (d4+ = 0) to the model and then optimize P 3.
坐且主
起且二t
Lastly, we optimize P 4 • The model is:
Goal Programming Solution 143
The solution of the above model is the optimal solution for our goal
programming mode l. The result is:
d/ + 4d/ = 2300 (i.e. value ofP 4 )
X) = 900
x2 950
d/ 100
d/ 550
all other deviation variables 0
Readers can compare this result with the one (Fig. 8.12) obtained in Example
8.2.
Exercise
1. Solve , using goal programming tableaus , the following model:
Min P)d)- + P2d/ + 5P 3d2 - + 3P3 d3- + P4d)+
subject to
x) + x2 + d)- - d)+ = 90
x) + d2- 80
x2 + d3- = 50
d) + + d4 - - d/ = 10
subject to
562
<一<一<一
ζJAUOO
xxx +++
丹、
句IOOA
XXXAUAUnu
。(1)
9 臼勻,
vA
且可丹、
一一一一…一一一一一一一一一一一一一一一 (2)
b?
且可
。..... (3)
v
Xl , X2 ~ 0
S且i
Now , we can write equations (Oa) , (1 a) , (2a) and (3a) in the form of a simplex tableau
as follows:
146 Linear Optimization in Applications
Note that when non-basic variables are equal to 0 , the basic variables are equal to
RHS respectively.
品且J已
The next step is to find the entering variable , which is defined as the variable which
corresponds to the most negative coefficient in row (0) of the simplex tableau. In our
case , x 1 is the entering variable because -10 is most negative in row (0).
Now , we can add one more column to our simplex tableau called "RHS/aij" column.
This column shows the quotients as a result of the division of the RHS figures by the
coefficients in the column corresponding to the entering variable for each row except
row (0).
(2a) 這〉
。 4
。 。 800
于封:1,笠:多
(3a) 鎧.Q =240
S3
。 3
。 。 480
2
Initial simplex tableau (b)
Next, we have to determine the leaving variable, which is defined as the basic
variable which corresponds to the smallest non-negative RHS/aij value. In our case ,
也 is the leaving variable because 133.3 is the smallest non-negative value in the last
column.
品且2
Then , the initial simplex tableau has to be transformed to a second tableau. Because
XI is entering and S2 is leaving , therefore the basic variables of the second tableau will
AppendixA 147
The above algebraic transformation can easily be done by transforming (2a) into (2b)
and then substituting (2b) into (Oa) , (1 a) and (3a) as follows:
Aυ
kU
/a
、‘.r,
﹒、
Z =lm3+fx2.fS2
hu
/'.‘、、
、‘.r
S, X7 +三6-S?
--
83.33 + 1.3- ••
a
,
W W
S3 = 2 的 3.fx2+fS2 (3b)
So , we can see that Z , x ., S. and S3 are expressed in terms of X2 and S2. Now , we
write these four equations in a form suitable for entry into the simplex tableau:
QUKU
、‘.',
i- 、
Z -fx2+fS2= 的 3
../ KU
、‘'F,
',且
-fxz+S1.ZS2=8333
、
Then , we enter equation (Ob) , (1 b) , (2b) and (3b) into the simplex tableau. This is the
second tableau after the first iteration:
品且且
Similarly , we know this time the entering variable is X2 and the leaving variable is S3.
Hence , we continue with the second iteration , that is , to express the basic variables Z ,
缸, Xl and X2 in terms of the non-basic variables S2 and S3. This can be done by
substituting (3b) into (Ob) , (l b) and (2b). (See step 3.) The result is:
Then , we enter (Oc) , (l c) , (2c) and (3c) into the third simplex tableau:
品且三
When there is no negative coefficient in row (0) , the optimal solution is achieved and
no further iteration is necessary. When non-basic variables are equal to 0 , the basic
AppendixA 149
variables are equal to the values of the RHS column. Therefore , the optimal solution
IS:
subject to
的
拍拍拍
〉一>一>一
++ ?-1db
++J
正UA
F
vdvd
、J
(2)
d
蓋起立i
Introduce also a very large value M as the coefficients of Al and A2 which are added
to the objective function such that:
益卑.2
Before putting (Oa) , (1 a) and (2a) into a simplex tableau , unlike the maximization
problem, we have no convenient way but to eliminate Al and A2 in equation (Oa) by
substituting (1 a) and (2a) into (Oa) as follows:
150 Linear Optímízatíon ín Applícatíons
Simplifying , we obtain:
J'
、-E/
+MS 1 +扎1S 2
‘、
It can be observed that in (Ob) , (l b) and (2b) , P , AJ and A 2 are expressed in terms of
Yl' 吭,吭, SI and S2. Therefore, we can treat P , A 1 and A 2 as the basic variables. We
now rewrite (Ob) , (1 b) and (2b) in a form suitable for entry into a simplex tableau:
坐盟主
The entering variable this time (for minimization problem) is the variable which
corresponds to the most positive coefficient in row (0). In this case , Y2 is the entering
variable because (10M - 800) is most positive since M is a very large number. The
AppendixA 151
The next simplex tableau will therefore have P , y2 and A 2 as basic variables which can
be expressed in terms of non-basic variables yl ,狗, Sl , S2 and A 1. This can be
achieved by algebraic transformation involving the substitution of (1 b) into (Ob) and
(2b). (See step 3 ofExample 1). The result is:
∞
M-+-3nu-
AHT-
A
斗-
(Oc)
5 1 _ 1. 5
言 YJ + Y2 +了 Y3 -τSJ +τAJτ (1 c)
5 2 (2c)
.一 YJ + -::;- Y3 + ~ SJ - S2 - ~ AJ + A2 =一
3" 3 0
3
Then , we enter these three equations into the second simplex tableau:
;山
(1 c) Y2 O 主 斗 O i O 主 5
6 6 6 3
(2c) @ O 4
3
2
3
-1 二主
3
生
3
@>
Second simplex tableau after one iteration
品且正生
In the next iteration , y3 will be the entering variable because it has the most positive
coefficient in row(O) and A 2 the leaving variable. So , in the next tableau , P , y2 and y3
will be the basic variables. By substituting (2c) into (Oc) and (1 c) , we obtain:
We then enter (Od) , (1 d) and (2d) into the third simplex tableau:
Basic P Y1 Y2 Y3 SI S2 Al A2 RHS
variable
- (M-48) - (M-128)
(Od) P -126
。 。 - 48 -128
0 .3 - 0.2
1504
(1 d) Y2 。 0.9
。 - 0.3 0.2
-0 .4 0.6
1.4
(2d) Y3 。 - 0.2
。 0 .4 - 0.6 0.8
Third (final) simplex tableau
品且主
When there is no positive coefficient in row (0) , the optimal solution is reached and
no further íteration is necess訂y. The optimal solution is:
subject to
Xl , X2 這 O
包且1:
The revised simplex tableau is a little more complicated than the conventional tableau.
The following is the initi a1 revised simplex tableau with equations (1 a) , (2a) and (3a)
entered in i t:
Basic Xl X2 SI S2 S3 RHS
RHS
Variable Q aij
(1 a) SI 5 3
。 。 750
(2a) S2 6 4
。 。 800
(3a) S3
2月
2 3
。 。 480
Cj -:2月
紅包1
Then, we fill in the Cj row. The Cj values are the ∞c。ev伍
ficien
帥 in the objective
function. N闕, we fill in the Cj column. These are the Cj asso叫ed with the basic
variables only (S\ , S2 and S3 in this case). Now the tableau looks like the following:
Basic x\ x2 S\ S2 S3 RHS
Cj RHS
Variable 10 8
。 。 。 ~
(la) S\
。 5 3
。 。 750
((23aa))SS23 。 6 4
。 。 800
。 2 3
。 。 480
月
Cj - Zj
Next , we have to fill the Zj row. To do it we multiply each ofthe a;j values by the Cj
ofthe i th row and add the products for each column. For example:
After Cj row is filled , we then fill the Cj ﹒再 row. Its value is found by subtracting 罵
的m the corresponding Cj at the top ofthe tableau for each column. For example:
高
。 2 3
。 。 480
Cj - Zj
。 。8 。 。 。 。
10
。 。 。
Initial revised simplex tableau (c)
益盟主
The entering variable is the variable which corresponds to the most positive value in
the Cj - Zj row. 10 is the most positive in our case and therefore x 1 is the entering
variable. The leaving variable is the basic variable which corresponds to the smallest
non-negative RHS/~j value. In our case, S2 is the leaving variable because 133 .3 is
the smallest non-negative RHS/~j value.
Basic x1 x2 SI S2 S3 RHS
Cj RHS
Variable 10 8
。 。 。 ~i
(la) 、 SSL1 。 3
。 。 750 150
133.3 、
((23aa))S3 。 4
。 。 800
240
。 3
。 。 480
月
。 。8 。 。 。 。
C1. 氧
。 。
(1 0 、
。
Initial revised simplex tableau (d)
包學J生
Then, the initial tableau has to be transformed to a second tableau. In the second
tableau,丸, X 1 and S3 wil1 be the basic variables. The transformation (or called
iteration) is done by substituting (2a) into (1 a) and (3a). (For details see step 3 of
Example 1 of Appendix A.) Now we have:
Then, we establish the second revised simplex tableau and compute all the 焉, Cj -再
Basic x1 x2 SI S空 S3 RHS
Cj RHS
Variable 10 8
。 。 。 到』
(1 b) SI
。 。 3
二三
6 。 83.33 -250
(2b) x 1 10
。 。 133.33 200
2
3 6
(3b) S3
。 。 主
。 3
213.33 128
Z
10 IQ
3 。 5
3 。 1333.3
。 。 。
4
q -氧 3
-5
3
益也主
In the second revised simplex tableau , the entering variable is X 2 because it
corresponds to the most positive value in the Cj -月 row. The leaving variable is S3
because it corresponds to the smallest non-negative RHS/ a;j value. In the second
iteration , we substitute (3b) into (lb) and (2b) and obtain the following equations:
Then , we enter (1 c) , (2c) and (3c) into the third revised simplex tableau and compute
all the Zj and Cj - Zj values:
AppendixB 157
Basic Xl X2 Sl S2 S3
Variable q 10 8
。 。 。
(1 c) Sl
。 。 。 -0.9 0.2 126 I
(2c) Xl 10
。 。 0.3 -0 .4 48
(3c) X2 8
。 。 -0.2 0.6 128
有 10 8
。 1.4 0.8 1504
Cj - Zj
。 。 。 -1. 4 -0.8
Third (final) revised simplex tableau
品且.6
When there is no positive values in the Cj - Zj row , the optimal solution is achieved.
The basic variables are equal to their corresponding RHS values while all non-basic
variables are equal to O. Therefore , the optimal solution is:
Min P == 750Yl + 800Y2 + 480Y3 一… ~...._......._......._.~ “ 心的… ……四 "一… ._._.....ω (0)
subject to
yl , y2 , y3 ~ 0
品且i
Introduce also a very large value M as the coefficients of At and A2 which are added
to the objective function such that:
品且2
口 f\、2主1/
(1 a) (A I ) M 5 2
。 。 10
(2a) A2 M 3 3
。 。 8 2
Zj 8M 10M 5M -M -M M 扎f IBM
Cj -Zj 750 /':、哭函吵b
吵\/ 480 M M
。 。
-8M \dOM/ -5M
Initial revised simplex tableau
For minimization problems , the entering variable is the variable which corresponds to
the most negative value in the Cj - Zj row. Therefore , y2 is the entering variable. The
leaving variable is the basic variable which corresponds to the smallest non-negative
RHS/aij value. Therefore , At is the leaving variable.
品且主
Then , the initial tableau has to be transformed to a second tableau in which y2 and A2
will be the basic variables. Such an iteration can be done by substituting (1 a) into (2a).
By doing so , we obtain:
26 , + ,ikuA =
23
14 司3
'。
+ +
c1日
vd .-LU ..
/'‘、
-E且
VJ VJ
司、
勻b
,/
,
-iyl+EY3+ZSl-S2-?Al+A2=
3 J
3 '3-' 3 JJ
是 …一一…………一一一一一一 (2b)
Appendix B 159
Basic YI Y2 Y3 SI S2 AI A2 RHS
RHS
750 480 aij
800
。 。 M
Variable Cj 卸f
主 斗 i 主
(l b) Y2 800 O O 5
6 6 6 3
(A~ 2 二2
斗 是
(2b) M O
3 3 3 3
主∞Q二凶 800 皇∞:t5.且進∞土主凶 -M 組Q.:2凶 M 組∞且凶
Zj 3 3 3 3 3
Cj-Zj
750
+ 世斗∞Q 08叫
3
M 也 O
3
」
Since M is a very large nurnber , Y3 corresponds to the rnost negative C j - Zj value , and
hence it is the entering variable. A2 is the basic variable which corresponds to the
srnallest non-negative RHS/aij va1 ue , and so it is the leaving variable.
品且且
The third tableau will have Y2 and Y3 as basic variables. Therefore , in this iteration ,
express Y2 and Y3 in terrns of non-basic variables YI , SI ,缸, AI and A 2. This is
accornplished by substituting (2b) into (1 b). After doing so , we obtain:
Basic YI Y2 Y3 SI S2 AI A2
RHS
Variable C 750 800 480
。 。 M M
(lc) Y2 800 0.9
。 -0.3 0.2 0.3 -0.2 1.4
Cj -Zj 126
。 。 48 128 M -4 8 M-128
品且主
When there is no negative values in the Cj -有 row, the optimal solution is reached.
The basic variables are equal to their corresponding RHS values while all non-basic
variables are equal to O. Therefore , the optimal solution is:
E旦旦且已
包車且已主主
。 。 。
Variable Cj 5 6 .恥f aij
A1 -M
。 。 。 7 C幻
S2
。 。 。 。 。 4 00
S3
。 。 。 。 。 2 2
Zj
。5 。 。 。 。 。 。
Cj - Zj 6
。 。 。 -M
Fig. D 1 Initial simplex tableau for Example 1
Basic Xl X2 SI S2 S3 A1 RHS
Variable Cj
.恥f
5 6
。 。 。 -M
A1
。 。 。 3
Xl 5
。 。 。 。 4
X2 6
。5 。 。5 。 2
ZJ 6
。 6 -M 32-3M
Cj - Zj
。 。 。 -5 -6
。
Fig. D2 “ Final" simplex tableau for Example 1
F
mdxb
EO>
e<
、d
(0)
弓,
M
一>-
(1)
+.r
(2)
一
If the graphical method is used and a graph is drawn , one will see that the feasible space
continues without limit in the X2 direction. The objective function therefore can move
without limit away from the origin. In this situation we say that the optimal solution is
unbounded. If the simplex method is used to solve the problem , the initial and “ final"
tableaus are shown in Figures 03 and 04.
Basic Xl X2 Sl S2 A2 RHS
RHS
。 。
Variable Çj 8 5 .恥4 aij
Sl
。 。 。 。 4 4
A2
月
-M
。 3 3
Cj-勾
。8 。5 。 。 。 。
Fig. 03 Initial simplex tableau for Example 2
。 。 -M
Basic Xl X2 Sl S2 A2 RHS
RHS
。 。
Variable Cj 8 5 -M aij
S2
。8 。
Xl
。 。 。 4 00
勾
Cj-勾
8 8
。5 。 -M 32
。 -8
Fig.04 “ Final" simplex tableau for Example 2
。 。
The “ final" tableau shown in Fig. 04 shows th到 there is still a positive value in the (C j -
Zj) row , but in the RHS/aij column there is no finite positive value. It means that there is
no leaving variable , and the simplex method cannot continue. This indicates an
unbounded situation.
This example is a modification of Example 1. 1 of Chapter 1. For the above model , all the
three resources (storage space , raw material and working hours) are fully utilized at the
optimal solution. For such a case , in the final or optimal simplex tableau , there is a basic
variable with a zero value (see Figure 05). This corresponds geometrically to the fact
that in Figure 1.1 of Chapter 1 three lines are passing through Point A rather than usually
two. The phenomenon is known as degeneracy.
Basic Xl X2 Sl S2 S3
RHS
Variable q 10 8
。 。 。
Sl
。 。 。 -0.9 0.2
。
Xl 10
。 。 0.3 -0 .4 48
X2 8
。 。 -0.2 0.6 128
1. 4
ZJ 10 8
。 -1. 4
0.8 1504
CJ - ZJ
。 。 。 -0.8
Fig. 05 Final simplex tableau for Example 3
In the above example , when the objective function line moves as far from the origin as
possible , it lies along (or it is parallel to) one of the lines bounding the feasible space.
The two corner points (Xl = 2, X2 = 1) and (Xl = 3, X2 = 0.5) are optimal solutions , having
the same objective function value of 8. If the simplex method is used to solve the
problem , in the final (optimal) simplex tableau , there is a zero value in the (Cj - Zj) row
for a non-basic variable (see Figure 06 , S3 in this case). This is analogous to the zero
value of an improvement index calculated from a transportation tableau (see Chapter 4).
Basic Xl X2 Sl S2 S3
RHS
Variable q 2 4
。 。 。
Xl 2
。 。 -2 2
S2
。 。 。 2
X2 4
。 。 。
zj -2 -4 2
。 。 8
Cj - Zj
。 一一
。 -2
。 。
Fig. D6 Final simplex tableau for Example 4