Sei sulla pagina 1di 18

Topic 3 – Linear Optimization Using Excel

„ Outline of Last Topic „ Outline of This Topic


z Optimization z Graphical vs. Spreadsheet Approach to LP
z Forms of Optimization Problem Problems
z Types of Optimization Problems ¾ Limitations of Graphical Solution
z Simple Example of LP Problem ¾ Advantages of Spreadsheet Approach
¾ Plotting the First Constraint z Standard Solver
¾ Plotting the Second Constraint ¾ What is Solver?
¾ Plotting the Third Constraint ¾ What can Solver do?
¾ The “Feasible Region” ¾ Parameters of Standard Solver
¾ Plotting A Level Curve of the Objective z Spreadsheet Approach to LP Problems
Function ¾ Implementation Steps of an LP Model on
¾ A Second Level Curve of the Objective Excel using Solver
Function ¾ Design Guidelines
¾ Using A Level Curve to Locate the Optimal ¾ Goals for Spreadsheet Design
Solution
z LP Model Examples Using Spreadsheet
¾ Calculating the Optimal Solution
¾ Blue Ridge Hot Tubs
¾ Enumerating The Corner Points
¾ Make vs. Buy Decisions
¾ Summary of Graphical Solution to LP
Problems ¾ Cost of Transporting Cars
¾ Special Conditions in LP Models ¾ An Investment Problem
¾ A Blending Problem
z Another Simple Example of LP Problem

NGU Never Give Up BMT Become Multi-Talented


(C) Davar Pishva, 2017 Decision Making Under Uncertainty 1

Graphical vs. Spreadsheet Approach to LP Problems


„ Limitations of Graphical Solution
z Solving LP problems graphically is only possible when there are two
decision variables.
z There are, however, few real-world LP problems that have only two
decision variables.
¾ Fortunately, we can now use spreadsheets to solve LP problems.
„ Advantages of Spreadsheet Approach
z Use of Spreadsheets have become part of our daily routine.
z Spreadsheets are not limited to two decision variables.
z There are so many special packages available from 3rd parties for solving
LP Problems.
¾ E.g., Solver, AMPL, LINDO, CPLEX, MPSX, etc.
¾ In this course we will use Solver, a product of Frontline Systems Inc., a
leading company in Spreadsheet Optimization and Simulation.
– Solver is available for Excel, Lotus 1-2-3, and Quattro Pro
– Solver URL: http://www.solver.com
– We will mainly use a built-in standard version of Solver in Excel and Analytic
Solver Platform for Education (ASPE) for solving LP problems.

NGU Never Give Up BMT Become Multi-Talented


(C) Davar Pishva, 2017 Decision Making Under Uncertainty 2
Standard Solver
„ What is Solver?
z Solver is part of a suite of commands sometimes called “what-if analysis” tools.
„ What can Solver do?
z Through Solver one can automatically change values in cells designated for Decision
Variables — called the Changing Cells — to see how those changes affect the outcome
of formulas on the worksheet.
z We can find an optimal value for a formula that represents the Objective Function in one
cell — called the Target Cell — on a worksheet.
¾ Solver works with a group of cells that are related, either directly or indirectly, to the formula in the
Target Cell.
¾ Solver adjusts the values in the adjustable cells to produce the result that you specify from the
Target Cell formula.
¾ You can apply Constraints to restrict the values that Solver can use in the model, and the
constraints can refer to other cells that affect the Target Cell formula.
„ Parameters of Standard Solver

NGU Never Give Up BMT Become Multi-Talented


(C) Davar Pishva, 2017 Decision Making Under Uncertainty 3

Spreadsheet Approach to LP Problems


„ Implementation Steps of an LP Model on Excel using Solver
1. Organize the data for the model on the spreadsheet.
2. Reserve separate cells in the spreadsheet for each decision variable in the model.
3. Create a formula in a cell in the spreadsheet that corresponds to the objective function.
4. For each constraint, create a formula in a separate cell in the spreadsheet that corresponds
to the left-hand side (LHS) of the constraint.
5. Specify the locations of Objective Function, Decision Variables, and LHS, onto the
Solver parameters’ Target Cell, Changing Cells, and Constraints areas, respectively.
„ Design Guidelines
z Organize the data, then build the model around the data.
z Do not embed numeric constants in formulas.
z Things which are logically related should be physically related.
z Use formulas that can be copied.
z Columns/rows totals should be close to the columns/rows being totaled.
z The English-reading eye scans left to right, top to bottom.
z Use color, shading, borders and protection to distinguish changeable parameters from other
model elements.
z Use text boxes and cell notes to document various elements of the model.

