You are on page 1of 35

Managerial Decision Modeling with Spreadsheets

Chapter 2 Linear Programming Models: Graphical and Computer Methods

Learning Objectives
Understand basic assumptions and properties of linear programming (LP). Use graphical solution procedures for LP problems with only two variables to understand how LP problems are solved. Understand special situations such as redundancy, infeasibility, unboundedness, and alternate optimal solutions in LP problems. Understand how to set up LP problems on a spreadsheet and solve them using Excels solver.

2.2 Development of a LP Model

LP applied extensively to problems areas medical, transportation, operations, financial, marketing, accounting, human resources, and agriculture.

Development of all LP models can be examined in three step process:

(1) formulation.

(2) solution.
(3) interpretation.

2.3 Formulating a LP Problem

One of the most common LP application is product mix problem.
Two or more products are usually produced using limited resources - such as personnel, machines, raw materials, and so on.

Profit firm seeks to maximize is based on profit contribution per unit of each product.
Firm would like to determine How many units of each product it should produce Maximize overall profit given its limited resources.

LP Example: Flair Furniture Company

Company Data and Constraints Flair Furniture Company produces tables and chairs.

Each table requires: 4 hours of carpentry and 2 hours of painting.

Each chair requires: 3 hours of carpentry and 1 hour of painting. Available production capacity: 240 hours of carpentry time and 100 hours of painting time.

Due to existing inventory of chairs, Flair is to make no more than 60 new chairs.
Each table sold results in $7 profit, while each chair produced yields $5 profit.

Flair Furnitures problem:

Determine best possible combination of tables and chairs to manufacture in order to attain maximum profit. 5

Decision Variables
Problem facing Flair is to determine how many chairs and tables to produce to yield maximum profit?

In Flair Furniture problem, there are two unknown entities:

T - number of tables to be produced. C - number of chairs to be produced.

Objective Function
Objective function states goal of problem.
What major objective is to be solved?

Maximize profit!

An LP model must have a single objective function. In Flairs problem, total profit may be expressed as: Using decision variables T and C Maximize $7 T + $5 C
($7 profit per table) x (number of tables produced) + ($5 profit per chair) x (number of chairs produced)

Denote conditions that prevent one from selecting any specific subjective value for decision variables. In Flair Furnitures problem, there are three restrictions on solution.
Restrictions 1 and 2 have to do with available carpentry and painting times, respectively. Restriction 3 is concerned with upper limit on number of chairs.

There are 240 carpentry hours available. 4T + 3C < 240 There are 100 painting hours available. 2T + 1C 100 The marketing specified chairs limit constraint. C 60

The non-negativity constraints. T 0 (number of tables produced is 0) C 0 (number of chairs produced is 0)


2.4 Graphical Representation of Constraints

Complete LP model for flairs case: Maximize profit = $7T + $5C Subject to constraints (objective function)

4T + 3C 240
2T + 1C 100 C 60 T 0 C 0

(carpentry constraint)
(painting constraint) (chairs limit constraint)

(non-negativity constraint on tables) (non-negativity constraint on chairs)


Isoprofit Line Solution Method

Write objective function: $7 T + $5 C = Z Select any arbitrary value for Z.
For example, one may choose a profit ( Z ) of $210. Z is written as: $7 T + $5 C = $210.

To plot this profit line:

Set T = 0 and solve objective function for C.
Let T = 0, then $7(0) + $5C = $210, or C = 42.

Set C = 0 and solve objective function for T.

Let C = 0, then $7T + $5(0) = $210, or T = 30.

Isoprofit Line Solution Method

Isoprofit lines ($350, $280, $210) are all parallel.


Optimal Solution
Optimal Solution: Corner Point 4: T=30 (tables) and C=40 (chairs) with $410 profit


Corner Point Solution Method

Point 1 (T = 0, C = 0) profit = $7(0) + $5(0) = $0 Point 2 (T = 0, C = 60) profit = $7(0) + $5(60) = $300

Point 3 (T = 15, C = 60) profit = $7(15) + $5(60) = $405

Point 4 (T = 30, C = 40) profit = $7(30) + $5(40) = $410 Point 5 (T = 50, C = 0) profit = $7(50) + $5(0) = $350 .


2.5 A Minimization LP Problem

Many LP problems involve minimizing objective such as cost instead of maximizing profit function.
Restaurant may wish to develop work schedule to meet staffing needs while minimizing total number of employees.

Manufacturer may seek to distribute its products from several factories to its many regional warehouses in such a way as to minimize total shipping costs. Hospital may want to provide its patients with a daily meal plan that meets certain nutritional standards while minimizing food purchase costs.

Example of a Two Variable Minimization LP Problem

Holiday Meal Turkey Ranch
Buy two brands of feed for good, low-cost diet for turkeys. Each feed may contain three nutritional ingredients (protein, vitamin, and iron). One pound of Brand A contains: 5 units of protein, 4 units of vitamin, and 0.5 units of iron. One pound of Brand B contains: 10 units of protein, 3 units of vitamins, and 0 units of iron.


Example of Two Variable Minimization Linear Programming Problem Holiday Meal Turkey Ranch
Brand A feed costs ranch $0.02 per pound, while Brand B feed costs $0.03 per pound. Ranch owner would like lowest-cost diet that meets

minimum monthly intake requirements for each

nutritional ingredient.

Summary of Holiday Meal Turkey Ranch Data

