Ziggy MacDonald University of Leicester

Similar documents
Excel Tool: Plots of Data Sets

Excel Lab 2: Plots of Data Sets

Appendix A. Selected excerpts from behavior modeling session Examples of training screens

Advanced Excel. Table of Contents. Lesson 3 Solver

CALCULATING SQUARE ROOTS BY HAND By James D. Nickel

Applying mathematics to digital image processing using a spreadsheet

Environmental Stochasticity: Roc Flu Macro

UNIT TWO: Data for Simple Calculations. Enter and format a title Modify font style and size Enter column headings Move data Edit data

Using Excel Solver In Optimization Problems

Graph simple non-linear relations with and without the use of digital technologies and solve simple related equations.

x 1 x 2 x 3 x 4 x 5 x 6 b (essence of widget) (enhancement time) (production time)

For Linear Programming

Try what you learned (and some new things too)

MASSACHUSETTS INSTITUTE OF TECHNOLOGY

Pearson Edexcel GCE Decision Mathematics D2. Advanced/Advanced Subsidiary

QUICKSTART COURSE - MODULE 7 PART 3

Use Linear Regression to Find the Best Line on a Graphing Calculator

Plotting scientific data in MS Excel 2003/2004

30 Minute Quick Setup Guide

CCG Referral App - Northern Ireland

Electronic Companion to Accompany. Long Range Planning for a West Texas Catholic Diocese

Scanning Guide for Adobe Photoshop

Top Storyline Time-Saving Tips and. Techniques

Assignment 5 due Monday, May 7

Scanning: pictures and text

Cracking the Sudoku: A Deterministic Approach

GD&T Administrator Manual v 1.0

Software user guide. Contents. Introduction. The software. Counter 1. Play Train 4. Minimax 6

Enrichment chapter: ICT and computers. Objectives. Enrichment

Up to 100. App Topic: Mathematics: Building number sense. Educational Goals:

FPGA SI Tutorial - Simulating the Reflection Characteristics

Excel Module 2: Working with Formulas and Functions

5. SilverFast Tools Tools SilverFast Manual. 5. SilverFast Tools Image Auto-Adjust (Auto-Gradation) 114

The spreadsheet as a tool for teaching set theory: Part 1 an Excel lesson plan to help solve Sudokus

Adobe Photoshop CS5 Layers and Masks

Decision Mathematics D2 Advanced/Advanced Subsidiary. Thursday 6 June 2013 Morning Time: 1 hour 30 minutes

10.2. Scanning Document Camera Scoring. Page 1 of 5. How do I score answer sheets using a document camera? STEP 1

Tips and Techniques - SIMS

Table of Contents. Creating Your First Project 4. Enhancing Your Slides 8. Adding Interactivity 12. Recording a Software Simulation 19

Experiment 2: Electronic Enhancement of S/N and Boxcar Filtering

Microsoft Excel Math Formula Guide

Sheet Metal Punch ifeatures

Excel 2003: Discos. 1. Open Excel. 2. Create Choose a new worksheet and save the file to your area calling it: Disco.xls

The Fourth Dimension PRESENTS. By the accomplished author Gordon J. Key

Chapter 4. Linear Programming. Chapter Outline. Chapter Summary

Introduction to QTO. Objectives of QTO. Getting Started. Requirements. Creating a Bill of Quantities. Updating an existing Bill of Quantities

Antenna Modelling For Radio Amateurs Made Easier -Part 2

An Illustrated Guide To Linear Programming By Dr. Saul I. Gass

Managing hourly rates. Learn more about hourly rates, price groups and price lists Solvejg la Cour Andersen

Geometer s Sketchpad Version 4

House Design Tutorial

DEVELOPING THE WORKFORCE

Materials Tutorial. Setting Materials Defaults

Cosmic Color Ribbon CR150D. Cosmic Color Bulbs CB50D. RGB, Macro & Color Effect Programming Guide for the. November 22, 2010 V1.0

CETOL 6σ Tutorial. For Pro/Engineer and Creo Parametric. The table. CETOL 6σ / ProE. Page 1

Instructions for Rotary Marking

Overview. Initial Screen

Cosmic Color Ribbon CR150D. Cosmic Color Bulbs CB100D. RGB, Macro & Color Effect Programming Guide for the. February 2, 2012 V1.1

Pull Down Menu View Toolbar Design Toolbar

How to Make a Run Chart in Excel

