You are on page 1of 46

GRAPHING

GRAPHING
GRAPHING

LINEAR PROGRAMMING 1

MODULE 4
GRAPHING
GRAPHING

Linear Programming

LINEAR PROG
Linear Programming (LP) is a widely used
mathematical technique designed to help managers
in planning and decision making relative to resource
allocation.

LP Properties:
First: Problems seek to maximize or minimize an
objective (profit, production or cost).
Second: Restriction or constraints limit the
degree to which the objective can be obtained.
We want to maximize or minimize the objective
function subject to limited resources (the
constraints).
Third: There must be alternatives (combinations
of resources) available.
Fourth: The objective and constraints in linear
programming problems must be expressed in
terms of linear equations or inequalities.
GRAPHING

GRAPHING
Linear Programming Assumptions

ASSUMPTIONS
Linearity: the impact of decision
variables is linear in constraints
and objective function

Divisibility: noninteger values of


decision variables are acceptable

Certainty: values of parameters


are known and constant

Nonnegativity: negative values of


decision variables are
unacceptable
GRAPHING
GRAPHING
FORMULATING
Formulating LP
Formulating a linear program involves
developing a mathematical model to Problems
represent the managerial problem
The steps in formulating a linear
program are
1. Completely understand the
managerial problem being faced
2. Identify the objective and
constraints
3. Define the decision variables
4. Use the decision variables to
write mathematical expressions for
the objective function and the
constraints
GRAPHING
GRAPHING
GRAPHING
A Simple Maximization Problem

FORMULATION
 Product mix problem - Beaver Creek Pottery
Company LP Model Formulation
 How many bowls and mugs should be produced to
maximize profits given labor and materials
constraints?
 Product resource requirements and unit profit:
GRAPHING
GRAPHING
GRAPHING
GRAPHING
LP MODEL
Complete Linear Programming Model:

Maximize Z = $40x1 + $50x2

subject to: 1x1 + 2x2  40


4x2 + 3x2  120
x1, x2  0

Resource 40 hrs of labor per day


Availability: 120 lbs of clay
Decision x1 = number of bowls to produce per day
Variables: x2 = number of mugs to produce per day
Objective Maximize Z = $40x1 + $50x2
Function:Where Z = profit per day
Resource 1x1 + 2x2  40 hours of labor
Constraints: 4x1 + 3x2  120 pounds of clay
Non-Negativity x1  0; x2  0
Constraints:
GRAPHING
GRAPHING
GRAPHING
GRAPHING
GRAPHING
PROBLEM
Problem:

The Flair Furniture Company produces


inexpensive tables and chairs. The production
process for each is similar in that both require a
certain number of hours of carpentry work and a
certain number of labour hours in the painting
and varnishing. Each table takes 4 hours of
carpentry and 2 hours in the painting and
varnishing. Each chair requires 3 hours in
carpentry and 1 hours in painting and
varnishing. During the current production period,
240 hours of carpentry time and 100 hours in
Flair Furniture’s problem is to painting and varnishing time are available. Each
determine the best possible table sold yields a profit of $7; each chair
combination of tables and chairs to produced is sold for a $5 profit.
manufacture in order to reach the
maximum profit .
GRAPHING
GRAPHING
GRAPHING
GRAPHING
GRAPHING
GRAPHING
Frame: Flair Furniture Company

FLAME FLAIR
 The objective is to
Maximize profit
 The constraints are
1. The hours of carpentry time used cannot exceed 240 hours
per week
2. The hours of painting and varnishing time used cannot
exceed 100 hours per week
 The decision variables representing the actual decisions we will
make are
X1 = number of tables to be produced per week
X2 = number of chairs to be produced per week
Formulate the LP

GRAPHING
GRAPHING
GRAPHING
GRAPHING
GRAPHING
GRAPHING
GRAPHING
Problem

LP PROBLEM
Suppose, X1 = number of tables to be produced
X2 = number of chairs to be produced

We can covert the above information to formulate


the problem which is as follows:

9
GRAPHING
GRAPHING
GRAPHING
GRAPHING
GRAPHING
GRAPHING
GRAPHING
GRAPHING
A Simple Maximization Problem

MAXIMIZATION
• Linear optimization models are also known as linear programs
• Linear programming:
• A problem-solving approach developed to help managers make better decisions
• Numerous applications in today’s competitive business environment
• For instance, GE Capital uses linear programming to help determine optimal lease
structuring
GRAPHING
GRAPHING