more…
NGU Never Give Up BMT Become Multi-Talented
(C) Davar Pishva, 2017 Decision Making Under Uncertainty 4
Spreadsheet Approach to LP Problems (cont’d)
„ Goals for Spreadsheet Design
z Communication
¾A spreadsheet's primary business purpose is communicating
information to managers.
z Reliability
¾The output a spreadsheet generates should be correct and
consistent.
z Auditability
¾A manager should be able to retrace the steps followed to
generate the different outputs from the model in order to
understand and verify results.
z Modifiability
¾A well-designed spreadsheet should be easy to change or
enhance in order to meet dynamic user requirements.

NGU Never Give Up BMT Become Multi-Talented


(C) Davar Pishva, 2017 Decision Making Under Uncertainty 5

LP Model Examples Using Spreadsheet


„Blue Ridge Hot Tubs
zMAX: 350X1 + 300X2 } profit
¾S.T.: 1X1 + 1X2 <= 200 } pumps
9X1 + 6X2 <= 1566 } labor
12X1 + 16X2 <= 2880 } tubing
X1 >= 0, X2 >= 0 } nonnegativity

NGU Never Give Up BMT Become Multi-Talented


(C) Davar Pishva, 2017 Decision Making Under Uncertainty 6
Spreadsheet Approach: Excel Model

NGU Never Give Up BMT Become Multi-Talented


(C) Davar Pishva, 2017 Decision Making Under Uncertainty 7

Spreadsheet Approach: The Solver Parameters

NGU Never Give Up BMT Become Multi-Talented


(C) Davar Pishva, 2017 Decision Making Under Uncertainty 8
Spreadsheet Approach: Result of the Model

NGU Never Give Up BMT Become Multi-Talented


(C) Davar Pishva, 2017 Decision Making Under Uncertainty 9

Another Model: Make vs. Buy Decisions


„ The Electro-Poly Corporation
z Electro-Poly is a leading maker of slip-rings.
z It has just received a $750,000 order.
z The company has 10,000 hours of wiring capacity and 5,000 hours
of harnessing capacity.
z How many should it make, and (if necessary) how many should it
buy?
Model 1 Model 2 Model 3
Number ordered 3,000 2,000 900
Hours of wiring/unit 2 1.5 3
Hours of harnessing/unit 1 2 1
Cost to Make $50 $83 $130
Cost to Buy $61 $97 $145

more…
NGU Never Give Up BMT Become Multi-Talented
(C) Davar Pishva, 2017 Decision Making Under Uncertainty 10
Another Model: Make vs. Buy Decisions (cont’d)
„ Defining the Decision Variables
z M1 = Number of model 1 slip rings to make in-house
z M2 = Number of model 2 slip rings to make in-house
z M3 = Number of model 3 slip rings to make in-house
z B1 = Number of model 1 slip rings to buy from competitor
z B2 = Number of model 2 slip rings to buy from competitor
z B3 = Number of model 3 slip rings to buy from competitor
„ Defining the Objective Function
z Minimize the total cost of filling the order, i.e.,
¾ MIN: 50M1+ 83M2+ 130M3+ 61B1+ 97B2+ 145B3
more…
NGU Never Give Up BMT Become Multi-Talented
(C) Davar Pishva, 2017 Decision Making Under Uncertainty 11

Another Model: Make vs. Buy Decisions (cont’d)


„Defining the Constraints
z Demand Constraints
¾ M1 + B1 = 3,000 } model 1
¾ M2 + B2 = 2,000 } model 2
¾ M3 + B3 = 900 } model 3
z Resource Constraints
¾ 2M1 + 1.5M2 + 3M3 <= 10,000 } wiring
¾ 1M1 + 2.0M2 + 1M3 <= 5,000 } harnessing
z Nonnegativity Conditions
¾ M1, M2, M3, B1, B2, B3 >= 0

more…
NGU Never Give Up BMT Become Multi-Talented
(C) Davar Pishva, 2017 Decision Making Under Uncertainty 12
Spreadsheet Approach: Excel Model

NGU Never Give Up BMT Become Multi-Talented


(C) Davar Pishva, 2017 Decision Making Under Uncertainty 13

Spreadsheet Approach: The Solver Parameters

NGU Never Give Up BMT Become Multi-Talented


(C) Davar Pishva, 2017 Decision Making Under Uncertainty 14
Spreadsheet Approach: Result of the Model

NGU Never Give Up BMT Become Multi-Talented


(C) Davar Pishva, 2017 Decision Making Under Uncertainty 15

A 3rd Model: Rent-A-Dent Car Rental Co


„Minimize Cost of Transporting Cars
z Rent-A-Dent allows its customers to pick up a rental car at one location
and return it to any of its locations.
z Locations 1 and 2 have 16 and 18 surplus cars, and locations 3, 4, 5, and
6 each need 10 cars.
z Each location needing cars gets at least 5 cars.
z The cost of transporting cars is shown below.

