Using Excel to Find Numerical Solutions to LP's



Similar documents
Solving Linear Programs in Excel

Using EXCEL Solver October, 2000

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

Tutorial: Using Excel for Linear Optimization Problems

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

EXCEL SOLVER TUTORIAL

Solving Linear Programs using Microsoft EXCEL Solver

Summary of important mathematical operations and formulas (from first tutorial):

EXCEL FINANCIAL USES

Using MS Excel to Analyze Data: A Tutorial

Creating a Gradebook in Excel

Excel basics. Before you begin. What you'll learn. Requirements. Estimated time to complete:

WHAT S NEW IN MS EXCEL 2013

Graphing Parabolas With Microsoft Excel

A Guide to Using Excel in Physics Lab

Linear Programming Refining Transportation

What is Microsoft Excel?

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

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

Excel Spreadsheets: Getting Started

Spreadsheets and Laboratory Data Analysis: Excel 2003 Version (Excel 2007 is only slightly different)

Excel 2003: Ringtones Task

SOLVING EQUATIONS WITH EXCEL

Sensitivity Report in Excel

Calc Guide Chapter 9 Data Analysis

How To Analyze Data In Excel 2003 With A Powerpoint 3.5

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

Microsoft Excel 2013 Tutorial

Construction Administrators Work Smart with Excel Programming and Functions. OTEC 2014 Session 78 Robert Henry

Microsoft Excel 2013 Splitting Windows and Fixing Panes (Level 3)

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

TI-Nspire CAS Graphing Calculator

USING EXCEL ON THE COMPUTER TO FIND THE MEAN AND STANDARD DEVIATION AND TO DO LINEAR REGRESSION ANALYSIS AND GRAPHING TABLE OF CONTENTS

Using VLOOKUP to Combine Data in Microsoft Excel

Linear Programming Notes VII Sensitivity Analysis

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

Assignment objectives:

Basic Pivot Tables. To begin your pivot table, choose Data, Pivot Table and Pivot Chart Report. 1 of 18

Using Microsoft Excel to Plot and Analyze Kinetic Data

Lab 11: Budgeting with Excel

Overview What is a PivotTable? Benefits

Using Excel s Solver

Microsoft Excel Tips & Tricks

Advanced Microsoft Excel 2010

To export data formatted for Avery labels -

As in the example above, a Budget created on the computer typically has:

Linear Programming. Solving LP Models Using MS Excel, 18

Airport Planning and Design. Excel Solver

Sample Table. Columns. Column 1 Column 2 Column 3 Row 1 Cell 1 Cell 2 Cell 3 Row 2 Cell 4 Cell 5 Cell 6 Row 3 Cell 7 Cell 8 Cell 9.

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

Everyday Excel Stuff Excel Day Planner Organizer Reference Guide

Using Excel for Business Analysis: A Guide to Financial Modelling Fundamentals

Simplex method summary

Excel 2007 Basic knowledge

15.053/8 February 26, 2013

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

warpct.com Working with MS Excel 2003 Workbook courseware by WARP! Computer Training

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

University of Southern California Marshall Information Services

Basic Formulas in Excel. Why use cell names in formulas instead of actual numbers?

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

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

Making an online form in Serif WebPlus

Create Charts and Graphs with Excel By Lorrie Jackson

Working together with Word, Excel and PowerPoint 2013

Excel Guide for Finite Mathematics and Applied Calculus

By: Peter K. Mulwa MSc (UoN), PGDE (KU), BSc (KU)

In-Depth Guide Advanced Spreadsheet Techniques

Instructions for Using Excel as a Grade Book

Pivot Tables & Pivot Charts

IBM ILOG CPLEX for Microsoft Excel User's Manual

Tracking Changes in Microsoft Word

Intro to Excel spreadsheets

Dealing with Data in Excel 2010

Create Charts in Excel

Microsoft Access Rollup Procedure for Microsoft Office Click on Blank Database and name it something appropriate.

Microsoft Excel Basics

MAIL MERGE TUTORIAL. (For Microsoft Word on PC)

Chapter 9 Creating Reports in Excel

Tutorial on Using Excel Solver to Analyze Spin-Lattice Relaxation Time Data

STEP TWO: Highlight the data set, then select DATA PIVOT TABLE

About Entering Donations in QuickBooks

Linear Programming. March 14, 2014

Using Excel to find Perimeter, Area & Volume

Excel Pivot Tables. Blue Pecan Computer Training Ltd - Onsite Training Provider :: :: info@bluepecan.co.

Using Excel to create a student database

Excel 2010: Create your first spreadsheet

Microsoft Excel 2010 Linking Worksheets and Workbooks

SECTION 5: Finalizing Your Workbook

Microsoft Excel - XP Intermediate

Intermediate PowerPoint

CONVERSION GUIDE Financial Statement Files from CSA to Accounting CS

RA MODEL VISUALIZATION WITH MICROSOFT EXCEL 2013 AND GEPHI

Excel 2007: Basics Learning Guide

Migrating to Excel 2010 from Excel Excel - Microsoft Office 1 of 1

Monthly Payroll to Finance Reconciliation Report: Access and Instructions

Microsoft Excel 2010 Charts and Graphs

