Władysław Tomaszewski
Heuristic Solving Linear
Programming Problems
Annales Universitatis Mariae Curie-Skłodowska. Sectio H, Oeconomia 18,
285-298
A N N A L E S
U N I V E R S Î T A T I S M A R I A E С U R I Ë - S К Ł O D O W S К A
L U B L I N — P O L O N I A
W ł a d y s ł a w T O M A S Z E W S K I
H e u ristic S o lv in g L in e a r P ro g ra m m in g P ro b le m s
H eu rystyczn e ro zw iązyw an ie p roblem ów program ow ania lin iow ego Э вристическое реш ение проблем линейного программирования
T he e x a c t so lu tio n s of lin e a r p ro g ra m m in g p ro b lem s a re o b tain ed b y m ean s of sim p le x m e th o d an d th e elec tro n ic ca lc u la tin g m achines. T h e p a p e r is aim ed a t sho w in g th a t fin d in g th e a p p ro x im a te so lu tio n s of c e rta in im p o rta n t p ra c tic a lly lin e a r p ro g ra m m in g p ro b lem s by m ean s of h e u ris tic ap p ro a c h re q u ire s u sin g n e ith e r th e so p h istic a te d a lg o rith m n o r th e e le c tro n ic co m p u ter. L e t us n o tice th a t th e a d v is a b ility of su ch a n a p p ro a c h to solv ing lin e a r p ro g ra m m in g p ro b lem s as w e ll as th e p ra c tic a l u se fu ln e s s of th e a p p ro x im a te so lu tio n s h ad b een fir s t e m p h a sized by L. V. K a n to ro w ic z (1).
T he p a p e r is d iv id ed into tw o p a rts. T he g e n e ra l ex p o sitio n of th e h e u ris tic a p p ro a c h is fo llo w ed b y sev e ral e x a m p le s o f its ap p lica tio n .
1. L e t u s c o n sid er th e fo llo w in g lin e a r p ro g ra m m in g pro b lem :
m ax im iz e th e o b je c tiv e fu n c tio n
VOL. X V III, 15 SECTIO H 1984
Z a k ła d Z a sto so w a ń M a te m a ty k i W y d z ia ł E k o n o m ic z n y U M CS S = X TR (
1
) s u b je c t to A X + Y = P0 (2) (3
) (4
) w h e reX — th e co lu m n v e c to r ( n X l ) of th e decision v aria b les, X T — th e tra n sp o sitio n of th e v e c to r X,
286 W. T om aszew sk i
Y — th e c o lu m n v e c to r ( m X l ) of th e slack v a ria b le s,
R — th e co lu m n v e c to r ( n X l ) of th e o b je c tiv e fu n c tio n p a ra m e te rs , A — th e m a tr ix ( m X n ) of th e coefficien ts,
P 0 — th e co lu m n v e c to r ( m X l ) of th e co n stan ts.
A ssu m in g t h a t som e co e fficien ts in th e m a trix A a re eq u al to zero 1 th e a p p ro x im a te s o lu tio n of th e p ro b le m (1)— (4) can be fo u n d b y m ean s of th e fo llo w in g h e u r is tic p ro c ed u re :
a) F in d in g th e f irs t so lu tio n :
— cho osing th e fir s t seq u e n ce of th e decision v a ria b le s:
on th e basis of w h e re ajj — th e e le m e n t of th e m a tr ix A s ta n d in g in th e i- th ro w a n d th e j- t h co lu m n , bi — th e i- th e le m e n t of th e v e c to r P Q. — fin d in g th e v e c to r of th e co n sta n ts: w h e re Pj — th e j- t h co lu m n v e c to r of th e m a tr ix A co rre sp o n d in g w ith th e v a ria b le xf
1 Let us n o tice th at it das not pay to u se the h eu ristic approach w h en there are all c o efficien ts bigger th a n zero in th e m a trix A.
w h e re
j e N
N — th e se t of th e d ecisio n v a ria b le s s u b sc rip ts rj — th e j - t h e le m e n t of th e v e c to r R.
H eu ristic Solvin g L inear Program m ing Problem s — fin d in g th e m a x im u m v a lu e of th e v a ria b le x2 : 2 I K b 2 b m' \ max. x : = ---, ... \ a ] j a 2j mj I w h e re w h e re P? — th e j- th co lu m n v e c to r of th e m a trix A co rre sp o n d in g to th e v a ria b le xf — fin d in g th e m a x im u m v a lu e of th e v a ria b le x ? w h e re Pj1 — th e j- th co lu m n v e c to r of th e m a tr ix A co rre sp o n d in g to th e v a ria b le xj1
— fin d in g th e v a lu e s of th e slack v aria b les:
b) F in d in g th e second solution:
— choosing th e se c o n d .s e q u e n c e of th e decision v a ria b le s on th e b a sis of th e f ir s t seq u e n ce a n d th e re s u lts of th e firs t so lu tio n 2
2 The w a y of p erform ing that operation w ill be further e x p la in ed w h en so lv in g an ex a m p le below .
w h e re
2 8 8 W. T om aszew sk i
— p e rfo rm a n c e of th e o p e ra tio n s sh o w n abo ve w h e n lo o king fo r th e fir s t solution.
(s) Finding the s-th solution 3 in th e w a y sh o w n above.
( s + 1 ) C hoosing th e a p p ro x im a te so lu tio n of th e p ro b le m (1)— (4): — fin d in g th e a p p ro x im a te m a x im u m v a lu e of th e o b je c tiv e fu n c tio n on th e basis of
pXt (p = 1, 2, ..., s) — th e v e c to r ( lx n ) of th e v a lu e s assig n ed to th e decision v a ria b le s in th e p - th so lu tio n
— d e fin in g th e a p p ro x im a te so lu tio n : a ssu m in g th a t th e ap p r. m ax . S h a s b e e n ac h ie v e d in th e p -th so lu tio n th e n th e a p p ro x im a te so lu tio n is g iv en b y th e v e c to rs: pXt an d Y = P q p " w h e re P q p-" ls th e v e c to r of th e c o n s ta n ts o b ta in e d in th e p -th so lu tio n 3. A n exam ple.
M axim ize th e o b je c tiv e fu n c tio n
a p p r. m ax . S = m ax . ^X TR , 2X t R, ..., SX TR) w h e re 4 j =1 s u b je c t to an xi + a i 3x 8 + ai4x4+y1 &22x 2 a 32X2 “t- a.34x 4 a « x i 353X3+ a54X4 + y2 = bj = b2 + Y3 = b3 + y4 = b4 + y5 = b5 Xj > 0 (j = 1 ... 4) y 3+k > 0 (k = 1 ... 5)
3 A s our e x p e r ie n c e sh o w s, at le a st tw o so lu tio n s are n ecessa ry for ch oosin g an ap p roxim ate so lu tio n sa tisfa cto ry p ractically.
H eu ristic S o lv in g L inear P rogram m ing Problem s 2 8 9
(a) F inding th e first solution:
— assum ing th a t z4 > z3 > zi > z2, th en the firs t sequence of the decision variables is as follows:
x 4 x 3 Xi x 2
— assum ing also th a t
. / bx b3 b6 \ bx
max. x4 = mm. --- , ---, 1 =
---\ a14 a34 a54 / a14
“ 0 W a14 b’ b, 0 b3- a 31A — then P01 = P0—X4P4 = b3 a34 = ai4 b4 a*4 0 b4 bs a 54 , W - —* U J b5 a54 ----— a 14 — . / 0 b5—a54 — \ — m ax. x3 = mm. ---, a14 I = L) \ 3,13 I
\
a 53 / . / 0 b4 \ — m ax. Xj = m m. ---, 1 = 0 \ an a41I
I
bj \ b x / b2 b3—a34 \ b3—a34— assum ing th a t m ax. x2 = mm. I , a14 = a14
\ a 32 / a 32 0 b2 , r 0 1 k u 1 b —a 1 b3 ~ a 34 — a 22
,,
„ u3 d34 a14 — th en P01 = P01- x 2P2 = a1 4 --- a32 = b4 a32 0,
b iLo _
a 54 ---_ a 14 _ - 0 -1 r y r b2 a22x2 y2 = 0 = y3 b4 y4 - b5 —a54x4 J L y 5 _ 19 — Annales..,290 W. T om aszew sk i
(b) F inding the second solution:
— as th e second s e q u e n c e of th e decision v a ria b le s w e assum e: x 3 x 4 Xi x 2 b ec au se in th e f ir s t so lu tio n x 2 > 0 a n d x 3 = x j = 0 in s p ite of th a t z3 > Zi > z2. — a ssu m in g th a t x / bl b5 \ b5 m ax. x 3 : m m. --- , 1 = ---' a l 3 a 53 / a 53 bi a13 bj a13x3 b2 ^ 0 b 2 then Pq2 = Pо x3P3 = b3 0 = b3 b4 a53 0 b4 - b5 _ _ a53 _ _ 0 / W а 1зх з b s 0 \ — m ax. x 4 = m m. ---, --- , = 0
\ a14 a34 a54 /
— a ssu m in g n e x t th a t
/ b j—a13x3 b4 \ b4
m ax. Xi — mm. I --- , =
---\ a14 a41 / a41
” bi—a13x3 “i r ai i “| Г bi —(а^Хз+ацХ!)" b2 b 0 b2 — then P”2 = Pq2—XlPj b3 --- -- 0 = b3 b4 &41 a4l 0
_o
J
Lo J
Lo
— an d a s su m in g la s tly th a t ■ ^ - ( a j a x a + a n x j - j Г О ~ b2 ^ a22 t h e n P 0 2 = P 02 x 2 ^ 2 = ^ 3 a 32 = 0 a22 0_o
J
Lo _
. / b2 b3 \ b2 m ax. x 2 — mm. I , 1 =H eu ristic S o lv in g L inear P rogram m ing Problem s 291
(c) C hoosing th e a p p ro x im a te solu tio n : — a ssu m in g th a t
ap p r. m ax . S = m ax . 0 X TZ, 2X TZ) = 2X *Z — th e n th e a p p ro x im a te so lu tio n is as follow s:
L e t us n o tice th a t th e re ^ a re e x a c tly fiv e v alu es la rg e r th a n zero in th e a p p ro x im a te so lu tio n w h ich sig n ify th a t th e so lu tio n is basic.
2. W e s h a ll n o w tu r n to th e a p p lica tio n s of th e p re s e n te d h e u ris tic ap p ro ach . T he n a tu r e of th e f irs t p ro b le m w e a re going to d eal w ith is as follow s:
to fin d su ch p ro d u c tio n p ro g ra m X T = [x1( x 2, ..., x n] w h ich m ax im iz es a p p ro x im a te ly th e o b je c tiv e fu n c tio n an d fu lfills th e co n d itio n s A X < P,O w h e re Wj , nj — th e u n it o u tp u t, in p u t, re s p e c tiv e ly W j ---th e u n it effe c tiv e n e ss n j 19*
2 9 2 W. T om aszew sk i n
E w'x->
j-1 nZ *
-fzi
wE = — --- = — — the average effectiv en ess
\ n z , 11^ i = » i ________ n
S-.
j = i w herew, n — th e average output, input, resp ectiv ely Thus
w h ere
Ea — the m axim um va lu e of the ob jective function,
I Wj V / Wj \ "
^ J ^— - J — the sm allest, largest u nit effectiv en ess, resp ectively
L et us n ow consider the fo llow in g n um erical exam ple: m axim ize the ob jective fu n ction
37xx + 2 8x2+ 30x3+ 2 5x4 + 1 7x5 + 1 8x6 148x2+ 1 22xa + 1 4 0 x 5 + 1 36x4 -f100x5 + 120x6 su bject to Xi + y i r = 8 000 x 2 + y2 = 25 000 90xi + 80x2 + 75x3+ 5 0 x 4+ 5 2 x 5+ 6 0 x 6 + y 3 = 2 870 000 30x! + 20x2 + 20x3+ 18x4+ 4 6x5+ 3 4x6 + y 4 = 775 000 x 3 (j = 1, 2 ... 6 ) > 0 y k (k = 1, 2 ... 4) > 0 (a) F in d in g t h e firs t solution:
— the first seq u en ce of the decision variables is
H eu ristic S o lv in g L inear P rogram m ing Problem s 293
because the u nit effectiven ess indicators rj are
w here
j 1 2 3 4 5 6 rj 25 23 21 18 17 15
rj = [wj/nj] 100
/ 8000 2 870000 775000 — then m ax. xj — min. 1— -— , --- —--- = 31 889, — ——
= 25 833) = 8000 then P01 = Pc- x 1P1 8000 1 0 25 000 - 8 000 0 25 000 2 870000 90 2 150000 775 000 30 535 000
— then m ax. x 2 = min. ^— -/2 5 0 0 0 2150000
80 = 26875 , 535 000 20 ~ = 26750) = 2 5 0 0 0 then P01 P01 x2P2 — 0 0 0 250 00 1 0 —25000 -2 150 000 80 150 000 535 000 20 35000 150000 35000
then m ax. x 3 = min. I— —— = 20000 , ——— = 1 750) = 1750
75 20 then P01 P01 x3P3 —
0
0 150000 35 000 - 1 7 5 0 0 0 75 20 0 0 18 750 0 t h e n x 4 = x 5 = xg = 0 a n d yi 0 y2 0 y3 18 750 y* 0294 W. T om aszew sk i
A s can be in fe r re d fro m th e fo reg o in g d iscussion th e so lu tio n ju s t o b ta in e d can b e a lre a d y c o n sid ered as th e one looked for. T he c o rre s p o n d in g v a lu e of th e o b je c tiv e fu n c tio n is th e m a x im u m v a lu e Ea, assu m in g th a t th e v a lu e s of th e slack v a ria b le s are m in im ized .
T he n e x t p ro b le m to b e co n sid ered h e re is giv en in T ab le 1. W hen so lv in g it, le t u s f ir s t n o tic e an d ta k e a d v a n ta g e of its sp ecific s tru c tu re . N a m e ly , th e s e t of 16 decisio n v a ria b le s can be d iv id ed in to tw o p a rts. To th e f ir s t p a r t belong th o se v a ria b le s v a lu e s of w h ic h m a y be d e te r m in e d in d e p e n d e n tly on th e b asis of o n ly one a p p ro p ria te c o n stra in t:
x5
(2)
x 6, x 7, x 8^ x 10, X u , x 16 ( 3 ) 4>
Xl2 (5)
a n d to th e second p a r t th o se re m a in in g , v a lu e s of w h ic h ca n n o t be fo u n d in s u c h a w ay :
(a) F inding th e valu es of th e decision variables belonging to the first category:
120
— m ax . x5 = - ^ - = 2 an d y 3 = 0
322
— m ax . x 12 = = 10 a n d y 5 = 0
— th e se q u e n c e of th e v a ria b le s x 6, x 7, x 8, x i0, Xn, x i6 is as follow s:
j 16 6 7 8 11 10
b ec au se th e s ta n d a rd iz e d p a r a m e te rs of th e o b je c tiv e fu n c tio n are
j 6 7 8 • 10 11 16
ej 0,028 0,025 0,0224 0,016 0,0215 0,085
w h e re ej = r-j/a2j
w h e re rj — th e j - t h p a r a m e te r in th e o b je c tiv e fu n c tio n ,
a2j — th e j - t h c o e ffic ie n t in th e second c o n stra in t. 2430
— h e n c e m ax . x 16 — ——— — 30
a n d x 6 = x 7 = x 8 = xio = x u = 0 a n d y 2 = 0
H eu ristic S o lv in g Linear P rogram m ing P roblem s 2 9 5
(b) D eterm ining the values of the variables belonging to the second category: — to m a x im iz e F ' = 0,88x 1+ 1 ,9 4 x2 + 3 ,8x3 + 5, 4 4 x 4 + 6 ,8 6 x 9 + l , 9 4 x 134 - 1 0 ,5 x i4 + 1 0 ,9 3 x i5 s u b j e c t to (1) 8 9 , 3 x ! + 1 6 4 x 2+ 1 3 2 , 2 x 3+ 1 9 9 ,7x4+ 5 0 1x9 + 6 7 ,6 x ia + 6 0 3 ,6 x i4 + 4 6 9 ,3 x 15+ + y i = 3424 (
4
) (6) ( 7 ) 1 6 X i + 49,93x9 1 6 , 1 1x3 + 3 3 , 8 3x4 + 2 6 ,0 4x i4+ 2 6,04 xi5+ + y 4 = 4 6 + Ye = 35 + y 7 == 20 — t h e s e q u e n c e o f t h e d e c is io n v a r ia b le s is X3 Xi 3 X4 X15 x14 x9 X2 X i b e c a u s e t h e s ta n d a r d iz e d p a r a m e te r s o f t h e o b je c t iv e f u n c t io n a re j 1 2 3 4 9 1 3 1 4 1 5 f j 0 , 0 1 0 0 , 0 1 2 0 , 0 3 0 , 0 2 7 0 , 0 1 4 0 , 0 2 8 0 , 0 1 7 0 , 0 2 3 v w h e r e fj = rj/aij w h e r e aij — th e j - t h c o e f fic ie n t in t h e f ir s t c o n s t r a in t / 3 424 35 \ — m ax. x 3 = m in. --- = 25,9 , = 2,17 = 2,17 \ 132,2 16,11 / 3 424 132,2 3 137,13 _ P' = P _ x P = 46 - 2 1 7 ° = 46 o 0 3 3 35 ’ 16,11 O 20 O 202 9 6 W. T om aszew sk i с о ■+•>о С 3 чч и О) 0 r Q cd <ы f-t 1 Л+-> шN 1 Й Л а о Еч
H eu ristic S o lv in g L inear Program m ing P roblem s IQZ — m a x . x 13 = 3 137,13 67,6 = 46,41
P
0—Po
Xi3Pi3 — 3 137,13 46 0 20 -46,41 67,5 0 0 46 0 0 0 20 — h en c e x j = x 2 = x 4 == x 9 = X u == x 15 = 0 Vi 0 y4 46 y6 0 y? 20 T a k in g in to ac co u n t th e sho w n specific s tr u c tu r e of th e p ro b le m an d th e p e rfo rm e d s ta n d a rd iz a tio n of th e o b jectiv e fu n c tio n p a r a m e te rs w e s h a ll assu m e as th e a p p ro x im a te so lu tio n th e one ju s t o b tain ed :x 3 = 2,17 x 3 = 2 X12 = 10 x 13 = 46,41 x 16 = 30
y4 = 46 y 7 = 20
L e t u s n o tice m o re o v e r th a t th e o u tlin e d h e re g e n e ra l id e a of th e h e u r is tic so lv in g lin e a r p ro g ra m m in g p ro b lem s h a s — as o u r e x p e rie n c e p ro v e s — m a n y a p p lic a tio n s of p ra c tic a l im p o rta n c e , e. g. in fin d in g th e p ro d u c tio n a s s o rtm e n t a t th e fa c to ry level.
BIBLIO G R A PH Y
1. K a n t o r o w i c z L. W.: M ath em atical M ethods of P roduction P la n n in g and O rganization [In:J C hajtm an S. (ed): M athem atical M ethods in E conom y and O rganization of F actory. PW E, W arszaw a 1960.
2. P o l y a G.: H ow to S o lv e It? P rin ceto n U n iv ersity P ress, 1945.
3. T o m a s z e w s k i W.: On N on -A lgorith m ic S olu tion s of L inear P rogram m ing Problem s, S ta tistica l R ev iew 2, W arszaw a 1961.
4. T o m a s z e w s k i W.: H eu ristic M athods of O ptim ization, P rob lem s of O rgani zation 1, W arszaw a 1980,
2 9 8 W. T om aszew sk i S T R E S Z C Z E N I E
Celem tego artyk u łu je s t u kazanie, że aby znaleźć przybliżone rozw iązan ia p e w n y ch p rak tyczn ie isto tn y ch p rob lem ów program ow an ia lin io w eg o za pom ocą po dejścia h eu rystyczn ego, nie je s t k on ieczn e sto so w a n ie ani sk o m p lik o w a n eg o a lgo rytm u, ani k om putera elek tron iczn ego.
A rtyk u ł d zieli się na d w ie części. Po ogólnym p rzed sta w ien iu proponow anej procedury h eu rystyczn ej n a stęp u je k ilk a przyk ład ów jej zastosow an ia.
Р Е З Ю М Е Ц ель статьи — п оказать, что для того, чтобы найти п р и бл и ж ен н ое реш ение некоторы х сущ ествен н ы х с практическ ой точки зрени я п реблем минейного про граммирования с помощ ью эвристического п одхода, н еобя зательн о применять ни сл ож н ы й логариф м , ни электронны й компьютер. Статья состоит из д в у х частей. П осле общ его представлен и я п редлагаем ой эв ристи ческой п р оц едур ы приводятся примеры е е прим енения.