ILLUSTRATION
Par, Inc. - A small manufacturer of golf equipment and supplies Operations involved in manufacturing a golf bag:
Management has decided to move into the market for medium- and Cutting and dyeing the material
high-priced golf bags Sewing
Par’s distributor to buy all the produced bags by the end of third month Finishing (inserting umbrella holder, club separators, etc.)
Inspection and packaging
• Table 11.1: Production Requirements Per Golf Bag
GRAPHING

GRAPHING
Estimated total time available for the next three months to

ESTIMATED
perform different operations:

Required profit contribution:


• Standard bag: $10/unit
• Deluxe bag: $9/unit

Develop a mathematical model of the Par, Inc. problem to


determine the number of standard bags and the number of
deluxe bags to produce to maximize total profit
contribution
GRAPHING
GRAPHING
GRAPHING
Describe each constraint

Define the decision variables


• S = number of standard bags
• D = number of deluxe bags
• Write the objective in terms of the
decision variables
• If Par makes $10 for every standard
and $9 for every deluxe bag,
Total profit contribution = 10S + 9D
= Objective function
• Objective: Max 10S + 9D
GRAPHING
GRAPHING
GRAPHING
NON NEGATIVITY
 Write the constraints in terms of the decision variables
Constraint 1: ≤
S + 1D ≤ 630
Constraint 2: ≤
S + D ≤ 600

  Constraint 3: ≤
1S + D ≤ 708
Constraint 4: ≤
S + D ≤ 135

Nonnegativity constraints—based on the fact that the


number of standard or deluxe bags produced cannot
be negative
S ≥ 0 and D ≥ 0 or S, D ≥ 0
GRAPHING
GRAPHING
GRAPHING
GRAPHING
MATHEMATICAL
 Mathematical Model for the Par, Inc. Problem
Mathematical model: a set of mathematical relationships
Max 10S + 9D
subject to(s.t) S + 1D ≤ 630 Cutting and dyeing
S + D ≤ 600 Sewing
1S + D ≤ 708 Finishing
S + D ≤ 135 Inspection and packaging
S, D ≥ 0

Mathematical Model for the Par, Inc. Problem (contd.)


• This is a linear programming model (or linear program) because the
objective function and all constraint functions are linear functions of
the decision variables
• Linear function: Mathematical function in which each variable
appears in a separate term and is raised to the first power
GRAPHING
GRAPHING
GRAPHING
GRAPHING
GRAPHING
Graphical Linear Programming

GRAPHICAL
 Graphical solution is limited to linear 1. Set up objective function and
programming models containing only constraints in mathematical
two decision variables (can be used format
with three variables but only with
great difficulty). 2. Plot the constraints
 Graphical methods provide
visualization of how a solution for a
linear programming problem is 3. Identify the feasible solution space
obtained.
 Graphical methods can be classified
under two categories: 4. Plot the objective function
1. Iso-Profit(Cost) Line Method
2. Extreme-point evaluation Method.
5. Determine the optimum solution
GRAPHING
GRAPHING
GRAPHING
GRAPHING
GRAPHING
GRAPHING
MAXIMIZATION
Graphical Solution of a Maximization Model
Coordinate Axes

maximize Z=$40x1 + 50x2


subject to
1x1 + 2x2  40 hours of labor
4x2 + 3x2  120 pounds of clay
x1, x2  0

Coordinates for graphical analysis


LABOR CONSTRAINT
GRAPHING
GRAPHING
GRAPHING
GRAPHING
GRAPHING
GRAPHING
GRAPHING
Graphical Solution of a Maximization Model
Labor Constraint

maximize Z=$40x1 + 50x2


subject to
1x1 + 2x2  40 hours of labor
4x2 + 3x2  120 pounds of clay
x1, x2  0

Graph of the labor constraint line


GRAPHING
GRAPHING
GRAPHING
GRAPHING
GRAPHING
GRAPHING
GRAPHING
GRAPHING
GRAPHICAL
Graphical Solution of a
Maximization Model
Labor Constraint Area

maximize Z=$40x1 + 50x2


subject to
1x1 + 2x2  40 hours of labor
4x2 + 3x2  120 pounds of clay
x1, x2  0

The labor constraint area


GRAPHING
GRAPHING

Graphical Solution of a Maximization Model

