Transportation Problem Excel

4
Decision Line, March 2001 7 Transportation Model Reports for Excel Rick Hesse, Feature Editor IN THE CLASSROOM RICK HESSE, Feature Editor, Pepperdine University T he standard transportation problem formulated as a spreadsheet model to be optimized by the Solver add-in has many advantages in terms of setup and solution for teaching. However, I have al- ways been frustrated trying to get some form of report for the standard Transporta- tion model that would be informative to a manager instead of a mathematician. The standard assignment model is a very simple model to have the report written automati- cally because there is only one assignment per row and the value of the assignments are 0s and 1s. But the transportation model will have more than one shipment for one or more rows and the values aren’t 0 and 1. Excel Transportation Model The data for the standard transportation model for three plants (Denver, Atlanta and New York) shipping to three warehouses (Tucson, Miami and San Diego) as well as the inventory (Storage) is given in rows 3- 7 in Figure 1. It is a balanced problem (Sup- ply = Demand) and a total of 300 units must be left at one or more of the plants. The optimal solution, using the Solver included with Excel from Frontline Systems is also shown. A surprise is that the extra production is stored in New York, even though the cost ($0.80) is over twice as much as keep- ing the extra production in Denver ($0.30) or Atlanta ($0.20). But because the cost of shipping out of New York to all the other locations is so high, it is better to keep the extra production in New York than the other two plants. The key cell formulas and range names are given below. Cell Formulas: F10: =SUM(B10:E10) copy to F11:F12 B13: =SUM(B10:B12) copy to C13:E13 F13: =SUMPRODUCT(COST,SHIP) Range Names: FROM: A4:A6; TO: B3:E3 COST: B4:E6; SHIP: B10:E12 Figure 2 gives the Solver setup show- ing that all seven constraints are equalities, with 12 variables and the total cost to be minimized. Figure 1: Transportation spreadsheet model. Rick Hesse is professor of quantitative methods at Pepperdine University in the Graziadia Graduate School of Busi- ness. He received his BS, MS, and DSc at Washing- ton University School of Engineering in applied math and computer science. Dr. Hesse is the author of Managerial Spreadsheet Model- ing & Analysis and Applied Management Science: A Quick & Dirty Approach (with Gene Woolsey), articles in numerous journals, and software for personal computers. Rick was the first professor to be awarded the Outstand- ing Civilian Service Medal by the Department of the Army at West Point in 1982, and was the winner of the Decision Sciences Institute’s Inno- vative Instructional Award in 1981. Dr. Rick Hesse Graziadia Graduate School of Business Pepperdine University Malibu, CA 90265 [email protected]

Transcript of Transportation Problem Excel

Page 1: Transportation Problem Excel

Decision Line, March 2001 7

Transportation Model Reportsfor ExcelRick Hesse, Feature Editor

IN THE CLASSROOM

■■■■■ RICK HESSE, Feature Editor, Pepperdine University

The standard transportation problemformulated as a spreadsheet modelto be optimized by the Solver add-in

has many advantages in terms of setup andsolution for teaching. However, I have al-ways been frustrated trying to get someform of report for the standard Transporta-tion model that would be informative to amanager instead of a mathematician. Thestandard assignment model is a very simplemodel to have the report written automati-cally because there is only one assignmentper row and the value of the assignmentsare 0s and 1s. But the transportation modelwill have more than one shipment for oneor more rows and the values aren’t 0 and 1.

Excel Transportation Model

The data for the standard transportationmodel for three plants (Denver, Atlanta andNew York) shipping to three warehouses(Tucson, Miami and San Diego) as well asthe inventory (Storage) is given in rows 3-7 in Figure 1. It is a balanced problem (Sup-ply = Demand) and a total of 300 units mustbe left at one or more of the plants. The

optimal solution, using the Solver includedwith Excel from Frontline Systems is alsoshown.

A surprise is that the extra productionis stored in New York, even though thecost ($0.80) is over twice as much as keep-ing the extra production in Denver ($0.30)or Atlanta ($0.20). But because the cost ofshipping out of New York to all the otherlocations is so high, it is better to keep theextra production in New York than theother two plants.

The key cell formulas and range namesare given below.

Cell Formulas:F10: =SUM(B10:E10) copy to F11:F12B13: =SUM(B10:B12) copy to C13:E13F13: =SUMPRODUCT(COST,SHIP)Range Names:FROM: A4:A6; TO: B3:E3COST: B4:E6; SHIP: B10:E12

Figure 2 gives the Solver setup show-ing that all seven constraints are equalities,with 12 variables and the total cost to beminimized.