MATHEMATICAL FUNCTIONS AND GRAPHS

Graphing with Excel. Data Table

Inventor Modeling Procedure By: Eric Small January 18, 2011

Instructions for Rotary Marking

IX Feb Operation Guide. Sequence Creation and Control Software SD011-PCR-LE. Wavy for PCR-LE. Ver. 5.5x

THE ASSOCIATION OF MATHEMATICS TEACHERS OF NEW JERSEY 2018 ANNUAL WINTER CONFERENCE FOSTERING GROWTH MINDSETS IN EVERY MATH CLASSROOM

Prerequisite Knowledge: Definitions of the trigonometric ratios for acute angles

House Design Tutorial

Kennaraglósur Excel Flóknari aðgerðir: Solver

Term Definition Introduced in: Tab(s) along the ribbon that show additional programs or features (e.g. Acrobat )

Excel Manual X Axis Label Below Chart 2010 >>>CLICK HERE<<<

Materials Tutorial. Chapter 6: Setting Materials Defaults

House Design Tutorial

Title: Quadrilaterals Aren t Just Squares

!"#$%&'("&)*("*+,)-(#'.*/$'-0%$1$"&-!!!"#$%&'(!"!!"#$%"&&'()*+*!

Land Cover Change Analysis An Introduction to Land Cover Change Analysis using the Multispectral Image Data Analysis System (MultiSpec )

NUMERATION AND NUMBER PROPERTIES

Autodesk Inventor Drawing Manager Tips & Tricks

Using the SDT in Access ARSI Training

ADOBE PHOTOSHOP CS 3 QUICK REFERENCE

Adobe Photoshop CC 2018 Tutorial

Microsoft Excel Lab Two (Completed 03/02/18) Transcript by Rev.com. Page 1 of 6

Drawing 1: Tools and Techniques in Corel Draw

DSLRShoot User Guide. Version 1.3

ArbStudio Triggers. Using Both Input & Output Trigger With ArbStudio APPLICATION BRIEF LAB912

The DesignaKnit Serial Brotherlink 3

Engineering Diploma Resource Guide ST150 ETP Research & Design (Engineering)

Computer Graphics and Image Editing Software

Volume of Revolution Investigation

Column Generation. A short Introduction. Martin Riedler. AC Retreat

Table of Contents. Lock-Off Rooms

6. Multivariate EDA. ACE 492 SA - Spatial Analysis Fall 2003

House Design Tutorial

Tableau. by Molly Monsey and Paul Sochan

Introduction to Simulink Assignment Companion Document

Managing hourly rates

LL assigns tasks to stations and decides on the position of the stations and conveyors.

Sudoku Tutor 1.0 User Manual

CHM 109 Excel Refresher Exercise adapted from Dr. C. Bender s exercise

Skill Builder. J. B. Wright A D VA N TA G E

Transcription:

1 -> 6 07.03.2006 21:38 Volume 9, Issue 3, 1995 Teaching Linear Programming using Microsoft Excel Solver Ziggy MacDonald University of Leicester Linear programming (LP) is one of the most widely applied O.R. techniques and owes its popularity principally to George Danzig's simplex method (Danzig 1963) and the revolution in computing. It is a very powerful technique for solving allocation problems and has become a standard tool for many businesses and organisations. Although Danzig's simplex method allows solutions to be generated by hand, the iterative nature of producing solutions is so tedious that had the computer never been invented then linear programming would have remained an interesting academic idea, relegated to the mathematics classroom. Fortunately, computers were invented and as they have become so powerful for so little cost, linear programming has become possibly one of the most widespread uses for a personal PC. There are of course numerous software packages which are dedicated to solving linear programs (and other types of mathematical program), of which possibly LINDO, GAMS and XPRESS-MP are the most popular. All these packages tend to be DOS based and are intended for a specialist market which requires tools dedicated to solving LPs. In recent years, however, several standard business packages, such as spreadsheets, have started to include an LP solving option, and Microsoft Excel is no exception. The inclusion of an LP solving capability into applications such as Excel is attractive for at least two reasons. Firstly, Excel is perhaps the most popular spreadsheet used both in business and in universities and as such is very accessible. Second to this, the spreadsheet offers very convenient data entry and editing features which allows the student to gain a greater understanding of how to construct linear programs. To use Excel to solve LP problems the Solver add-in must be included. Typically this feature is not installed by default when Excel is first setup on your hard disk. To add this facility to your Tools menu you need to carry out the following steps (once-only): 1. 2. 3. Select the menu option Tools Add_Ins (this will take a few moments to load the necessary file). From the dialogue box presented check the box for Solver Add-In. On clicking OK, you will then be able to access the Solver option from the new menu option Tools Solver (which appears below Tools Scenarios...) To illustrate Excel Solver I will consider Hillier & Lieberman's reasonably well known example, the Wyndor Glass Co. problem (Hillier & Lieberman, 1995). The problem concerns a glass manufacturer which uses three production plants to assemble its products, mainly glass doors (x1) and wooden frame windows (x2). Each product requires different times in the three plants and

2 -> 6 07.03.2006 21:38 there are certain restrictions on available production time at each plant. With this information and a knowledge of contributions to profit of the two products the management of the company wish to determine what quantities of each product they should be producing in order to maximise profits. In other words, the Wyndor Glass Co. problem is a classic, albeit very simple, product-mix problem. The problem is formulated as the following linear program: max z = 3x1 + 2x2 (objective) subject to x1 <= 4 (Plant One) 2x2 <= 12 (Plant Two) 3x1 + 2x2 <= 18 (Plant Three) x1, x2 >= 0 (Non-negativity requirements) where z = total profit per week x1 = number of batches of doors produced per week x2 = number of batches of windows produced per week. Having formulated the problem, and yours may have substantially more decision variables and constraints, you can then proceed to entering it into Excel. The best approach to entering the problem into Excel is first to list in a column the names of the objective function, decision variables and constraints. You can then enter some arbitrary starting values in the cells for the decision variables, usually zero, shown in Figure One. Excel will vary the values of the cells as it determines the optimal solutions. Having assigned the decision variables with some arbitrary starting values you can then use these cell references explicitly in writing the formulae for the objective function and constraints, remembering to start each formula with an '='. Figure One: Setting up the problem in Excel Entering the formulae for the objective and constraints, the objective function in B5 will be given by :

3 -> 6 07.03.2006 21:38 =3*B9+2*B10 The constraints will be given by (putting the right hand side {RHS} values in the adjacent cells): Plant One (B14) =B9 Plant Two (B15) =2*B10 Plant Three (B16) =3*B9+2*B10 Non-neg 1 (B17) =B9 Non neg 2 (B19) =B10 You are now ready to use Solver. On selecting the menu option Tools Solver the dialogue box shown in Figure Two is revealed, and if you select the objective cell before invoking Solver the correct Target Cell will be identified. This is the value Solver will attempt either to maximise or minimise. Figure Two: The Solver Dialogue Box Select whether you wish to minimise this or maximise the problem, in this case you would want to set the target cell (the objective) to a Max. Note that you can use Solver to find the outcome that will achieve a specified value for the target cell by clicking 'Value of:'. In doing this you can use Solver as a glorified goal seeker.next you enter the range of cells you want Solver to vary, the decision variables. Click on the white box and select cells B9 & B10, or alternatively type them in. Note that you can try to get Solver to guess which cells you want to vary by clicking the 'Guess' button. If you have defined your problem in a logical way Solver should usually get these right. You can now enter the constraints by first clicking the 'Add..' button. This reveals the dialogue box shown in Figure Three. Figure Three: Entering Constraints The cell reference is to the cell containing your constraint formula, so for the Plant One constraint you enter B14. By default <= is selected but you can change this by clicking on the drop down arrow to reveal a list of other constraint types. In the right hand white box you enter the cell reference to the cell containing the RHS value, which for the Plant One constraint is cell C14.

4 -> 6 07.03.2006 21:38 You then click 'Add' to add the rest of the constraints, remembering to include the non-negativity constraints. Having added all the constraints, click 'OK' and the Solver dialogue box should look like that shown in Figure Four. Figure Four: The Completed Solver Dialogue Box Before clicking 'Solve' it is good practice when doing LPs to go into the Options and check the 'Assume Linear Model' box, unless, of course, your model isn't linear (Solver can handle most mathematical program types, including non-linear and integer problems). Doing this can speed up the length of time taken for Solver to find a solution to the problem and in fact, it will also ensure the correct result and quite importantly, provide the relevant sensitivity report. Having selected this option you are now ready to Click 'Solve' and see Solver find the optimal values for doors and windows. On doing this, at the bottom of the screen Excel will inform you of Solver's progress, then on finding an optimal solution the dialogue box shown in Figure Five will appear. You will also observe that Solver has altered all the values in your spreadsheet, replacing them with the optimal results. You can use the Solver Results dialogue box to generate three reports. To select all three at once, either hold down CTRL and click each one in turn or drag the mouse over all three. Figure Five: Solver Results At the same time it's often a good idea to get Solver to restore your original values in the spreadsheet so that you can return to the original problem formulation and make adjustments to the model such as altering the availability of resources. The three reports are generated in new sheets in the current workbook of Excel. The Answer Report gives details of the solutions (in this case, profit is maximised at 36 when 2 doors per week are produced and 6 windows per week - not a particularly busy firm!) and information concerning the status of each constraint with accompanying slack/surplus values is provided. The Sensitivity Report for the Wyndor problem, which provides information about how

5 -> 6 07.03.2006 21:38 sensitive your solution is to changes in the constraints, is shown in Figure Six. Figure Six: Sensitivity Report for Wyndor As you can see from Figure Six, the report is fairly standard, providing information on shadow values, reduced cost and the upper and lower limits for the decision variables and constraints. The Limits Report also provides sensitivity information on the RHS values. All the reports can simply be copied and pasted into Word and this is perhaps one of the big advantages of using Excel over a DOS based LP solver. Although the reports paste into Word as tables, they are easily converted into text and can then be manipulated if one is producing a written report on your finding. Finally, there are several options to Solver that can allow you to amend/intervene in the solution generating process. The 'Options' button in the Solver dialogue box reveals the dialogue box shown in Figure Seven. You can use this to affect how accurate your solution is, how much 'effort' Solver puts into to finding the solution and whether you want to see the results of each iteration. Figure Seven: Solver Options The Tolerance option is only required for integer programs (IP), and allows Solver to use 'near integer' values, within the tolerance you specify, and this helps speed up the IP calculations.

6 -> 6 07.03.2006 21:38 Checking the Show Iteration Results box allows you to see each step of the calculation, but be warned, if your model is complex this can take an inordinate length of time. Use Automatic Scaling is useful if there is a huge difference in magnitude between your decision variables and the objective value. The bottom three options, Estimates, Derivatives and Search affect the way Solver approaches finding a basic feasible solution, how Solver finds partial differentials of the objective and constraints, and how Solver decides which way to search for the next iteration. Essentially the options affect how solver uses memory and the number of calculations it makes. For most LP problems, they are best left as the default values. The 'Save Model' button is very useful, particularly if you save your model as a named scenario. Clicking this button allows you to assign a name to the current values of your variable cells. This option then allows you to perform further 'what-if' analysis on a variety of possible alternative outcomes - very useful for exploring your model in greater detail. In conclusion, Excel Solver provides a simple, yet effective, medium for allowing users to explore linear programs. It can be used for large problems containing hundreds of variables and constraints, and does these relatively quickly, but as a teaching tool using small illustrative problems it is very potent, particularly as the student must appreciate the structure of a LP when entering it into the spreadsheet. On the downside, you can't view the Tableau as it is generated at each iteration and so those teachers who would want their students to be proficient in the manual methods of LP would find Solver less superior to, say, Lindo, which does allow this. It does, however, produce a superior set of results and sensitivity reports when compared to Lindo, and, due to the spreadsheet nature, does allow the student very quickly to observe the effects of any changes made to constraints or the objective function. This is particularly noticeable as the model formulation is easily accessible at the same time as the model results, these being simply placed in adjacent worksheets, accessible with a simple mouse click. Overall, using Excel, which is familiar to a large number of students, provides a rich environment for teaching linear programming and it allows students to explore their models in a structured, yet flexible, way. References 1. 2. 3. George B. Dantzig (1963) "Linear Programming and Extensions", Princeton University Press, Princeton, N.J. Frederick Hillier & Gerald Lieberman (1995) "Introduction to Operations Research", sixth edition, McGraw-Hill The Cobb Group (1994) "Running Excel 5 for Windows", fourth edition, Microsoft Press The author may be contacted at the following address: Ziggy MacDonald, Department of Economics, University of Leicester, University Road, Leicester LE1 7RH, United Kingdom. Telephone +44 (0)116 252 2894, Fax +44 (0) 252 2908, e-mail abm1@le.ac.uk What's Related: Other articles on the use of spreadsheets in teaching economics Copyright 1989-2005 Top CHEER Home Search