Location 3 Location 4 Location 5 Location 5


Location 1 $54 $17 $23 $30
Location 2 $24 $18 $19 $31
more…
NGU Never Give Up BMT Become Multi-Talented
(C) Davar Pishva, 2017 Decision Making Under Uncertainty 16
A 3rd Model: Rent-A-Dent Car Rental Co (cont’d)
3 10
$54

$17 $24
16 1
$23
$30 4 10
Surplus $18
Needed
Cars Cars

5 10
$19
18 2

$31 10
6

more…
NGU Never Give Up BMT Become Multi-Talented
(C) Davar Pishva, 2017 Decision Making Under Uncertainty 17

A 3rd Model: Rent-A-Dent Car Rental Co (cont’d)


„ Defining the Decision Variables
z X13 = Transportation Costs from Location 1 to 3
z X14 = Transportation Costs from Location 1 to 4
z X15 = Transportation Costs from Location 1 to 5
z X16 = Transportation Costs from Location 1 to 6
z X23 = Transportation Costs from Location 2 to 3
z X24 = Transportation Costs from Location 2 to 4
z X25 = Transportation Costs from Location 2 to 5
z X26 = Transportation Costs from Location 2 to 6
„ Defining the Objective Function
z Minimize the total cost of transporting cars, i.e.,
¾ MIN: 54 X13 + 17 X14 + 23 X15 + 30 X16 + 24 X23 + 18 X24 + 19 X25 + 31 X26

more…
NGU Never Give Up BMT Become Multi-Talented
(C) Davar Pishva, 2017 Decision Making Under Uncertainty 18
A 3rd Model: Rent-A-Dent Car Rental Co (cont’d)
„Defining the Constraints
z Demand Constraints
¾ 5 <= X13 + X23 <= 10 } range of cars to be shipped to location 3
¾ 5 <= X14 + X24 <= 10 } range of cars to be shipped to location 4
¾ 5 <= X15 + X25 <= 10 } range of cars to be shipped to location 5
¾ 5 <= X16 + X26 <= 10 } range of cars to be shipped to location 6
z Resource Constraints
¾ X13 + X14 + X15 + X16 = 16 } surplus cars at location 1
¾ X23 + X24 + X25 + X26 = 18 } surplus cars at location 2

more…
NGU Never Give Up BMT Become Multi-Talented
(C) Davar Pishva, 2017 Decision Making Under Uncertainty 19

Spreadsheet Approach: Excel Model

NGU Never Give Up BMT Become Multi-Talented


(C) Davar Pishva, 2017 Decision Making Under Uncertainty 20
Spreadsheet Approach: The Solver Parameters

NGU Never Give Up BMT Become Multi-Talented


(C) Davar Pishva, 2017 Decision Making Under Uncertainty 21

Spreadsheet Approach: Result of the Model

NGU Never Give Up BMT Become Multi-Talented


(C) Davar Pishva, 2017 Decision Making Under Uncertainty 22
4th Model: An Investment Problem
„ Retirement Planning Services, Inc.
z A client wishes to invest $750,000 in the following bonds.
¾ No more than 25% can be invested in any single company.
¾ At least 50% should be invested in long-term bonds (maturing in 10+ years).
¾ No more than 35% can be invested in DynaStar, Eagle Vision, and OptiPro.

Company Return Years to Mature Rating


Acme Chemical 8.65% 11 1-Excellent
DynaStar 9.50% 10 3-Good
Eagle Vision 10.00% 6 4-Fair
Micro Modeling 8.75% 10 1-Excellent
OptiPro 9.25% 7 3-Good
Sabre Systems 9.00% 13 2-Very Good
more…
NGU Never Give Up BMT Become Multi-Talented
(C) Davar Pishva, 2017 Decision Making Under Uncertainty 23

4th Model: An Investment Problem (cont’d)


„ Defining the Decision Variables
z X1 = amount of money to invest in Acme Chemical
z X2 = amount of money to invest in DynaStar
z X3 = amount of money to invest in Eagle Vision
z X4 = amount of money to invest in MicroModeling
z X5 = amount of money to invest in OptiPro
z X6 = amount of money to invest in Sabre Systems
„ Defining the Objective Function
z Maximize the total annual investment return: , i.e.,
¾ MAX: .0865X1+ .095X2+ .10X3+ .0875X4+ .0925X5+ .09X6
more…
NGU Never Give Up BMT Become Multi-Talented
(C) Davar Pishva, 2017 Decision Making Under Uncertainty 24
4th Model: An Investment Problem (cont’d)
„Defining the Constraints
z Total amount is invested
X1 + X2 + X3 + X4 + X5 + X6 = 750,000
z No more than 25% in any one investment
Xi <= 187,500, for all i
z 50% long term investment restriction.
X1 + X2 + X4 + X6 >= 375,000
z 35% Restriction on DynaStar, Eagle Vision, and OptiPro.
X2 + X3 + X5 <= 262,500
z Nonnegativity conditions
Xi >= 0 for all i