Figure 1: Transportation spreadsheet model.

Rick Hesseis professor of quantitativemethods at PepperdineUniversity in the GraziadiaGraduate School of Busi-ness. He received his BS,MS, and DSc at Washing-ton University School ofEngineering in applied

math and computer science. Dr. Hesse is theauthor of Managerial Spreadsheet Model-ing & Analysis and Applied ManagementScience: A Quick & Dirty Approach (withGene Woolsey), articles in numerous journals,and software for personal computers. Rick wasthe first professor to be awarded the Outstand-ing Civilian Service Medal by the Departmentof the Army at West Point in 1982, and was thewinner of the Decision Sciences Institute’s Inno-vative Instructional Award in 1981.

Dr. Rick HesseGraziadia Graduate School of BusinessPepperdine UniversityMalibu, CA [email protected]

Page 2: Transportation Problem Excel

8 Decision Line, March 2001

Transportation Report

For those of us who are used to matrices, itis a fairly simple matter to read off the so-lution—but it is not very user-friendly.What is more desirable is a report like theone shown in Figure 3. Such a report cancertainly be created “manually”—that is,each entry needs to either be typed in orjust “point and click” to the labels and val-ues. The last column is a simple formulamultiplying the number of cases times thecost per case. The Total formulas are alsosimple sums.

But the challenge has always been tofind a way to at least set up a semi-auto-matic report. To do this, I have used theINDEX and MATCH functions in Excel inconjunction with the defined range names.

C18: =INDEX(SHIP,MATCH(A18,FROM,0),MATCH(B18,TO,0)) copy toC19:C23

D18: =INDEX(COST,MATCH(A18,FROM,0),MATCH(B18,TO,0)) copy toD19:D23

E18: =C18*D18 copy to E19:E23

The INDEX(range,row,column) func-tion returns the value in range found in thespecified row and column. ThusINDEX(SHIP,1,1) returns the value 600. Todetermine which row and column is de-sired, the MATCH(value,range,0) functionsearches the specified range for an exact(the 0 is the code for that) match of thespecified value. In this case, the value is thename of the plant or wholesaler. The use ofthe 0 code in the MATCH function allowsthe list in the range not to have be orderedalphabetically. By using these two functions,then for any size model the report can bewritten fairly quickly and painlessly. All thatis needed is to “point and click” to thenames for the supply and demand to putinto columns A and B of the report. Inci-dentally, to show what range names havebeen defined in your current workbook,click on the arrow on the box with the cellreference (upper left of the screen) and thedrop-down list will show all the rangenames. Highlight any one of them and Ex-cel will automatically highlight that range(taking you to another worksheet if neces-sary).

Figure 3: Transportation model report.

Figure 4: Edit function in Excel.

Figure 2: Solver setup for transportation model.

Page 3: Transportation Problem Excel

Decision Line, March 2001 9

Figure 5: Column graph with data table.

One of the problems with using rangenames is that the formulas will not rede-fine themselves for another modelworksheet in the same workbook with atransportation model of different size(number of rows and/or columns). And ifthe ranges are redefined for one worksheet,they are redeifined for all the otherworksheets in that workbook.

The cell formulas can be written usingjust the cell references (shown below):

C18: =INDEX($B$10:$E$12,MATCH(A18,$A$4:$A$6,0),MATCH(B18,$B$3:$E$3,0))

D18: =INDEX($B$4:$E$6,MATCH(A18,$A$4:$A$6,0),MATCH(B18,$B$3:$E$3,0))

Now when these formulas are copiedover to another worksheet for a model witha different number of plants or warehouses,it is a simple matter to use the edit functionin Excel for cell C18 to resize the areas forthe INDEX and MATCH functions, asshown in Figure 4. Just click on cell C18,then click inside the edit bar at the top ofthe screen and magically all the cell refer-ences in the formula are outlined.

Although you cannot see the colors inthis article, Excel color codes each cell ref-erence, so that the shipping range (B10:E12)is blue and the outline around that range isblue. Instead of retyping the cell reference,you can grab the lower right corner of theoutline with the mouse and pull it up, down,left or right and resize the area that youwant and then press <Enter>. If the rect-angle is not in the proper upper left-handcorner, you can grab any side of the rect-angle with the mouse and place the rect-angle where desired and then resize it. Thisis an extremely useful way of editing for-mulas and a great time-saving device forspreadsheet users. In similar fashion we canresize the cell reference area in B3:E3 andthe reference to A4:A6 needs no changing.The same process is repeated for the costper case in cell D18. Once those two for-mulas are “resized” we can copy themdown as needed for any new model. Armedwith just one example template, studentscan quickly set up this semi-automatic re-port for any similar transportation model.