GRAPHICAL
Clay Constraint Area

maximize Z=$40x1 + 50x2


subject to
1x1 + 2x2  40 hours of labor
The constraint area for clay
4x2 + 3x2  120 pounds of clay
x1, x2 0
GRAPHING

GRAPHING
GRAPHICAL
Graphical Solution of a
Maximization Model
Both Constraints

maximize Z=$40x1 + 50x2


subject to
1x1 + 2x2  40 hours of labor
4x2 + 3x2  120 pounds of clay
x1, x2  0

Graph of both model Constraints


GRAPHING
GRAPHING
Graphical Solution of a

FEASIBLE
Maximization Model
Feasible Solution Area

maximize Z=$40x1 + 50x2


subject to
1x1 + 2x2  40 hours of labor
4x2 + 3x2  120 pounds of clay
x1 , x 2  0
The feasible solution area constraints
GRAPHING
GRAPHING
GRAPHING
GRAPHING
Graphical Solution of a Z= $800 = $40x1 + 50x2
Maximization Model subject to
1x1 + 2x2  40 hours of labor
Objective Function = $800 4x2 + 3x2  120 pounds of clay
x1, x2  0

Objective function line for Z 5 $800


GRAPHING
GRAPHING
GRAPHING
GRAPHING
GRAPHING
Graphical Solution of a Maximization Model
Alternative Objective Functions

Z=$800, $1200, $1600 = $40x1 + 50x2


subject to
1x1 + 2x2  40 hours of labor
4x2 + 3x2  120 pounds of clay
x 1 , x2  0

Alternative objective function lines for profits, Z, of $800, $1,200, and $1,600
GRAPHING
GRAPHING
GRAPHING
GRAPHING
GRAPHING
GRAPHING
Graphical Solution of a
Maximization Model
Optimal Solution

Z= $800 =$40x1 + 50x2


subject to
1x1 + 2x2  40 hours of labor
4x2 + 3x2  120 pounds of clay
x1, x2  0
Identification of optimal solution point
GRAPHING
GRAPHING
GRAPHING
GRAPHING
GRAPHING
GRAPHING
GRAPHING
Graphical Solution of a Maximization Model
Optimal Solution Coordinates

maximize Z=$40x1 + 50x2


subject to
1x1 + 2x2  40 hours of labor
4x2 + 3x2  120 pounds of clay
x1, x2  0

Optimal solution coordinates


Graphical Solution of a Maximization Model

GRAPHING
GRAPHING
GRAPHING
GRAPHING
GRAPHING
GRAPHING
GRAPHING
GRAPHING
Corner Point Solutions

maximize Z=$40x1 + 50x2


subject to
1x1 + 2x2  40 hours of labor
4x2 + 3x2  120 pounds of clay
x1 , x 2  0
Solutions at all corner points
GRAPHING
GRAPHING
GRAPHING
GRAPHING
GRAPHING
GRAPHING
GRAPHING
GRAPHING
GRAPHING
Graphical Solution of a Maximization Model
Optimal Solution for New Objective Function

maximize Z=$40x1 + 50x2


subject to
1x1 + 2x2  40 hours of labor
4x2 + 3x2  120 pounds of clay
x 1 , x2  0

The optimal solution with Z 5 70x1 1 20x2


GRAPHING
GRAPHING

SLACK VARIABLES
Slack Variables

Standard form requires that all constraints be in the form of equations.

A slack variable is added to a  constraint to convert it to an equation (=).

A slack variable represents unused resources.

A slack variable contributes nothing to the objective function value.


GRAPHING

GRAPHING
COMPLETE
Complete Linear
Programming Model in
Standard Form

maximize Z=$40x1 + 50x2 + 0s1 + 0s2


subject to
1x1 + 2x2 + s1 = 40
4x2 + 3x2 + s2 = 120
x1,x2,s1,s2 = 0
where x1 = number of bowls
x2 = number of mugs
s1, s2 are slack variables

Solutions at points A, B, and C with slack


GRAPHICAL
GRAPHING
GRAPHING
Graphical Solution  The objective is to
Maximize profit
Isoprofit Line Solution Method

ISOPROFIT
GRAPHING
GRAPHING
GRAPHING
GRAPHING
GRAPHING
GRAPHING
GRAPHING
ISOPROFIT
Isoprofit Line Solution Method
 We suppose profit equal to some arbitrary but