more…
NGU Never Give Up BMT Become Multi-Talented
(C) Davar Pishva, 2017 Decision Making Under Uncertainty 25

Spreadsheet Approach: Excel Model

NGU Never Give Up BMT Become Multi-Talented


(C) Davar Pishva, 2017 Decision Making Under Uncertainty 26
Spreadsheet Approach: The Solver Parameters

NGU Never Give Up BMT Become Multi-Talented


(C) Davar Pishva, 2017 Decision Making Under Uncertainty 27

Spreadsheet Approach: Result of the Model

NGU Never Give Up BMT Become Multi-Talented


(C) Davar Pishva, 2017 Decision Making Under Uncertainty 28
5th Model: A Blending Problem
„ The Agri-Pro Company
z Agri-Pro has received an order for 8,000 pounds of
chicken feed to be mixed from the following feeds.
¾The order must contain at least 20% corn, 15% grain, and 15%
minerals.

%Nutrient %Nutrient %Nutrient %Nutrient


Nutrient
Feed 1 Feed 2 Feed 3 Feed 4
Corn 30% 5% 20% 10%
Grain 10% 30% 15% 10%
Minerals 20% 20% 20% 30%
Cost per pound $0.25 $0.30 $0.32 $0.15

more…
NGU Never Give Up BMT Become Multi-Talented
(C) Davar Pishva, 2017 Decision Making Under Uncertainty 29

5th Model: A Blending Problem (cont’d)


„ Defining the Decision Variables
z X1 = pounds of feed 1 to use in the mix
z X2 = pounds of feed 2 to use in the mix
z X3 = pounds of feed 3 to use in the mix
z X4 = pounds of feed 4 to use in the mix

„ Defining the Objective Function


z Minimize the total cost of filling the order: , i.e.,
¾MIN: 0.25X1 + 0.30X2 + 0.32X3 + 0.15X4
more…
NGU Never Give Up BMT Become Multi-Talented
(C) Davar Pishva, 2017 Decision Making Under Uncertainty 30
5th Model: A Blending Problem (cont’d)
„Defining the Constraints
z Produce 8,000 pounds of feed
X1 + X2 + X3 + X4 = 8,000
z Mix consists of at least 20% corn
(0.3X1 + 0.05X2 + 0.2X3 + 0.1X4)/8000 >= 0.2
z Mix consists of at least 15% grain
(0.1X1 + 0.3X2 + 0.15X3 + 0.1X4)/8000 >= 0.15
z Mix consists of at least 15% minerals
(0.2X1 + 0.2X2 + 0.2X3 + 0.3X4)/8000 >= 0.15
z Nonnegativity conditions
X1, X2, X3, X4 >= 0

more…
NGU Never Give Up BMT Become Multi-Talented
(C) Davar Pishva, 2017 Decision Making Under Uncertainty 31

Spreadsheet Approach: Excel Model

NGU Never Give Up BMT Become Multi-Talented


(C) Davar Pishva, 2017 Decision Making Under Uncertainty 32
Spreadsheet Approach: The Solver Parameters

NGU Never Give Up BMT Become Multi-Talented


(C) Davar Pishva, 2017 Decision Making Under Uncertainty 33

Spreadsheet Approach: Result of the Model

NGU Never Give Up BMT Become Multi-Talented


(C) Davar Pishva, 2017 Decision Making Under Uncertainty 34
Topic 3 – Linear Optimization Using Excel
„ Summary
z Graphical vs. Spreadsheet Approach to LP Problems
¾ Limitations of Graphical Solution
¾ Advantages of Spreadsheet Approach
z Standard Solver
¾ What is Solver?
¾ What can Solver do?
¾ Parameters of Standard Solver
z Spreadsheet Approach to LP Problems
¾ Implementation Steps of an LP Model on Excel using Solver
¾ Design Guidelines
¾ Goals for Spreadsheet Design
z LP Model Examples Using Spreadsheet
¾ Blue Ridge Hot Tubs
¾ Make vs. Buy Decisions
¾ Cost of Transporting Cars
¾ An Investment Problem
¾ A Blending Problem
NGU Never Give Up BMT Become Multi-Talented
(C) Davar Pishva, 2017 Decision Making Under Uncertainty 35

Potrebbero piacerti anche