Beruflich Dokumente
Kultur Dokumente
Those before them did (also) devise plots; but in all things the master-planning
is Allah's He knoweth the doings of every soul: and soon will the Unbelievers
know who gets home in the end.
Linear Programming
Dr.-Ing.Naveed Ramzan
Linear Programming
Outline
Part 1: Basics of Linear Programming
Part 2: Importance and Limitations of Linear
Programming
Part 3: Linear Programming Applications
Part 4: Examples
Construction of LP Models
Simplex Method for LP solution
Graphical Method for LP Solution
An objective function.
A set of constraints.
Linear Programming
x2
x2
x1
x1
x3
Linear Programming
x2
x2
x1
x1
x1
1-dimensional
2-dimensional
1 Decision
Variable
2 Decision Variables
W=f(x1)
W=f(x1 , x2)
3-dimensional
3 Decision Variables
x3
Sorry!
Cannot be
visualized
n-dimensional
n Decision Variables
Intersecting planes
yield vertices
(problem solutions)
Intersecting objects
yield vertices
(problem solutions)
Optimization
Unconstrained
Constrained
Equality Constraints
Inequality Constraints
Linear
Linear
LinearProgramming
Programming
Nonlinear
what-if information.
managing constraints.
Energy
Manufacturing
System Design
Finance Marketing
Scheduling
Telecommunications
Games Operation Management
Production planning
Transportation Planning
11
Linear Programming
Part 4: Examples
Project output = f(Resource 1, Resource 2, Resource 3, Resource n)
The goal is to determine the levels of each resource that would maximize /
minimize .
W
W
Linear Programming
Resource
Y
Resource
X
13
Linear Programming
Resource
Y
Local space
Resource
X
14
Linear Programming
Resource
Y
Local space
Local
maximum
Resource
X
15
Linear Programming
Resource
Y
Global
Maximum
Global Space
Local space
Local
maximum
Resource
X
16
Linear Programming
W)
17
Objective Criterion
That we wish to optimize (minimize or maximize)
The Objective function for LP problems is linear
Constraints
That we wish to satisfy
The constraints for LP problems are linear
18
or
2x + y = 60
Feasible region
x=0
x + 2y = 90
y=0
x
21
Simplex Method
(contd)
Example: PAK APIAS
PAK APIAS produces both interior and exterior paints from two raw
materials M1 & M2.
Tons of raw material per ton of
Max. Daily
Availability
Exterior
Paint
Interior Paint
Raw Material, M1
24
Raw Material, M2
Constraints
Usage of Raw Material Max. Raw Material Availability
For M1: 6x1+4x2 24
For M2: 1x1+2x2 6
Non-Negativity Constraints
x1 0
x2 0
23
Graphic Method
Graphical Method
Can be used to solve LP problems involving 2
decision variables with equality or in-equality
constraints
Method
Find the Feasible Solution Space
The region in which all the constraints are satisfied
Graphic Method
(contd)
6x1+4x2 24
Non-Negativity Constraint
Model
25
Graphic Method
(contd)
6x1+4x2 24
6x1+4x2 24
-x1+x2 1
x1+2x2 6
x1+2x2 6
Model
26
Graphic Method
(contd)
6x1+4x2 24
-x1+x2 1
x2 2
Feasible
Solution Space
x1+2x2 6
Model
27
Graphic Method
(contd)
6x1+4x2 24
-x1+x2 1
z= 5x1+4x2 = 0
x2 2
x1+2x2 6
Model
28
Graphic Method
(contd)
6x1+4x2 24
-x1+x2 1
x2 2
z= 5x1+4x2 = 0
x1+2x2 6
Direction of Increase in z
z= 5x1+4x2 = 1
29
Graphic Method
(contd)
6x1+4x2 24
-x1+x2 1
D
x2 2
C
z= 5x1+4x2
F
A
x1+2x2 6
Model
30
31
LP Model Formulation
A Maximization Example (1 of 4)
Product mix problem - Beaver Creek Pottery Company
How many bowls and mugs should be produced to
maximize profits given labor and materials constraints?
Product resource requirements and unit profit:
Resource Requirements
Labor
(Hr./Unit)
Clay
(Lb./Unit)
Profit
($/Unit)
Bowl
40
Mug
50
Product
LP Model Formulation
A Maximization Example (2 of 4)
LP Model Formulation
A Maximization Example (3 of 4)
Resource 40 hrs of labor per day
Availability:120 lbs of clay
Decision
Variables:
Objective
Function:
x1 0; x2 0
LP Model Formulation
A Maximization Example (4 of 4)
Complete Linear Programming Model:
Maximize
Z = $40x1 + $50x2
Copyright 2010
Pearson Education, Inc.
Publishing as Prentice
Hall
Feasible Solutions
A feasible solution does not violate any of the
constraints:
Example:
x1 = 5 bowls
x2 = 10 mugs
Z = $40x1 + $50x2 = $700
Infeasible Solutions
An infeasible solution violates at least one of
the constraints:
Example:
x1 = 10 bowls
x2 = 20 mugs
Z = $40x1 + $50x2 = $1400
Coordinate Axes
Graphical Solution of Maximization Model
(1 of 12)
X2 is mugs
Maximize Z = $40x1 + $50x2
subject to: 1x1 + 2x2 40
4x2 + 3x2 120
x1, x2 0
Labor Constraint
Graphical Solution of Maximization Model
(2 of 12)
Copyright 2010
Pearson Education, Inc.
Publishing as Prentice
Hall
Copyright 2010
Pearson Education, Inc.
Publishing as Prentice
Hall
Copyright 2010
Pearson Education, Inc.
Publishing as Prentice
Hall
Both Constraints
Graphical Solution of Maximization Model
(5 of 12)
Copyright 2010
Pearson Education, Inc.
Publishing as Prentice
Hall
Copyright 2010
Pearson Education, Inc.
Publishing as Prentice
Hall
Copyright 2010
Pearson Education, Inc.
Publishing as Prentice
Hall
Copyright 2010
Pearson Education, Inc.
Publishing as Prentice
Hall
Optimal Solution
Graphical Solution of Maximization Model
(9 of 12)
Copyright 2010
Pearson Education, Inc.Figure
Publishing as Prentice
Point
Hall
Copyright 2010
Pearson Education, Inc.
Publishing as Prentice
Hall
Copyright 2010
Pearson Education, Inc.
Publishing as Prentice
Hall
Maximize Z = $70x1 +
$20x2
subject to: 1x1 + 2x2 40
4x2 + 3x2
120
x1, x2 0
Copyright 2010
Pearson Education, Inc.
Publishing as Prentice
Hall
Slack Variables
Phosphate
(lb/bag)
Super-gro
Crop-quick
Brand
Copyright 2010
Pearson Education, Inc.
Publishing as Prentice
Hall
Copyright 2010
Pearson Education, Inc.
Publishing as Prentice
Hall
Copyright 2010
Pearson Education, Inc.
Publishing as Prentice
Hall
Copyright 2010
Pearson Education, Inc.
Publishing as Prentice
Hall
Copyright 2010
Pearson Education, Inc.
Publishing as Prentice
Hall
Infeasible solutions
Unbounded solutions
Copyright 2010
Pearson Education, Inc.
Publishing as Prentice
Hall
An Infeasible Problem
Copyright 2010
Pearson Education, Inc.
Publishing as Prentice
Hall
An Unbounded Problem
Copyright 2010
Pearson Education, Inc.
Publishing as Prentice
Hall
Problem Statement
Example Problem No. 1 (1 of 3)
Recipe requirements:
Solution
Example Problem No. 1 (2 of 3)
Step 1:
Identify decision variables.
x1 = lb of chicken in mixture
x2 = lb of beef in mixture
Step 2:
Formulate the objective function.
Minimize Z = $3x1 + $5x2
where Z = cost per 1,000-lb batch
$3x1 = cost of chicken
Copyright 2010
Pearson Education, Inc.
$5x2 = cost of beef
Publishing as Prentice
Hall
Solution
Example Problem No. 1 (3 of 3)
Step 3:
Establish Model Constraints
x1 + x2 = 1,000 lb
x1 500 lb of chicken
x2 200 lb of beef
x1/x2 2/1 or x1 - 2x2 0
x1, x2 0
The Model: Minimize Z = $3x1 + 5x2
subject to: x1 + x2 = 1,000 lb
x1 50
x2 200
Copyright 2010
x1 - 2x2 0
Pearson Education, Inc.
x1,x2 0
Publishing as Prentice
Hall
Plot the
as equations
Copyright 2010
Pearson Education, Inc.
Publishing as Prentice
Hall
Copyright 2010
Pearson Education, Inc.
Publishing as Prentice
Hall
Copyright 2010
Pearson Education, Inc.
Publishing as Prentice
Hall
Copyright 2010
Pearson Education, Inc.
Publishing as Prentice
Hall
Simplex Method
The steps of the simplex methods are:
Step 0. Determine a starting basic feasible solution.
Step 1. Select an entering variable using the optimality
condition. Stop if there is no entering variable.
Step 2. select a leaving variable using the feasible condition.
Step 3. Determine the new basic solution by using the
appropriate Gauss-Jordan computations.
74
Simplex Method
(contd)
75
Simplex Method
(contd)
76
Simplex Method
(contd)
77
6x1+4x2 24
-x1+x2 1
x2 2
Feasible
Solution Space
x1+2x2 6
Model
78
Simplex Method
(contd)
79
Simplex Method
(contd)
80
Simplex Method
(contd)
81
Simplex Method
(contd)
82
Simplex Method
(contd)
83
Simplex Method
(contd)
84
Simplex Method
(contd)
85
Simplex Method
(contd)
86
Simplex Method
(contd)
87
Linear Programming
End
Thanks for Your Patience
89