Download presentation

Presentation is loading. Please wait.

Published byKenyon Hobby Modified about 1 year ago

1
Solving LP Problems in a Spreadsheet n n A company sells two models of hot tubs: the Aqua- Spa and the Hydro-Lux. n n The company purchases prefabricated fiberglass hot tub shells and installs a common water pump and the appropriate amount of tubing into each hot tub. Every Aqua-Spa produced can be sold to generate a profit of $350, and each Hydro-Lux produced can be sold to generate a profit of $300. n n Every Aqua-Spar requires 9 hours of labor and 12 feet of tubing; every Hydro -Lux requires 6 hours of labor and 16 feet of tubing.

2
n n The company expects to have 200 pumps, 1,566 hours of labor, and 2,800 feet of tubing available during the next production cycle. n n The problem is to determine the optimal number of Aqua-Spas and Hydro-Luxes to produce in order to maximize profits.

3
MAX: 350X 1 + 300X 2 } profit Subject to: 1X 1 + 1X 2 < 200 } pump constraint 9X 1 + 6X 2 < 1,566 } labor constraint 12X 1 + 16X 2 < 2,800 } tubing constraint 1X 1 > 0 simple lower bounds 1X 2 > 0 for the decision variables

4
Implementing an LP Model in a Spreadsheet n n 1. Organize the data for the model on the spreadsheet. è è First, the goal is to organize the data so their purpose and meaning are as clear as possible. è è Descriptive labels should be placed in the spreadsheet to clearly identify the various data elements. n n 2. Reserve separate cells in the spreadsheet to represent each decision variable in the algebraic model. è è This is often helpful in setting up formulas for the objective function and constraints. è è When possible, it is also a good idea to keep the cells representing decision variables in the same area of the spreadsheet.

5
n n 3. Create a formula in a cell in the spreadsheet that corresponds to the objective function in the algebraic model. è è The spreadsheet formula corresponding to the objective function is created by referring to the data cells where the objective function coefficients have been entered (or calculated) and to the corresponding cells representing the decision variables. n n 4. For each constraint in the algebraic model, create a formula in a cell in the spreadsheet that corresponds to the left-hand- side (LHS) of the constraint. è è The formula corresponding to the LHS of each constraint is created by referring to the data cells where the coefficients for these constraints have been entered (or calculated) and to the appropriate decision variable cells.

6
Decision Variables: X 1 X 2 Spreadsheet Cells: B 4 C 4 Algebraic Objective: 350 X 1 +300 X 2 Formula in cell E5: =B5*B4+C5*C4

7
LHS formula for the pump constraint: 1 X 1 + 1 X 2 Formula in cell D8: =B8*B4+C8*C4 LHS formula for the labor constraint: 9 X 1 + 6 X 2 Formula in cell D9: =B9*B4+C9*C4 LHS formula for the tubing constraint: 12 X 1 + 16 X 2 Formula in cell D10: =B10*B4+C10*C4 Summary of relationship between the LHS formulas of the constraints and their spreadsheet representations

9
Representing the Bounds on the Decision Variables How Solver Views the Model n n 1. Target cell--the cell in the spreadsheet that represents the objective function in the model (and whether its value should be maximized or minimized) n n 2. Changing cells--the cells in the spreadsheet that represent the decision variables in the model n n 3. Constraint cells--the cells in the spreadsheet that represent the LHS formulas of the constraints in the model (and any upper and lower bounds that apply to these formulas)

10
Summary of Solver terminology

11
Using Solver n n After implementing an LP model in a spreadsheet, we still need to solve the model. n n To do this we must first indicate to Solver which cells in the spreadsheet represent the objective function (or target cell), the decision variables (or changing cells), and the constraints (or constraint cells).

12
Defining the Target Cell n n In the Solver Parameters dialog box, specify the location of the cell that represents the objective function by entering it in the Set Target Cell box

13
Defining the Changing Cells n n If the decision variables were not in a contiguous range, we would have to list the individual decision variable cells separated by commas in the By Changing Cells box. n n Whenever possible, it is best to use contiguous cells to represent the decision variables.

14
Defining the Constraint Cells n n To define the constraint cells, click the Add button in the solver parameters box, then complete the Add Constraint dialog box. n n In the Add Constraint dialog box, click the Add button again to define additional constraints. Click the OK button when you have finished defining constraints. n n It is a good idea to keep constraints of a given type grouped in contiguous cells so you can select them at the same time.

15
Defining the Nonnegativity Conditions n n To do this, we simply add another set of constraints to the model

16
Solving the Model n n Click the Solve button in the Solver Parameters dialog box to solve the problem. n n When Solver finds the optimal solution, it displays the Solver Results dialog box.

Similar presentations

© 2017 SlidePlayer.com Inc.

All rights reserved.

Ads by Google