Using EXCEL Solver October, 2000



Similar documents
Images of Microsoft Excel dialog boxes Microsoft. All rights reserved. This content is excluded from our Creative Commons license.

Tutorial: Using Excel for Linear Optimization Problems

Solving Linear Programs using Microsoft EXCEL Solver

Solving Linear Programs in Excel

USING EXCEL 2010 TO SOLVE LINEAR PROGRAMMING PROBLEMS MTH 125 Chapter 4

Using Excel s Solver

EXCEL SOLVER TUTORIAL

E x c e l : Data Analysis Tools Student Manual

Linear Programming. Solving LP Models Using MS Excel, 18

Databases in Microsoft Access David M. Marcovitz, Ph.D.

Linear Programming II: Minimization 2006 Samuel L. Baker Assignment 11 is on page 16.

Notes on Excel Forecasting Tools. Data Table, Scenario Manager, Goal Seek, & Solver

Drawing a histogram using Excel

Table of Contents TASK 1: DATA ANALYSIS TOOLPAK... 2 TASK 2: HISTOGRAMS... 5 TASK 3: ENTER MIDPOINT FORMULAS... 11

Microsoft Excel - XP Intermediate

Calc Guide Chapter 9 Data Analysis

Using Analysis Tools: Goal Seek, Solver, and Data Tables

EXCEL FINANCIAL USES

Sensitivity Report in Excel

How To Analyze Data In Excel 2003 With A Powerpoint 3.5

Spreadsheets have become the principal software application for teaching decision models in most business

Chapter 6. Linear Programming: The Simplex Method. Introduction to the Big M Method. Section 4 Maximization and Minimization with Problem Constraints

Airport Planning and Design. Excel Solver

Graphing Parabolas With Microsoft Excel

Linear Programming Notes VII Sensitivity Analysis

Issues in Information Systems Volume 14, Issue 2, pp , 2013

Linear Programming Refining Transportation

Linear Programming Supplement E

WHAT S NEW IN MS EXCEL 2013

Linear Programming Notes V Problem Transformations

IBM ILOG CPLEX for Microsoft Excel User's Manual

Call Centre Helper - Forecasting Excel Template

Sensitivity Analysis with Excel

This activity will guide you to create formulas and use some of the built-in math functions in EXCEL.

What is a Mail Merge?

Using MS Excel to Analyze Data: A Tutorial

An Introduction to Excel Pivot Tables

KaleidaGraph Quick Start Guide

TIPS FOR DOING STATISTICS IN EXCEL

University of Southern California Marshall Information Services

Using Microsoft Excel to Plot and Analyze Kinetic Data

Solving Systems of Equations Using Mathcad Charles Nippert Solving A System of Equations By Symbolically Figure 1 After Step 1

Monthly Payroll to Finance Reconciliation Report: Access and Instructions

PA Payroll Exercise for Intermediate Excel

Excel Modeling Practice. The Svelte Glove Problem Step-by-Step With Instructions

In-Depth Guide Advanced Spreadsheet Techniques

Excel 2010: Create your first spreadsheet

Optimal Scheduling for Dependent Details Processing Using MS Excel Solver

Microsoft Excel 2013: Using a Data Entry Form

Advanced Excel 10/20/2011 1

Excel Database Management Microsoft Excel 2003

CDOT Monumentation Sheets

Chapter 6: Sensitivity Analysis

Creating a Gradebook in Excel

Microsoft Excel Introduction to Microsoft Excel 2007

IEOR 4404 Homework #2 Intro OR: Deterministic Models February 14, 2011 Prof. Jay Sethuraman Page 1 of 5. Homework #2

Appendix 2.1 Tabular and Graphical Methods Using Excel

SPSS Workbook 1 Data Entry : Questionnaire Data

Introduction to Microsoft Excel 2010

CHAPTER 11: BASIC LINEAR PROGRAMMING CONCEPTS

Sage Timesheet Web Access How To Use Timesheet

Simplex method summary

Directions for Frequency Tables, Histograms, and Frequency Bar Charts

Figure 1. An embedded chart on a worksheet.

LEARNING RESOURCE CENTRE GUIDE TO OFFICE 365

PERFORMING REGRESSION ANALYSIS USING MICROSOFT EXCEL

The KaleidaGraph Guide to Curve Fitting

Microsoft Publisher 2010: Web Site Publication

Microsoft Excel 2007 Consolidate Data & Analyze with Pivot Table Windows XP

Introduction To Microsoft Office Excel Bob Booth July 2008 AP-Excel8