Figure 6: Black and white graph for larger transportation problem.

Figure 7: 3D graph of transportation model results.See Classroom, page 12

Page 4: Transportation Problem Excel

12 Decision Line, March 2001

To avoid misunderstandings, studentsshould discuss co-authorship arrangementswith their advisors well in advance of thecompletion of the dissertation. A well-cho-sen advisor should have little difficulty re-lating to the student’s need to clarifyownership and responsibility for manu-scripts emanating from the dissertation.

In general, how should the order ofauthorship in co-authored work bedetermined?

Put the project initiator and leader first.

This criterion acknowledges the importanceof vision and direction on a project. On pa-pers initiated by students (e.g., course pa-pers or dissertations), I believe that firstauthorship should go to the student. How-ever, there are several additional criteria toconsider:• Alternate the order of authorship on mul-

tiple papers. This criterion works for ateam that will share work equally acrossmultiple articles.

• Place the authors in alphabetical or ran-dom order. These criteria usually are se-lected when contributions are equal andwhere the authors cannot determine othercriteria to apply.

• Put senior faculty first, followed by juniorfaculty and students. This criterion be-stows first authorship on people who en-joy a higher social position, independentof their contributions to the work. I per-sonally think that first authorship shouldbe earned, not bestowed, so I do not fa-vor this criterion.

• Give first authorship to the person whoneeds a publication the most. This crite-rion introduces a selfish motive and a logi-cal flaw. We could all argue that we needfirst authorship because it does more forus to have our names first than to have aco-author’s name first. First authorshipshould not be a charitable contribution byany author to another, so find anothercriterion that makes more sense.

What should my research priority bein the first year after getting myPh.D.?

You should prepare two manuscripts fromyour dissertation for submission to topjournals. At least one of these should be solo-authored.

The importance of “mining” your disser-tation cannot be overemphasized. Al-though you may be tired of the dissertationafter spending two to three years with it,you must shape it into the form of journalarticles soon after your defense is com-pleted. The dissertation is probably themost carefully supervised work you willever do, and it would be a shame not totake advantage of the extensive feedbackyou have received.

Many students seek new projects withnew colleagues when they take their firstacademic positions. I recommend againstmaking binding commitments to newwork before the old work is complete. Youcan discuss possible future work with yournew faculty colleagues, but you need mostof your research time in your first year in anew position to convert your dissertationinto published articles.

Should my publication strategy inthe years following my studiesemphasize quality or quantity?

Quality.

You can fulfill all of your professional ambi-tions with a series of premier journal articles,and your colleagues will recognize you forit. A portfolio filled with large numbers ofarticles in obscure journals is valued less thana portfolio with three, four or five outstand-ing articles in recognized top-tier journals.Clearly, not everything you write will endup in premier journals. But premier journalsshould be your main target.

I am sure doctoral students have many morequestions than the eight that I have posedon their behalf. My answers to these ques-tions should not be taken as the only correctanswers, and I do not assume that all doc-toral students are the same and need thesame advice. One’s individual advisor maybe able to provide deeper insights into aparticular student’s situation. Nonetheless,having pledged not to waffle on my advice,the answers given above are direct and re-flect the collective concerns of many studentsin many different academic settings. ■

Julie E. KendallSchool of Business-CamdenRutgers UniversityCamden, NJ 08102(609) 225-6585fax: (609) [email protected]://www.thekendalls.org

Graphical Report

The shipping pattern and labels found inA9:E12 in Figure 1 makes a good candidatefor a graphical report, and there are sev-eral good options. The first works wellwhen there are only a few rows and col-umns and includes a table of the shipmentsand is shown in Figure 5. This is a colorcolumn graph (option #4) with a data table.

The inclusion of a Data Table with thegraph may not be as attractive when thenames of the supply and demand cities are

longer, or there are too many rows or col-umns (more than 5). When the model hasa few rows and many columns, then thecolumn graph without the data table is agood option. At that point, the colors maybe a bit confusing, and so if black is chosenalong with some patterns, it is not a badchoice. Figure 6 shows such a graph for aproblem with 3 Plants by 6 Warehouses.This could be accompanied by the semi-automatic report instead of a data table.

A final option is to choose the 3D col-umn graph (option #7) for problems witha moderate number of rows and columns,as shown in Figure 7 for a third Transpor-tation model example. The only problemwith this option is that some columns canget hidden behind taller ones in front. The100 units of Lost Sales at Tucson are hiddenin the back corner unless the series are re-versed under the graph options. ■

Classroom, from page 9