An Interactve Optmsaton ool for Allocaton Problems Fredr Bonäs, Joam Westerlund and apo Westerlund Process Desgn Laboratory, Faculty of echnology, Åbo Aadem Unversty, uru 20500, Fnland hs paper presents an nteractve tool (MINDA) for solvng allocaton problems n up to four dmensons. ypcally such problems are one-dmensonal mult-product schedulng problems, two-dmensonal cuttng problems, three-dmensonal pacng problems and four-dmensonal logstcal problems. he allocaton problems are formulated as mxed nteger lnear programmng (MILP) models or mxed nteger nonlnear programmng (MINLP) models dependng on the nature of the problem. he software conssts of a Graphcal User Interface (GUI) nto whch problem data s feed and where results are dsplayed, and a ln to the commercal optmsaton solver ILOG CPLEX 10.0.1. 1. Introducton he allocaton problems are modelled wth a fundamental problem formulaton for N- dmensonal allocaton problems presented n (Westerlund, 2005), wth some slght modfcatons. In these models tems of N-dmensons are to be allocated n one or more arrays, called contaners, of the same dmenson. A contaner may represent a lmted one-dmensonal array, an unlmted space n tme, a two-dmensonal area or a threedmensonal volume. If a three-dmensonal tem also has a fourth tme-dmenson, determnng ts avalablty n tme, t may be consdered as a four-dmensonal tem. he model handles all tems as lnear, rectangular, cubc etc. If all drectonal szes of the tems are gven,.e. wdth, heght and depth, a lnear formulaton s used. In ths case the model conssts of an objectve functon and four man types of constrants. hese constrants determne the tems poston nsde the contaners, prevent overlappng between the tems, allow the tems to rotate n any gven drecton and defne f a certan contaner s used or not. Addtonal constrants concernng connecton costs, costs for placement of an tem n any gven drecton and costs for used space n a certan drecton n a contaner may also be used. For problems where the area or volume s gven nstead of the specfc drectonal szes of the tems a correspondng non-lnear formulaton s used. hs formulaton results n a convex MINLP-model that can be solved to global optmalty usng a smplfcaton of the Extended Cuttng Plane Method descrbed n (Westerlund and Pörn, 2002). 2. MINDA he program descrbed n ths paper s called MINDA, whch stands for Mxed Integer N-dmensonal Allocaton ool. he purpose of the software s that users easly shall be able to solve allocaton problems of dfferent nature wthout deep nsght n mxed nteger mathematcal programmng.
3. Problem formulaton he general model for an N-dmensonal problem s formulated by usng vector notatons n order to mae the formulaton as compact as possble. hus an N- dmensonal tem s represented by ts coordnate-vector x (defnng the centrod coordnates of the tem), where x = ( x, y, z, t...) and N = dm( x ). he sze of the tem s, n each drecton defned by the vector X, where X = ( X, Y, Z,...), X, Y, Z and represents the length, heght, wdth and avalablty n tme of the tem. Note that the elements of X are varables. In case the sze of an tem s defned by gven length, heght, wdth etc. he elements of X, n the dfferent drectons, are selected through so called orentaton constrants from the sze-vector v = ( l, h, w...) ncludng gven szes for the tem. If the sze of an tem s defned by an area or volume the elements of X are defned through sze constrants ncludng upper and lower bounds of the elements n X. he sze of the contaner n whch tem s allocated s defned by the vector U. Each contaner has a vector V = ( LHW,,,...) defnng ts sze. he values of the varables n U are selected from one of the vectors V. 3.1 An MILP formulaton of an N-dmensonal allocaton problem In ths case the sze, n dfferent drectons, of every tem s predefned for each dmenson N, but the tem may stll be allowed to rotate. he total number of tems s J, and the total number of contaners s K. 3.1.1 he Objectve Functon he objectve s to mnmse a cost functon. he cost can be dependent on whch contaner s used, total space used n a contaner n a certan drecton, rectlnear dstance between tems and the centrod coordnate of each tem. he objectve functon used n MINDA s gven n equaton (1). mn K J j 1 J ( C D ) ( ) + C s + c d + c x (1) j j = 1 j= 2 = 1 = 1 In equaton (1) C s the gven cost for contaner, and D s a bnary varable defnng f contaner s used or not. he vector C contans costs connected to the total used space, s n each coordnate drecton, and c j s a vector wth costs for the rectlnear dstance, d between tems and j. Fnally c j defnes a costs connected to the centrod coordnates x for each tem. Elements of ths latter cost parameter vector can, for example, be used as gravty parameters to avod flyng boxes n pacng problems. Note that the objectve functon can be facltated smply by leavng out one or more, but not all, of the terms n equaton (1).
3.1.2 Constrants In ths secton we consder the constrants nvolved n the formulaton. Some of the constrants are gven explctly whle the reader s referred to (Westerlund, 2005) for a complete set of constrants. Space constrants are used to mae sure that no tems are allocated outsde a contaner, and that all tems are allocated n one contaner. Overlap Preventon Constrants are used to prevent tems to overlap. Note that two tems may overlap each other n N-1 dmensons, (Westerlund, 2005). he constrants shown n equaton (2) are slghtly modfed from the overlap preventon constrants n (Westerlund, 2005). X + X j + δ j ( x x ) + M j ( e P j ) 2 X + X 1 < j J j + δ j ( x j x ) + M ( e Q j ) 1,2,..., K 2 = K 1 e ( P + Q j j ) Gj β + β G + 1 j j (2) he bnary varable G j n equaton (2) equals one f the tems and j are located n the same contaner; zero otherwse. he parameter M s an approprate upper bound. P and Q are vectors of bnary varables that are used to prevent overlap. Snce j j accordng to (Westerlund, 2005) two tems may overlap each other n N-1 dmensons, only one of the bnares n the vector P j and Q need to be equal to one (f the two j tems are n the same contaner). When a bnary varable n P j or Q s zero the j correspondng nequalty s relaxed. e s a unt vector of length N, e = (1,1,1,...), and δ s a vector of parameters defnng the mnmum dstance or setup-tme between tem j and j. β s a bnary varable equal to one f tem s located n contaner and zero otherwse. Orentaton Constrants are used to allow tems to rotate. he contaner constrants are used to defne f a certan contaner s used or not. Snce we n the objectve functon mnmse the dstances ( s ) occuped by tems n each drecton n contaner do we also need addtonal constrants defnng the dstance-vector. Such constrants are gven n (Westerlund, 2005). If only one contaner s avalable the dstance can be expressed n a more condensed form, see (Westerlund, 2005). If we have a connecton cost between tems n the same contaner, the rectlnear dstance between these tems needs to be calculated. Rectlnear dstance constrants for ths purpose are also gven n (Westerlund, 2005). If tems and j are n the same contaner the vector d n the objectve functon (2) defnes the rectlnear dstance, otherwse d j j s zero. Symmetry-breang constrants are used to prevent equvalent symmetrcal solutons and, thus, also to reduce the soluton tme for the problem. hs can be done for example by forcng the frst nserted tem n each contaner nto a certan corner of the contaner. he reader s referred to (Westerlund, 2005) for a more detaled dscusson of the symmetry-breang constrants. o prevent tems to overload a
contaner (and also computatonally to reduce soluton tme) capacty constrants has addtonally been formulated as shown n (Westerlund, 2005). If several dentcal contaners exst, n sze and cost, one can furthermore add constrants determnng whch of these should be allocated frst. By usng these constrants a contaner wth a lower ndex of the dentcal ones s flled to ts maxmum frst. 3.2 Optmsaton of Bloc/Box Layout Desgn Problem In the bloc layout desgn problem, (Castllo et. al. 2005) or box layout desgn problem n 3 and 4 dmensonal cases, the tems are represented by areas or volumes nstead of tems wth gven sde-lengths. In ths case we wll only consder one contaner whch s represented by an area or a volume wth gven sze. he objectve functon and constrants descrbed n chapter 3.1 are used also n ths case, although snce the number of contaners s always equal to one the constrants concernng contaners are modfed to ft ths case. he orentaton constrants can be removed snce the vector X now conssts of varables defned by upper and lower bounds, and the sze of the tem. hese bounds are n the 2-dmensonal case defned accordng to (Castllo et. al. 2005) as, up = mn { α, } h mn { aα, H } w a W w up a a = max, up h α h low = (3a) a a = max, up α w low he parameter α = max l, w mn l, w, W and H are the wdth and heght of the contaner and a s the area of the tem. In the three dmensonal case we can obtan smlar upper and lower bounds. In the fourdmensonal case the tems tme-dmenson wll be predefned and not altered, so all constrants concernng three dmensons apples also n ths case. Snce part of the problem now wll be to determne the exact sze of the tems, ths problem s non-lnear. he tem szes are defned by non-lnear and non-convex equaltes, (3b) α n (3a)-(3b) s an aspect rato defned by { } { } h w l... = R = 1, 2,..., J (4) In equaton (4), h, w and l are the heght, wdth and length to be obtaned (.e. the elements of the vector case R s the gven area, n the three-dmensonal case the gven volume etc. Although equaton (4) s a non-convex equalty constrant t can generally, n the N-dmensonal case be relaxed nto convex nequalty constrants (5). he convex nequalty constrants for two- and three-dmensonal cases are gven as examples below. X ) and R s the gven sze of tem. In the two-dmensonal
R f : h + 0 1 R f : h + 0 l w 1 w R h w R, h w l R : 0 f w + = 1, 2,..., J (5) 2 R l h f : w + 0 2 h R f : l + 0 3 w h By lnearzaton of (5) we obtan cuttng-planes whch can be added durng optmsaton of the problem. In the three dmensonal case the cuttng planes are, for example, defned by, R R R h l w 3 2 2 ( l ) w l ( w ) l w R R R w l h 3 2 2 = 1,2,..., J (6) ( l ) h l ( h ) l h R R R l h w 3 2 2 ( h ) w h ( w ) h w Here l, h and w are the length, heght and wdth obtaned at teraton. After subsequently addng cuttng planes of the form (6) to a prevous MILP problem, the problem s solved to global optmalty usng a smplfcaton of the Extended Cuttng Plane Method descrbed n (Westerlund and Pörn, 2002). 4. Solvng problems wth MINDA All confguraton and data fles used by MINDA are saved n plan ASCII text. he user can therefore defne problem fles wth a text edtor. Problems can however also be defned by a walthrough wzard ncluded n MINDA. he problems can be solved wth dfferent optons, such as for example any parameter confguraton accepted by CPLEX. Fgure 1 llustrates the output from MINDA solvng a sngle-floor process plant layout problem wth 11 tems. Problem data and prevous results are found n (Westerlund, 2005, Paper VI, table 5-7). Best soluton tme for the problem acheved wth MINDA s 58 seconds on an AMD Athlon 64 3200+ computer wth 1GB RAM. Fgure 1: Output from MINDA solvng a snglefloor process plant layout problem to optmum. he soluton s not dentcal to the soluton presented n (Westerlund, 2005) but s a multple optmal soluton.
Fgure 2: Output from MINDA solvng a bloc layout problem. Items mared wth lnes have stll to reach ther full vald szes. Fgure 2 shows how a soluton for a two-dmensonal bloc layout problem evolves. When the optmsaton starts, no cuttng planes are yet added. hs means that the tems wll be smaller than allowed after the frst teratons. In MINDA ths s llustrated by lnes on those tems that are stll too small. In the leftmost layout n fgure 2, (obtaned after two teratons, and addng cuttng planes after the frst teraton) we can see that only one tem s large enough, and to the rght we have the optmal allocaton pattern wth vald szed tems. he layout n the mddle of fgure 2 s an ntermedate soluton. he problem data for the two dmensonal bloc layout problem llustrated n fgure 2 s the problem f09 n (Westerlund, 2005, p. 25) wth aspect rato 4. Prevous results and soluton data s found n (Castllo et. al. 2005). he best soluton tme wth MINDA for ths two-dmensonal, 9 tem, bloc layout problem s 750 seconds on an AMD Athlon 64 3200+ computer wth 1GB of RAM and CPLEX 10.0.1. In fgure 3 MINDA solves a 13 tem, three-dmensonal pacng problem wth four avalable contaners. By clcng on a contaner n the three-vew to the left, durng or after optmsaton, MINDA draws the contaner wth all ts contanng tems. Fgure 3: MINDA solvng a 3-dmensonal pacng problem to optmum. Items can be made transparent wth a button-clc to see what les behnd them. Problem data s found n (Westerlund, 2005, paper VI, table 8-9). he tems n contaner 4 are llustrated n the fgure. 5. References Castllo, I. Westerlund, J. Emet, S. and Westerlund,. 2005, Optmzaton of bloc layout desgn problems wth unequal areas: A comparson of MILP and MINLP optmzaton methods. Computers & chemcal engneerng 30, 54-69. Westerlund, J. 2005, Aspects on N-dmensonal allocaton, PhD hess, Åbo Aadem Unversty, Fnland, ISBN 952-12-1625-5. Westerlund,. and Pörn, R. (2002), Solvng Pseudo-Convex Mxed Integer Problems by Cuttng Plane echnques. Optmzaton and Engneerng, 3, 253-280.