Composition of Each Pound of Feed (Oz) Ingredient Brand A Brand B Protein 5 10 Minimum Monthly Requirement Per Turkey (Oz) 90




Cost per pound

2 cents

3 cents

Formulation of LP Problem:
Minimize cost (in cents) Subject to: 5A + 10B 90 4A + 3B 48 A 1 A 0, B 0 = 2A + 3B (protein constraint) (vitamin constraint) (iron constraint) (nonnegativity constraint)

Where: A denotes number of pounds of Brand A feed, and B denote number of pounds of Brand B feed.

Corner Point Solution Method

Point 1 - coordinates (A = 3, B = 12)
cost of 2(3) + 3(12) = 42 cents.

Point 2 - coordinates (A = 8.4, b = 4.8)

cost of 2(8.4) + 3(4.8) = 31.2 cents

Point 3 - coordinates (A = 18, B = 0)

cost of (2)(18) + (3)(0) = 36 cents.

Optimal minimal cost solution: Corner Point 2, cost = 31.2 cents



Summary of Graphical Solution Methods

1. Graph each constraint equation. 2. Identify feasible solution region, that is, area that satisfies all constraints simultaneously. 3. Select one of two following graphical solution techniques and proceed to solve problem.

1. Corner Point Method.

2. Isoprofit or Isocost Method.

2.6 Summary of Graphical Solution Methods (Continued)

Corner Point Method

Determine coordinates of each of corner points of feasible region by visual inspection or solving equations. Compute profit or cost at each point by substitution of values of coordinates into objective function and solving for result. Identify an optimal solution as a corner point with highest profit (maximization problem), or lowest cost (minimization).

2.6 Summary of Graphical Solution Methods (continued) Isoprofit or Isocost Method

Select value for profit or cost, and draw isoprofit / isocost line to reveal its slope. With a maximization problem, maintain same slope and move line up and right until it touches feasible region at one point. With minimization, move down and left until it touches only one point in feasible region. Identify optimal solution as coordinates of point touched by highest possible isoprofit line or lowest possible isocost line. Read optimal coordinates and compute optimal 23 profit or cost.

2.7 Special Situations in Solving LP Problems Redundancy: A redundant constraint is constraint that
does not affect feasible region in any way.
Maximize Profit = 2X + 3Y subject to: X + Y 20 2X + Y 30 X 25 X, Y 0


2.7 Special Situations in Solving LP Problems Infeasibility: A condition that arises when an LP problem
has no solution that satisfies all of its constraints.

X + 2Y 6 2X + Y 8 X 7


2.7 Special Situations in Solving LP Problems Unboundedness: Sometimes an LP model will

not have a finite solution
Maximize profit = $3X + $5Y subject to:

X 5
Y 10 X + 2Y 10

X, Y 0


Alternate Optimal Solutions

An LP problem may have more than one

optimal solution.
Graphically, when the isoprofit (or isocost)

line runs parallel to a constraint in problem

which lies in direction in which isoprofit (or

isocost) line is located.

In other words, when they have same slope.

Example: Alternate Optimal Solutions

At profit level of $12, isoprofit line will rest directly on top of first constraint line. This means that any point along line between corner points 1 and 2 provides an optimal X and Y combination. 28

2.8 Setting Up and Solving LP Problems Using Excels Solver

Procedure of Using Solver 1. Set up LP mathematic model

One objective function Decision variables Constraints

RHS of constraints are numbers.

2. Rewriting the model for Solver

3. Entering information in Solver

The CD-ROM that accompanies this textbook contains excel file for each example problem discussed here.


Using Solver in Excel


Entering Data
Labels and Titles Parameters and Coefficients Objective Function
Use fixed cell address Use =sumproduct(range1, range2) function

Constraints (Use =sumproduct() function)


In Solver (Click Tools, Solver)

Specifying Objective Function Choosing Max or Min Identifying Decision Variables Adding Constraints Options: Linear and Non-negative Answer Report

Example: Flair Furnitures Problem

Using solver to solve Flair Furnitures problem Recall decision variables T ( Tables ) and C ( Chairs ) in Flair Furniture problem:

Maximize profit = $7T + $5C Subject to constraints 4T + 3C 240 (carpentry constraint) 2T + 1C 100 (painting constraint) C 60 (chairs limit constraint) T, C 0 (non-negativity)

Example: Flair Furnitures Problem

Data File: 611_render_2-1.xls Entering Data: Program 2.1A, page 48
Coefficients Excel Functions

In Solver:
LP model: Program 2.1 B, page 51. LP options: Program 2.1 C, page 52. Results options: Program 2.1 D, page 53.


Example: Flair Furnitures Problem

1. Entering Data:

Number of Units


Constraints Carpentry Hours Painting Hours Chairs Limit


4 2

3 1 1 LHS

<= <= <= Sign

240 100 60 RHS

2. Entering Excel functions for Objective and Constraints


Using Solver in Excel

In Solver (Click Tools, Solver) LP model: Program 2.1 B, page 51
Specifying Objective Function Choosing Max or Min Identifying Decision Variables Adding Constraints

LP options: Program 2.1 C, page 52

Options: Linear and Non-negative

Results options: Program 2.1 D, page 53

Answer Report

Introduced a mathematical modeling technique called linear programming (LP). LP models used to find an optimal solution to problems that have a series of constraints binding objective value. Showed how models with only two decision variables can be solved graphically. To solve LP models with numerous decision variables and constraints, one need a solution procedure such as simplex algorithm. Described how LP models can be set up on Excel and solved using Solver.