Advanced Excel Charts : Tables : Pivots : Macros

Statgraphics Getting started

ACADEMIC TECHNOLOGY SUPPORT

Excel -- Creating Charts

Microsoft Excel Tutorial

Basic Excel Handbook

Getting Started with Excel Table of Contents

EXCEL EXERCISE #8: Consolidating and Linking Spreadsheets

EXCEL Tutorial: How to use EXCEL for Graphs and Calculations.

EXCEL PIVOT TABLE David Geffen School of Medicine, UCLA Dean s Office Oct 2002

Using CPLEX. =5 has objective value 150.

Produced by Flinders University Centre for Educational ICT. PivotTables Excel 2010

Advanced Microsoft Excel 2010

MS Excel. Handout: Level 2. elearning Department. Copyright 2016 CMS e-learning Department. All Rights Reserved. Page 1 of 11

MODELLING. IF...THEN Function EXCEL Wherever you see this symbol, make sure you remember to save your work!

How to Create a Spreadsheet With Updating Stock Prices Version 3, February 2015

PowerWorld Simulator

Linear programming. Learning objectives. Theory in action

Using Excel. 4. The Scenario Manager function is used to create and evaluate a collection of what-if scenarios containing multiple input values.

Help. F-Secure Online Backup

APPLYING BENFORD'S LAW This PDF contains step-by-step instructions on how to apply Benford's law using Microsoft Excel, which is commonly used by

Quick Start Guide. Highly customizable automated trading Automate your trades according to rules and models you create.

LINEAR PROGRAMMING WITH THE EXCEL SOLVER

How to Create a Data Table in Excel 2010

Operating Systems. and Windows

Excel I Sorting and filtering Revised February 2013

To launch the Microsoft Excel program, locate the Microsoft Excel icon, and double click.

Analyzing Excel Data Using Pivot Tables

Linear Programming Sensitivity Analysis

Transcription:

Using EXCEL Solver October, 2000

2 The Solver option in EXCEL may be used to solve linear and nonlinear optimization problems. Integer restrictions may be placed on the decision variables. Solver may be used to solve problems with up to 200 decision variables, 100 explicit constraints and 400 simple constraints (lower and upper bounds and/or integer restrictions on the decision variables). To invoke Solver, select Tools from the main menu and then Solver. The Solver Parameters dialog box will appear as shown below.

3 The Solver Parameters Dialog Box The Solver Parameters Dialog Box is used to describe the optimization problem to EXCEL. The Set Target Cell box should contain the cell location of the objective function for the problem under consideration. Max or Min may be selected for finding the maximum or minimum of the set target cell. If Value is selected, the Solver will attempt to find a value of the Target Cell equal to whatever value is placed in the box just to the right of this selection. The By Changing Cells box should contain the location of the decision variables for the problem. Finally, the constraints must be specified in the Subject to the Constraints box by clicking on Add. Change allows you to modify a constraint already entered and Delete allows you to delete a previously entered constraint. Reset All clears the current problem and resets all parameters to their default values. Options invokes the Solver options dialog box (to be discussed later). The Guess selection is not particularly useful for our purposes and will not be discussed here. The relevant pieces of the Solver Parameters dialog box are labeled below for easy reference. When the Add button is clicked, the Add Constraint dialog box appears:

4 Clicking on the Cell Reference Box allows you to specify a cell location (usually a cell with a formula). The constraint type may be set by selecting the down arrow (<=, >=, =, int, where int refers to integer, or bin, where bin refers to binary). The Constraint box may contain a formula of cells, a simple cell reference, or a numerical value. The Add button adds the currently specified constraint to the existing model and returns to the Add Constraint dialog box. The OK button adds the current constraint to the model and returns you to the Solver Dialog box. Note: Solver does not assume nonnegativity of the decision variables. The options dialog box discussed below allows you to specify that the variables must be nonnegative. If the Options button is selected from the Solver Parameters dialog box, the following dialog box appears:

