Trasportatio problem TRANSPORTATION AND ASSIGNMENT PROBLEMS Example P&T Compay produces caed peas. Peas are prepared at three caeries (Belligham, Eugee ad Albert Lea). Shipped by truck to four distributig warehouses (Sacrameto, Salt Lake City, Rapid City ad Albuquerque). 300 truckloads to be shipped. Problem: miimize the total shippig cost. João Miguel da Costa Sousa / Alexadra Moutiho 27 P&T Compay problem Shippig data for P&T problem Shippig cost per truckload i Warehouse 2 3 4 Output 464 53 654 867 75 Caery 2 352 46 690 79 25 3 995 682 388 685 00 Allocatio 80 65 70 85 300 João Miguel da Costa Sousa / Alexadra Moutiho 28 João Miguel da Costa Sousa / Alexadra Moutiho 29 Network represetatio João Miguel da Costa Sousa / Alexadra Moutiho 30 Formulatio of the problem Miimize Z= 464x + 53x + 654x + 867x + 352x + 46x 2 3 4 2 22 + 690x + 79x + 995x + 682x + 388x + 685x 23 24 3 32 33 34 subject to x + x + x + x = 75 2 3 4 x + x + x + x = 25 2 22 23 24 x + x + x + x = 00 3 32 33 34 x + x + x = 80 2 3 x + x + x = 65 2 22 32 x + x + x = 70 3 23 33 x + x + x = 85 4 24 34 ad x 0 ( i=,2,3,4;,2,3,4) João Miguel da Costa Sousa / Alexadra Moutiho 3
Costraits coefficiets for P&T Co. Coefficiet of: x x x x x x x x x x x x 2 3 4 2 22 23 24 3 32 33 34 A = Caery Warehouse Trasportatio problem model Trasportatio problem: distributes aycommodity from aygroup of sourcesto ay group of destiatios, miimizig the total distributio cost. Prototype example Truckload of caed peas Three caeries Four warehouses Output from caery i Allocatio to warehouse j Shippig cost per truckload from caery ito warehouse j Geeral problem Uits of a commodity m sources destiatios Supply s i from source i Demad d j at destiatio j Cost c per uit distributed from source i to destiatio j João Miguel da Costa Sousa / Alexadra Moutiho 32 João Miguel da Costa Sousa / Alexadra Moutiho 33 Trasportatio problem model Each source has a certai supplyof uits to distribute to the destiatios. Each destiatio has a certai demadfor uits to be received from the source. Requiremets assumptio:each source has a fixed supplyof uits, which must be etirely distributed to the destiatios. Similarly, each destiatio has a fixed demadfor uits, which must be etirely received from the sources. João Miguel da Costa Sousa / Alexadra Moutiho 34 Trasportatio problem model The feasible solutios property: a trasportatio problem has feasible solutio if ad oly if m s = d i i= If the supplies represet maximumamouts to be distributed, a dummy destiatio ca be added. Similarly, if the demads represet maximum amouts to be received, a dummy sourceca be added. João Miguel da Costa Sousa / Alexadra Moutiho 35 j Trasportatio problem model Parameter table for trasportatio prob. The cost assumptio:the cost of distributig uits from ay source to ay destiatio is directly proportioal to the umber of uits distributed. This cost is the uit costof distributio timesthe umber of uits distributed. Iteger solutio property:for trasportatio problems where every s i ad d j have a iteger value, all basic variables i everybf solutio also have iteger values. Cost per uit distributed Destiatio 2 Supply c c 2 c s 2 c 2 c 22 c 2 s 2 m c m c m2 c m s m Demad d d 2 d João Miguel da Costa Sousa / Alexadra Moutiho 36 João Miguel da Costa Sousa / Alexadra Moutiho 37 2
Trasportatio problem model Network represetatio The model:ay problem fits the model for a trasportatio problem if it ca be described by a parameter tablead if the satisfies the requiremets assumptios ad the cost assumptio. The objective is to miimize the total cost of distributig the uits. Some problems that have othig to do with trasportatio ca be formulated as a trasportatio problem. João Miguel da Costa Sousa / Alexadra Moutiho 38 João Miguel da Costa Sousa / Alexadra Moutiho 39 Mathematical formulatio of the problem Coefficiet Z: total distributio cost x : umber of uits distributed from source ito destiatio j m = Miimize Z c x, subject to i= x = s, for i=,2,, m, m i x = d, for,2,,, ad x 0, for all i ad j. João Miguel da Costa Sousa / Alexadra Moutiho 40 j Coefficiet of: x x... x x x... x... x x... x 2 2 22 2 2 m m m A = Supply Demad João Miguel da Costa Sousa / Alexadra Moutiho 4 Example: solvig with Excel Example: solvig with Excel João Miguel da Costa Sousa / Alexadra Moutiho 42 João Miguel da Costa Sousa / Alexadra Moutiho 43 3
Versio of the simplex called trasportatio simplex method. Problems solved by had ca use a trasportatio simplex tableau. Dimesios: For a trasportatio problem with msources ad destiatios, simplex tableauhas m+ + rows ad (m+ )(+ ) colums. The trasportatio simplex tableauhas oly mrows ad colums! João Miguel da Costa Sousa / Alexadra Moutiho 44 Trasportatio simplex tableau (TST) Destiatio 2 Supply u i c c 2 c s 2 c 2 c 22 c 2 S 2 m c m c m2 c m s Demad d d 2 d Z= v j Additioal iformatio to be added to each cell: If x is a basic variable: c x If x is a obasic variable: c c -u i -v j João Miguel da Costa Sousa / Alexadra Moutiho 45 Iitializatio:costruct a iitial BF solutio. To begi, all source rows ad destiatio colums of the TST are iitially uder cosideratio for providig a basic variable (allocatio).. From the rows ad colums still uder cosideratio, select the ext basic variable (allocatio) accordig to oe of the criterios: Northwest corer rule; Vogel s approximatio method; Russell s approximatio method. 2. Make that allocatio large eough to exactly use up the remaiig supply i its row or the remaiig demad i its colum (whatever is smaller). 3. Elimiate that row or colum (whiever had the smaller remaiig supply or demad) from further cosideratio. (If the row or colum have the same remaiig supply ad demad, arbitrarily select the rowas the oe to be elimiated. The colum will be used later to provide a degeerate basic variable, i.e., a vircled allocatio of zero.) João Miguel da Costa Sousa / Alexadra Moutiho 46 João Miguel da Costa Sousa / Alexadra Moutiho 47 Metro Water District example 4. If oly oe row or oe colum remais uder cosideratio, the the procedure is completed by selectig every remaiig variable (i.e., those variables that were either previously selected to be basic or elimiated from cosideratio by elimiatig their row or colum) associated with that row or colum to be basic with the oly feasible allocatio. Otherwise retur to step. Go to the optimality test. Iitial BF solutio from the Nortwest Corer Rule: Destiatio 2 3 4 5 Supply u i 6 30 6 20 3 22 7 50 2 4 4 0 3 60 9 5 60 3 9 9 20 0 23 30 M 0 50 4(D) M 0 M 0 0 50 50 Demad 30 20 70 30 60 Z=2,470+0M v j João Miguel da Costa Sousa / Alexadra Moutiho 48 João Miguel da Costa Sousa / Alexadra Moutiho 49 4
Optimality test:derive u i ad v j by selectig the row havig the largest umber of allocatios, settig its u i =0, ad the solvig the set of equatios c =u i +v j for each (i,j) such that x is basic. If c u i v j 0 for every (i,j) such that x is obasic,the the curret solutio is optimal, so stop. Otherwise, go to a iteratio. Iteratio:. Determie the eterig basic variable: select the obasic variable x havig the largest(i absolute terms) egativevalue of c u i v j. 2. Determie the leavig basic variable: idetify the chai reactio required to retai feasibility whe the eterig basic variable is icreased. From the door cells, select the basic variable havig the smallest value. João Miguel da Costa Sousa / Alexadra Moutiho 50 João Miguel da Costa Sousa / Alexadra Moutiho 5 Assigmet problem Iteratio: 3. Determie the ew BF solutio: add the value of the leavig basic variable to the allocatio for each recipiet cell. Subtract this value from the allocatio for each door cell. 4. Apply the optimality test. Special type of liear programmig where assigees are beig assiged to perform tasks. Example: employees to be give work assigmets. Assigees ca be machies, vehicles, plats or eve time slots to be assiged tasks. João Miguel da Costa Sousa / Alexadra Moutiho 52 João Miguel da Costa Sousa / Alexadra Moutiho 53 Assumptios of assigmet problems. The umber of assigees ad the umber of tasks are the same (if ecessary, use dummy assigees ad dummy tasks so that assigees = tasks = ). 2. Each assigee is to be assiged to exactly oetask. 3. Each task is to be performed by exactly oe assigee. 4. There is a cost c associated with assigee i performig task j(i,, 2,, ). 5. The objectiveis to determie how all assigmets should be made to miimize the total cost. Prototype example Job Shop Compayhas purchased three ew machies of differet types, ad there are four differet locatios i the shop where a machie ca be istalled. Objective: assig machies to locatios. Cost per hour of material hadlig (i ) Locatio 2 3 4 3 6 2 Machie 2 5 3 20 3 5 7 0 6 João Miguel da Costa Sousa / Alexadra Moutiho 54 João Miguel da Costa Sousa / Alexadra Moutiho 55 5
Formulatio as a assigmet problem Usig a dummy machiead a extremely large cost c 22 =M: Assigee (Machie) Task (Locatio) 2 3 4 3 6 2 2 5 M 3 20 3 5 7 0 6 4(D) 0 0 0 0 Optimal solutio: machie to locatio 4, machie 2 to locatio 3 ad machie 3 to locatio (total cost of 29 per hour) João Miguel da Costa Sousa / Alexadra Moutiho 56 Assigmet problem model Decisio variables x if assigee i performs task j, = 0 if ot. = Miimize Z cx, i= subject to x =, for i=,2,,, x =, for,2,,, ad x 0, for all i ad j ( x biary, for all i ad j) Still a liear programmig problem? João Miguel da Costa Sousa / Alexadra Moutiho 57 Assigmet vs. Trasportatio prob. Network represetatio Assigmet problem is a special type of trasportatio problem where sources assigees ad destiatios tasks ad: #sources m= # destiatios ; Every supply s i = ; Every demad d j =. Due to the iteger solutio property,sice s i ad d j are itegers, every BF solutio is a iteger solutio for a assigmet problem. We may delete the biary restrictio ad obtai a liear programmig problem! João Miguel da Costa Sousa / Alexadra Moutiho 58 João Miguel da Costa Sousa / Alexadra Moutiho 59 Parameter table as trasportatio prob. Cost per uit distributed Destiatio 2 Supply c c 2 c 2 c 2 c 22 c 2 m = c c 2 c Demad Cocludig remarks Besides the geeral simplex ad the trasportatio simplex methods, a special algorithm for the assigmet problem is the Hugaria algorithm (more efficiet). Streamlied algorithmswere developed to explore the special structureof some liear programmig problems: trasportatio ad assigmet problems. Trasportatio ad assigmet problems are special cases of miimum cost flow problems. Network simplex method solves this type of problems. João Miguel da Costa Sousa / Alexadra Moutiho 60 João Miguel da Costa Sousa / Alexadra Moutiho 6 6