small dollar amount. For the Flair Furniture
problem we may choose a profit of $210.
$210 = 7X1+5X2
We then find (X1, X2) ={(0, 42); (30, 0)}
$280=7X1+5X2
We find (X1, X2) = {(0, 56); (40,0)}

 Following the same way we draw a series of


parallel isoprofit lines (iso-profit map) until we
find the highest isoprofit line, that is, the one
with the optimal solution.

33
Corner Point Solution Method

GRAPHING
GRAPHING
GRAPHING
GRAPHING
GRAPHING
CORNER POINT
 Alternatively, we can solve the LP
problem by using corner point method.
It involves looking at every corner point
of the feasible region. Optimal solution
will lie at one (or more) of them.

34
CORNER POINT
GRAPHING
GRAPHING
GRAPHING
GRAPHING
GRAPHING
GRAPHING
Corner Point Solution Method

 In point (4), we need to find the value in the intersection point of two
constraints.
4X1 + 3X2 = 240 [Carpentry equation]
2X1 + 1X2 = 100 [Painting equation]

 Solving them gives the values of X1 and X2, which is -


(X1, X2) = (30, 40)
So, the total profit is, π = 7 (30) + 5 (40) = $ 410

 Because point (4) produces the highest profit of any corner point, the
product mix of X1=30 tables and X2=40 chairs is the optimal solution to
Flair Furniture’s problem.
Summary of Graphical Solution Methods

SUMMARY
GRAPHING
GRAPHING
GRAPHING
GRAPHING
GRAPHING
GRAPHING
GRAPHING
IN EXCEL
GRAPHING
GRAPHING
GRAPHING
GRAPHING
GRAPHING
GRAPHING
GRAPHING
GRAPHING
Linear Programming in Excel

LP
One of Excel’s useful features is the ability
to solve linear programming problems
(especially those beyond our graphical
abilities).
The feature is invoked by creating a
spreadsheet containing the objective
function and constraints, selecting Tools
from the main menu, and Solver from the
submenu
LP IN EXCEL
Linear Programming in Excel - Part 2
GRAPHING
GRAPHING

White Lightning Rotgut


Corn (bushels) 2 1 =C60*$C$52+D60*$D$52 <= 40
Sugar (pounds) 3 2 =C61*$C$52+D61*$D$52 <= 70
Jugs 1 1 =C62*$C$52+D62*$D$52 <= 50
Hours 3 2 =C63*$C$52+D63*$D$52 <= 72
12 8
10 20 =C65*C64+D65*D64 Profit
Here is an Excel version of the moonshine problem
White Lightning Rotgut
Corn (bushels) 2 1 40 <= 40
Sugar (pounds) 3 2 70 <= 70
Jugs 1 1 30 <= 50
Hours 3 2 70 <= 72
$12.00 $8.00
10 20 $280.00 Profit

The top view shows formulas and the bottom view shows initial
calculations.
LP IN EXCEL
GRAPHING

GRAPHING
Linear Programming in Excel - Part 3
Once the basic set of equations has been entered, launch
Solver and fill in the dialog boxes with references to your
sheet.
Target cell - The objective function value (E52)
Equal to - Choose max or min based on the problem
By changing cells - The decision variables (C52:D52)
Subject to the constraints - Add all constraints one at a time
by referencing their function values (e.g., the amount of
corn used, E47 must be less than the amount of corn on
hand, G47)
Once all constraints have been entered, choose Options and
check the boxes for Assume Linear Model and Assume
Non-Negative.
Finally, choose Solve and wait for Excel to work its magic
GRAPHING
GRAPHING
SOLVER OUTPUT
Solver Output Reports – Part 1

· Answer Report - contains the basic answer to


the problem and reveals which constraints
had an impact on your situation.
· Sensitivity Report - tells you reduced costs
and shadow prices
· Limits Report - don’t bother asking for this
one. We won’t use its information.
SPLVER OUTPUT
Solver Output Reports – Part 2