5 Max Time allows you to set the number of seconds before Solver will stop. Iterations, similar to Max Time, allows you to specify the maximum number of iterations (steps of the solver algorithm) before stopping. Precision is the degree of accuracy of the solver algorithm (for example, how close does the value of the left-hand side of a constraint have to be before it is considered equal to the right-hand side). Tolerance is used for integer programs. It specifies a percentage within which the solution is guaranteed to be optimal. If you seek the optimal solution, this must be set to zero. If run time becomes too long, you may wish to set this to a higher value (if you are willing to accept a solution within this percent of optimality). If your model is a linear program or a linear integer program, you should check Assume Linear Model. This tells Solver to use the simplex algorithm rather than a more time consuming nonlinear algorithm (Generalized Reduced Gradient Method). Assume Non-Negative should be checked if you want all of your changing cell values to be 0. Check Show Iterations Results if you want to see information iteration by iteration (this can really slow things down!). Use Automatic Scaling is useful if your model is poorly scaled (if the inputs are of drastically different orders of magnitude). Finally, the bottom section of the dialog box concerns options for the nonlinear algorithm, namely, how it estimates nonlinearities, how rates of change are estimated and the type of search technique employed. Generally speaking, the default values of most of these parameters work fine. The important thing to remember is to check Assume Linear Model if you have a linear program or integer linear program. Check Assume Non-Negativity if you want the changing cells to take on only non-negative values. Also, if you are solving an integer program and seek the optimal solution, be sure to set the Tolerance to 0%.

6 An Example: The Colorado Cattle Company 1 The Colorado Cattle Company (CCC) can purchase three types of raw feed ingredients from a wholesale distributor. The company's cattle have certain nutritional requirements with respect to fat, protein, calcium and iron. Each cow requires at least 10 units of calcium, no more than 7.5 units of fat, at least 12 units of iron and at least 15 units of protein per day. The table below shows the amount of fat, protein, calcium and iron in each pound of the three feed ingredients. Grade 1 feed costs $.25, grade 2, $.10, and grade 3, $.08 per pound. The cattle can be fed a mixture of the three types of raw feed. CCC would like to feed its herd as cheaply as possible. -------------------------------------------------------------------------------------------------------------------- Colorado Cattle Company Data Feed Ingredients (Units Per Pound) Grade 1 Grade 2 Grade 3 Calcium.7.8 0 Iron.9.8.8 Protein.8 1.5.9 Fat.5.6.4 ------------------------------------------------------------------------------------------------------------------- A linear programming model of this problem follows: Let grade1 = amount (in lbs.) of grade 1 to use per day in feeding a cow grade2 = amount (in lbs.) of grade 2 to use per day in feeding a cow grade3 = amount (in lbs.) of grade 3 to use per day in feeding a cow 1 This problem is from Camm, J.D. and Evans, J.R., Management Science, Modeling, Analysis, and Interpretation, South-Western Publishing Co., Cincinnati, Ohio, 1996.

7 Minimize.25 grade1 +.1 grade2 +.08 grade3 subject to.7 grade1 +.8 grade2 + 0 grade3 10 (Calcium).9 grade1 +.8 grade2 +.8 grade3 12 (Iron).8 grade1 + 1.5 grade2 +.9 grade3 15 (Protein).5 grade1 +.6 grade2 +.4 grade3 7.5 (Fat) grade1, grade2, grade3 0 An EXCEL spreadsheet model of this scenario follows

8 The cell formulas in this spreadsheet all occur in the Model Outputs (i.e. Constraints) section: A B C 18 Model Outputs (I.e. Constraints): 19 Amount 20 Calcium =SUMPRODUCT(B7:D7,B15:D15) 21 Iron =SUMPRODUCT(B8:D8,B15:D15) 22 Protein =SUMPRODUCT(B9:D9,B15:D15) 23 24 Fat =SUMPRODUCT(B10:D10,B15:D15) 25 26 Total Cost =SUMPRODUCT(B6:D6,B15:D15) The SUMPRODUCT function performs the dot product. For example, the amount of calcium used is SUMPRODUCT(B7:D7,B15:D15) = ( B7*B15 + C7*C15 + D7*D15 ). The following steps are used to create the LP model shown below: 1. Select Tools and then Solver. 2. Click on the Set Target Cell box and type B26. 3. Click on Min. 4. Click on the By Changing Cells box and, in the spreadsheet, click and drag mouse from B15 to D15 (or type B15:D15). 5. Click the Add button to invoke the Add Constraint dialog box. 6. To enter the minimum requirement constraints: In the Cell Reference box click and enter B20:B22, select >= type and then click on the Constraint box and enter F7:F9. Click on Add. 7. To enter the maxmimum allowed constraint: In the Cell Reference box click and enter B24, select <= type and then click on the Constraint box and enter G10. Click on the OK Button. 8. Finally select Options, Assume Non-negativity and Assume Linear Model.

9 The complete model in the Solver Parameters dialog box is as follows: To solve the model, click the Solve button. After the problem has been solved, the Solver Results box will appear: You have the option of keeping the solution found by Solver in the spreadsheet or restoring the original values. Also, as shown in the Reports box, three different reports may be automatically generated. You may select any of these reports by clicking on them within this box. In the next section, each of the reports is described.

