PACKAGE SPECIFICAION 1 SUMMARY Solves the lea pogammg poblem, fds x={x } subect to the lea costats whee x 0 =1,2,...,. f(x) = a x b =1 a x = b =1 whch mmzes the lea fucto c x =1 =1,2,...,l =l+1,.,m he Revsed Smplex method s used whee a vese of the bass s mataed ad updated at each teato. hee s a opto to allow the bass vese to be cleaed up at the ed of the calculato ad the soluto checed fo ll-codtog ad f ecessay the calculato s estated. Aothe opto allows the use to foce specfc colums of the LP tableau to the tal bass. LA01B etus a eo dcato ad a estmate of the ll-codtog. Seveal pt optos ae offeed. ARIBUES Veso: 1.0.0. ypes: LA01B, LA01BD. Calls: FD05. Ogal date: Jauay 1975. Og: M.J.Hoppe, Hawell. 2 HOW O USE HE PACKAGE 2.1 he agumet lst ad callg sequece he sgle pecso veso: CALL LA01B(N,M,L,A,B,C,X,F,IA,IPR,IND,WK,IER) he double pecso veso: CALL LA01BD(N,M,L,A,B,C,X,F,IA,IPR,IND,WK,IER) N s a INEGER vaable ad s set by the use to the umbe of uows. Restcto: > 0. M s a INEGER vaable ad s set by the use to m the umbe of costats. Restctos: m + l, m > 0. L A B C X s a INEGER vaable ad must be set by the use to l the umbe of equalty costats. Restcto: 0 l m. s a two-dmesoal REAL (DOUBLE PRECISION the D veso) aay wth fst dmeso IA. he elemets of A must be set to the elemets of the costat matx A={a } m. he fst l ows of A must cota the equalty costats. hs agumet s ot alteed by the suboute. s a REAL (DOUBLE PRECISION the D veso) aay whch the use must set to the ght had sdes of the costats b =1,2,...,m. hs agumet s ot alteed by the suboute. s a REAL (DOUBLE PRECISION the D veso) aay whch the use must set to the cost fucto coeffcets c =1,2,...,. hs agumet s ot alteed by the suboute. s a REAL (DOUBLE PRECISION the D veso) aay whch s set by the suboute to the soluto x =1,2,...,. Wth ceta eo codtos X wll ot be set ad fo othe eo codtos t may ot cota the All use s subect to lcece. LA01 v 1.0.0 http://www.hsl.l.ac.u/ 1 Documetato date: 8th Febuay 2011
F IA IPR best possble soluto, see 2.3. s a REAL (DOUBLE PRECISION the D veso) vaable ad s set by the suboute to the optmum fucto value f(x). s a INEGER vaable ad must be set by the use to the fst dmeso of the aay A, e.g. f space s allocated fo A by set IA=100. DIMENSION A(100,40) s a INEGER vaable ad povdes pt optos. It must be set by the use to oe of the followg values: IPR=0 o ptg IPR 1 fal esults IPR 2 cost value at each teato IPR 3 bass vaables at each phase 2 teato IPR 4 bass vaables at each phase 1 teato IND WK IER he Fota steam umbe fo the output s specfed COMMON, see 2.2. s a INEGER aay of legth at least m+1. It ca be used to foce colums of the LP tableau to the tal bass, see NBASIS 2.2 fo detals. If NBASIS=0, whch t s uless the use has eset t, IND eed ot be set. O etu IND wll cota the colum umbes =1,2,...,m of the fal bass. s a REAL (DOUBLE PRECISION the D veso) aay whch the use must povde fo the suboute to use fo wo space. It must be at least (m+1)(m+3) wods log. See 2.4 fo detals of the cotets of WK o etu. s a INEGER vaable set by the suboute to a eo etu flag. IER 0 sgals a successful soluto, see 2.3 fo othe detals. 2.2 he COMMON aea he suboute uses two COMMON aeas whch the use may also efeece. he sgle pecso veso COMMON/LA01D/EPS,MAXINV,NBASIS,LP,LPD,OL COMMON/LA01G/AG he double pecso veso EPS COMMON/LA01DD/EPS,MAXINV,NBASIS,LP,LPD,OL COMMON/LA01GD/AG s a REAL (DOUBLE PRECISION the D veso) vaable (tal value = 0) ad s set by the suboute to the magtude of the maxmum magal cost assocated wth a basc vaable. Basc magal costs should be zeo, pactce a good esult has bee obtaed f EPS s of the ode of the mache pecso of the compute. Lage values wll dcate ll-codtog. MAXINV s a INEGER vaable (tal value = 1) ad specfes a lmt o the umbe of bass e-vesos that the suboute s allowed to mae. MAXINV ca be eset by the use. If MAXINV=0 the suboute caot mae a fal chec o the soluto by cleag up the bass veso ad e-tyg. NBASIS s a INEGER vaable (tal value = 0) ad ca be used to foce specfc colums fom the LP tableau to the tal bass. o do ths set NBASIS to the umbe of colums to go ad IND(J) J=1,NBASIS to the th tableau colum umbes. Note that a slac colum, assocated wth the equalty say, wll be colum umbe +. If NBASIS<M the est of the bass wll be chose fom the tableau by the suboute. LP s a INEGER vaable (tal value = 6 fo the le pte) ad specfes the Fota output steam to be used All use s subect to lcece. LA01 v 1.0.0 http://www.hsl.l.ac.u/ 2 Documetato date: 8th Febuay 2011
LA01 LPD fo ptg esults ad teato detals. LP may be eset by the use to ay vald steam umbe. If LP=0 ptg s suppessed eve f IPR>0. s a INEGER vaable (tal value = 6 fo the le pte) specfes the Fota output steam umbe to be used fo dagostc messages. eat as LP. 4 10 OL s a REAL (DOUBLE PRECISION the D veso) vaable (tal value 10 o 10 the double pecso veso) ad specfes the toleace allowed o the eo the bass magal costs, see EPS. If EPS>OL a eo etu s made, see IER=2, 2.3. he use may eset OL povded OL 0. AG s a CHARACER*8 text stg (tal value LA01B ( LA01BD double pecso veso)) ad s used to tag the output messages. he use may eset the tag to aothe ame but t should be ght ustfed the feld fo the best appeaace. 2.3 he eo etus (IER) IER 0 dcates a successful etu. IER=0 dcates that the fal soluto equed o addtoal e-vesos of the bass apat fom the fal oe whch s used as a chec o the soluto. If IER<0, the absolute value of IER gves the umbe of addtoal e-vesos eeded befoe a fal soluto was obtaed. hs would dcate that ll-codtog was peset at some stage although the fal bass may be fee fom t. If the use has suppessed e-veso by settg the commo vaable MAXINV=0 the suboute caot chec fo ll-codtog ths way. It wll sgal a successful calculato, IER=0, ad assume that the use wll chec fo ll codtog hmself. IER=1 dcates that e-veso was allowed but the umbe allowed was suffcet to each the optmum soluto. he soluto etued s lely to be ll-codtoed ad ot the best. IER=2 dcates that the maxmum magal cost assocated wth a bass vaable exceeds the toleace level set OL, 2.2.e. EPS>OL. hs dcates ll-codtog ad although a fal soluto was eached t s lely to have poo accuacy. IER=3 o soluto s etued because phase 1 of the smplex method faled to fd a feasble soluto,.e. the costats defe a ull ego. IER=4 o soluto s etued because the suboute has faled to fd m depedet colums fom the LP tableau to fom a bass. IER=5 the soluto to the poblem s foud to be ubouded,.e. ucostaed, o soluto s etued. IER=6 oe of the agumets N, M o L s vald. All thee values ae pted. 2.4 he cotets of the wospace O etu fom the suboute the wospace wll cota fomato whch may be of some teest to the use. It s dvded up to the segmets detaled below. Secto 4 should be cosulted fo the defto of some of the tems used. Segmet 1 s m+1 wods log. O etu wth IER 2 o IER=5 the fst m wods wll cota the m magal costs assocated wth the bass vaables,.e. v = chat U a =1,2,...,m (see 4). hese magal costs should be of the ode of the wod pecso of the compute. Segmet 2 s m+1 wods log. O all etus, except IER=4, ths segmet wll cota the cuet bass vaables w =1,2,...,m ad w = f(x). m+1 Segmet 3 s a (m+1) by (m+1) segmet cotag the taspose of the vese U of the bass. If IER=4 t wll be complete. If phase II had begu t wll cota the exteded vese Ũ (see 4) wth the obectve fucto th ow the (m+1) colum. All use s subect to lcece. LA01 v 1.0.0 http://www.hsl.l.ac.u/ 3 Documetato date: 8th Febuay 2011
3 GENERAL INFORMAION Use of Commo: the suboute uses a Commo aea LA01D/DD, see 2.2. Wospace: the use povdes the wospace though a agumet WK, (m+1)(m+3) wods ae equed. Othe suboutes: the lbay suboute FD05 s called. LA01B/BD also calls the pvate suboutes LA01C/CD ad LA01E/ED. Iput/Output: pvate optos ae povded ad dagostc ptg s possble. hese ae omally pted o the le pte but may be suppessed, see IPR 2.1 ad LP ad LPD 2.2. System depedece: oe. Restctos: > 0, 2 m +l, 0 l m. 4 MEHOD he method used s that of the Revsed Smplex method wth a modfcato whch allows the algothm to be stated wth at most oly oe atfcal vaable. I the bef descpto that follows we assume the eade s famla wth the basc method ad cocetate moe o ts mplemetato LA01B/BD. ae the poblem to be that gve the summay. he LP tableau Â={â } m +1 s defed as the exteso of A={a } m by the patal detty matx I l, cosstg of the fst l colums of I, whch ae assocated wth the l slac vaables toduced to mae the equalty costats to equaltes. he fst step s to attempt to select m depedet colums fom A to fom the tal bass H = ahat =1,2,...,m. hs s doe by buldg the vese of the 1 bass U=H a colum at a tme usg the a oe update fomula u () ( 1) ( 1) σ U = U U (ahat e ) th whee u s the ow of U ( 1) ad σ = u ahat. he colum ahat to be eteed the bass s chose by σ = max u ahat ode to esue stablty. he tal vese s U (0) = I ad f the use chooses ot to foce colums to the bass the suboute wll put the l slac colums, I, fst ad stat the sequece fom U = I. l (l) l If the use has chose to foce colums to the bass the same fomula s used but the set of possble colums s tally estcted to hs set. Whe these ae exhausted the est of the LP tableau s cluded the seach. Whe buldg the vese matx U, colums that become basc ae etaed the seach set to ad the detecto of a a defcet tableau, because f a basc colum s chose twce t stogly dcates that the tableau does ot cota m depedet colums. Note that the suboute holds the vese U tasposed fom so that ow opeatos, whch ae most fequet, become colum opeatos the Fota code. Afte the tal vese has bee bult the cuet LP soluto w = Ub s checed agast the postvty costats w 0 =1,2,...,m. If these ae all satsfed phase II of the smplex method s eteed, othewse we do a phase I. o toduce the atfcal vaable fo phase I we mplctly exted the tableau by oe colum Whe ths colum eplaces ahat ahat = b ahat. +l+1 m =1 the bass the cuet soluto becomes w = 1 =1,2,...,m. he colum s chose All use s subect to lcece. LA01 v 1.0.0 http://www.hsl.l.ac.u/ 4 Documetato date: 8th Febuay 2011
LA01 to peseve stablty ad tus out to be chose fom max w. Note that f at least oe w < 0 ths caot be zeo. I phase I we attempt to teate out the atfcal vaable w by mmzg t, ths wll mea that the magal costs wll be e Uahat = u ahat. If the costats have o feasble soluto phase I wll fal to emove w ad the suboute wll eo etu. If w s emoved phase II s eteed. o beg phase II the eal cost fucto s bought to the poblem by addg a exta ow chat he suboute the wos wth a m+1 by m+1 vese U :s 0 Ũ =.... chat U : 1 to the tableau. whee chat = ĉ =1,2,...,m s the bass set of cost coeffcets. he magal costs wll the be chat Uahat ĉ =1,2,...,+l ad we choose the lagest of these to decde whch colum comes to the bass. If o magal cost s foud geate tha zeo, o f a colum that s aleady basc s chose, we have fshed the LP teatos. Othewse we choose the colum to leave the bass, update the vese ad soluto ad cotue the teatos usg the omal lea pogammg ules. If we have fshed the teatos the bass s e-veted ad the soluto checed. If we have eally eached the soluto ths wll be cofmed ad a successful etu to the calle s made. If ll-codtog was peset causg the bass vese to be bad the e-veso may show that we wee ot at the soluto at all. I ths case we cay o wth the teatos ethe wth phase I, f the cleaed up soluto was foud to be feasble, o wth phase II. he pocess cotues fo as may tmes as the suboute s allowed to e-vet o whe a pope soluto s eached. Befoe etug to the calle the suboute computes the fal magal costs assocated wth the bass,.e. v = chat Ua ĉ =1,2,...,m. Because these gve some measue of the othogoalty of the bass ad ts vese they ae a useful gude to the codto of the bass. heoetcally they should be zeo but pactce wll be o ode of the elatve oudg eo the compute. All use s subect to lcece. LA01 v 1.0.0 http://www.hsl.l.ac.u/ 5 Documetato date: 8th Febuay 2011