GRAPHING
GRAPHING
GRAPHING
Microsoft Excel 8.0e Answer Report
Worksheet: [P/OM.xls]Sheet1 The value of the
objective function at the
Report Created: 7/28/2000 11:03:04 AM
optimal solution
Target Cell (Max)
Cell Name Original Value Final Value
$E$52 Profit $20.00 $280.00 The optimal values
Adjustable Cells of the decision
Cell Name Original Value Final Value variables
$C$52 White Lightning 1 10
$D$52 Rotgut 1 20
Constraints
Cell Name Cell Value Formula Status Slack
$E$47 Corn 40 $E$47<=$F$47 Binding 0
$E$48 Sugar 70 $E$48<=$F$48 Binding 0
$E$49 Jugs 30 $E$49<=$F$49 Not Binding 20
$E$50 Hours 70 $E$50<=$F$50 Not Binding 2

A binding constraint is one


If a constraint is not binding, then we have some left over that limits the value our
(slack) when we implement the optimal solution. We have objective function can
20 extra jugs and 2 hours to spare. assume. We use up all of
our corn and sugar (we have
no slack).
SOLVER OUTPUT
Solver Output Reports – Part 3

GRAPHING
GRAPHING
GRAPHING
GRAPHING
Microsoft Excel 8.0e Sensitivity Report
Worksheet: [P/OM.xls]Sheet1 Increases or decreases within these ranges will result in the same
Report Created: 7/28/2000 11:03:05 AM product mix (but a different objective function value).
Adjustable Cells
Final Reduced Objective Allowable Allowable
Cell Name Value Cost Coefficient Increase Decrease
$C$52 White10 0 12 4 0
$D$52 Rotgut 20 0 8 0 2

Constraints
Final Shadow Constraint Allowable Allowable
Cell Name Value Price R.H. Side Increase Decrease
$E$47 Corn 40 - 40 6.67 5
$E$48 Sugar 70 4 70 2 10
$E$49 Jugs 30 - 50 1E+30 20
$E$50 Hours 70 - 72 1E+30 2

A one unit decrease in the original amount of sugar


available will decrease our profit by this amount
Amount of resource to be taken
away for a non-binding constraint
Extra amount of resource needed for a binding constraint to to become binding, or a binding
become non-binding. Note that this doesn’t apply to non- constraint to become more so.
binding constraints, hence the huge amounts indicated.
EXERCISES 1
GRAPHING
GRAPHING
GRAPHING
GRAPHING
GRAPHING
1
· Objective - profit
Maximize Z=60X1 + 50X2
· Subject to
Assembly 4X1 + 10X2 <= 100 hours
Inspection 2X1 + 1X2 <= 22 hours
Storage 3X1 + 3X2 <= 39 cubic feet
X1, X2 >= 0

ACTIVITY 3
GRAPHING2
GRAPHING
GRAPHING
GRAPHING
GRAPHING
GRAPHING
EXERCISES
2 A winemaking company has recently acquired a 110 hectares piece
of land. Due to the quality of the sun and the region’s excellent
climate, the entire production of Sauvignon Blanc and Chardonnay
grapes can be sold. You want to know how to plant each variety in
the 110 hectares, given the costs, net profits and labor requirements
according to the data shown below:

Suppose that you have a budget of US$10,000 and an availability of 1,200 man-
days during the planning horizon. Formulate and solve graphically a Linear
Programming model for this problem. Clearly outline the domain of feasible
solutions and the process used to find the optimal solution and the optimal value.
EXERCISES 3
GRAPHING
GRAPHING
GRAPHING
GRAPHING
GRAPHING
GRAPHING
GRAPHING
3 A company produces two different products. One of them needs 1/4 of an hour
of assembly work per unit, 1/8 of an hour in quality control work and US$1.2 in
raw materials. The other product requires 1/3 of an hour of assembly work per
unit, 1/3 of an hour in quality control work and US$0.9 in raw materials. Given
the current availability of staff in the company, each day there is at most a total of
90 hours available for assembly and 80 hours for quality control. The first product
described has a market value (sale price) of US$8.0 per unit. In addition, the
maximum amount of daily sales for the first product is estimated to be 200 units,
without there being a maximum limit of daily sales for the second product.

Formulate and solve graphically a Linear Programming model that will allow the
company to maximize profits.

Decision Variables:

X_{1} : Product 1 units to be produced daily


X_{2} : Product 2 units to be produced daily
Objective Function:

Maximize (9-1.2)X_{1}+(8-0.9)X_{2}=7.8X_{1}+7.1X_{2}
09611192792
jojo_conti@yahoo.com

END

GRAPHING
GRAPHING
GRAPHING
GRAPHING
GRAPHING
GRAPHING
GRAPHING
GRAPHING

You might also like