10 Solver Reports Solver generates three reports for linear programs, an Answer Report, Sensitivity Report and a Limits Report. If the Keep Solver Solution option has been selected from the Solver results box, then the optimal solution is kept in the spreadsheet itself. For the Colorado Cattle Company problem, this is shown below. The Answer Report gives the original and final value of the Target Cell and all Adjustable Cells as well as a listing of each constraint and its status (note: the term slack is used to describe both slack and surplus variables). The answer Report for the Colorado Cattle Company model is shown on the following page. Notice that EXCEL labels the Target Cell, Adjustable Cells and Constraints by using the first text found to the left and above each of the cells. Microsoft Excel 8.0 Answer Report Worksheet: [CCC.XLS]CCC Report Created: 12/11/97 8:33:07 AM Target Cell (Min) Cell Name Original Value Final Value $B$26 Total Cost Amount $0.00 $2.59 Adjustable Cells Cell Name Original Value Final Value $B$15 Quantity Grade 1 0 8 $C$15 Quantity Grade 2 0 5.5 $D$15 Quantity Grade 3 0 0.5 Constraints Cell Name Cell Value Formula Status Slack $B$20 Calcium Amount 10 $B$20>=$F$7 Binding 0 $B$21 Iron Amount 12 $B$21>=$F$8 Binding 0 $B$22 Protein Amount 15.1 $B$22>=$F$9 Not Binding 0.1 $B$24 Fat Amount 7.5 $B$24<=$G$10 Binding 0

11 The Sensitivity Report gives the optimal value of each adjustable cell, its reduced cost, the objective function coefficient and the increase and decrease of the objective function coefficient for which the current solution will remain optimal (everything else held fixed). For example, in the Colorado Cattle Company Sensitivity Report shown below, the cost of grade 1 may decrease by up to.1425 and the current solution will remain optimal. The shadow price for each constraint (the change in the objective function per unit of increase in the right-hand side) is given along with the increase and decrease of the right-hand side value for which this price is valid. For example, in the Colorado Cattle Company Sensitivity Report shown below, an increase of.5 units of fat amount (which is within the allowable increase on that constraint of 1) will result in a change in the objective function of (.5)x(-1.14) = -.57. Microsoft Excel 8.0 Sensitivity Report Worksheet: [CCC.XLS]CCC Report Created: 12/11/97 8:33:07 AM Adjustable Cells Final Reduced Objective Allowable Allowable Cell Name Value Cost Coefficient Increase Decrease $B$15 Quantity Grade 1 8 0 0.25 1E+30 0.1425 $C$15 Quantity Grade 2 5.5 0 0.1 0.162857143 1E+30 $D$15 Quantity Grade 3 0.5 0 0.08 0.177142857 2.68 Constraints Cell Name $B$20 Calcium Amount $B$21 Iron Amount $B$22 Protein Amount $B$24 Fat Amount Final Value 10 12 15.1 7.5 Shadow Price 0.31 0.67 0-1.14 Constraint Allowable Allowable R.H. Side Increase Decrease 10 0.137931034 4 12 0.054794521 2 15 0.1 1E+30 7.5 1 0.016949153

12 The Limits Report (shown below for the Colorado Cattle Company Example) gives the lower and upper limits of each adjustable cell holding all other adjustable cells at their current value, and satisfying the constraints. The report below shows that the solution to the Colorado Cattle Company Example is very tight (with two of the three adjustable cells fixed at their target values, the third has lower and upper limits equal to its target value). Microsoft Excel 8.0 Limits Report Worksheet: [CCC.XLS]CCC Report Created: 12/11/97 8:33:07 AM Target Cell Name Value $B$26 Total Cost Amount $2.59 Adjustable Lower Target Upper Target Cell Name Value Limit Result Limit Result $B$15 Quantity Grade 1 8 8 2.59 8 2.59 $C$15 Quantity Grade 2 5.5 5.5 2.59 5.5 2.59 $D$15 Quantity Grade 3 0.5 0.5 2.59 0.5 2.59 Solving Integer and Nonlinear Problems Solving integer linear models, nonlinear models, and even nonlinear integer models is accomplished through the same techniques previously described. To specify a constraint as integer invoke the Add Constraint dialog box, select the adjustable cell in the Cell Reference and choose the int (integer) type (for binary variables choose bin). For nonlinear models, simply do not specify Assume Linear Model in the Options dialog box.