Adding Comments in Microsoft Excel 2003

CHAPTER 11: BASIC LINEAR PROGRAMMING CONCEPTS

Transcription:

Using Excel to Find Numerical Solutions to LP's by Anil Arya and Richard A. Young This handout sketches how to solve a linear programming problem using Excel. Suppose you wish to solve the following LP: Max 100 x 1 +2x 2 subject to: 2 x 1 + x 2 100 x 1 +3x 2 120 x 1, x 2 0 A. Setting Up the Parameters in the Spreadsheet : 1. Enter Excel. Open up a new spreadsheet. 2. Enter the objective function coefficients in cells A1 and B1. See Table 1 below for input display. 3. Enter the coefficients on x 1 and x 2 respectively for the left-hand side of the first constraint in cells A3 and B3. (See Table 1 below.) Enter the right-hand side of this constraint in cell C3. Repeat for the second constraint in row 4. You get the idea. B. Enter the Data into the Spreadsheet in the Form to be Used Directly by Solver : 1. Place trial values in cells A6 and B6. These are purely arbitrary -- they don't even have to satisfy the constraints. After you solve the LP these cells will contain the solution. 2. Enter the objective function in cell A8, referring to the parameters set up in Step A.2 and the trial values in Step B.2. Notice that in the example the objective function is a linear function of the variables over which we shall optimize. 3. Enter the left- and right-hand side of the constraints, referring to the parameters set up in Step A.3. For the first constraint they are placed in cells A11 and B11, respectively. Repeat for the other constraints in rows 12-14. Notice that in the example the left-hand side is a linear function of the variables over which we shall optimize.

4. Be sure to explicitly enter the non-negativity constraints as illustrated in Table 1 and 2. You might get into trouble if the optimal solution would set one of the variables = 0 (as it does for the above LP). Tables 1 and 2 display the spreadsheet that I used to set up the problem. In Table 1 (for purposes of instruction), within the Tools menu I selected Preferences, then View, and checked the Formulas box in the Windows options area of the View window. Table 2 displays the spreadsheet in the default mode ( Formulas not checked). This is what things should look like just before you solve the LP. Table 1: Setting up the Spreadsheet (Display set to show formulas) Table 2: Setting up the Spreadsheet (Display set to hide formulas) 2

C. Initializing and Running Solver : 1. Select Solver from the Tools menu. Solver will work directly with cell A8 (the objective function) and cells A11, B11 and A12, B12 and A13, B13 and A14, B14 (the constraints). On the screen will appear the Solver Parameters window, which will appear as shown in Table 5 when you are all done. Continue. 2. Type A8 in the Set Target Cell: box. Be sure Max is selected (for maximization). 3. Type A6:B6 in By Changing Cells: box. 4. To build the constraints click Add. The Add Constraint window will appear as in Table 3. Type A11 in the Cell Reference box. The direction of the inequality should be set at <= for the first constraint. Type B11 in the Constraint: box. Click Add to keep adding constraints. A blank Add Constraint window will re-appear. When you get to the non-negativity constraints make sure >= is selected. To stop adding constraints click OK. 5. Click the Options box and then click Assume Linear Model, since this is an LP. Click Okay to return to Solver box. (See Table 4.) Table 3: Add Constraint Window 3

Table 4: Solver Options Window Table 5: Solver Window for Correctly Specified Model Tables 5 displays the Solver window for the model we wish to solve. Note the software has inserted dollar signs in cell labels; you did not need to do that yourself. Also, as you get more facile, you will learn that you can click and point or drag instead of typing in cell labels. 4

6. Now you are ready to solve the LP. Click Solve. If the solution looks a little messy (like "-1.1E-11," which is practically zero), run Solver again, with the current solution as the starting solution. Note : In the above example Assume Linear Model was selected, since this is an LP. If you decided to solve a non-linear program (non-linear objective or constraints), you should go into Options and make sure you have not selected Assume Linear Model. The other options are normally fine to leave at their default settings. Table 6: Results Window for Solver D. Sensitivity Analysis : 1. If you've done everything okay, a window should appear with the message "Solver found a solution. All constraints and optimality conditions are satisfied." (See Table 6 above.) Alternatively, you may get a message indicating that you need to run a few more iterations. This is unlikely with an LP of the size we'll be dealing with, but may obtain if you run a non-linear program. If this happens, click OK and then select Solve again, with the current solution as the starting solution. If you get a more troublesome message, such as the problem has not converged, etc., you probably have entered the problem incorrectly. Make sure that it's maximizing if that's what you want to do. Make sure the direction of the inequalities is correct. Make sure the non-negativity constraints have been entered. 2. Try selecting from within the Reports section of the Solver Results window one or more of: Answer, Sensitivity, and Limits. For example, if you select Sensitivity, a window will appear as in Table 7 below. This report is automatically placed into a separate Excel Sheet titled Sensitivity Report 1. You see the shadow prices are 50 on the first resource constraint and zero on the second. 5

Table 7: Results of Sensitivity Analysis 3. Now click on Sheet 1, which will appear as in Table 8 below. The optimal solution is: x 1 = 50, x 2 = 0, and the objective function is 5,000. Well done! Table 7: Successfully Run Program 6