Linear Programming

advertisement
Linear Programming
Graphical Solution
Graphical Solution to an LP Problem
This is easiest way to solve a LP problem with two
decision variables.
If there are more than two decision variables, it is not
possible to plot the solution on two dimensional graph.
However, it provides us an useful insight how the other
approaches work. So it is worthwhile to learn how it
works.
To find the optimal solution to an LP problem we must
first identify a set of feasible solution (a region of feasible
solution)
First step in doing so to plot of the problem’s constraints on a graph.
X1 is usually plotted as the horizontal axis
X2 is usually plotted as the vertical axis
Because of the non-negativity constraint we are always working on the first quadrant
x2
This axis represents the constraint x2 ≥ 0
This axis represents the constraint x1 ≥ 0
x1
Example 1
Giapetto’ Woodcarving, Inc.,
Z max  3x1  2 x2
Subject to
2 x1  x2  100
x1  x2  80
x1  40
x1 , x2  0
The feasible region has been graphed. We may proceed
to find the optimal solution to the problem.
The optimal solution is the point lying in the feasible
region that produce the highest profit.
There are two different approaches to find it.
-Isoprofit line method (isocost line)
- Corner point method
Corner Point Solution Method
The second approach to find the optimal solution to LP problem is corner point method.
An optimal solution to LP problem lies at a corner point of (extreme point of) the feasible
region.
Hence it is only necessary to find the value of them.
From the graph the problem is five sided polygon with five corner or extreme points.
These points are labeled H, E, F, G, D.
So we can find the coordinates of each corner and test the profit levels.
x2
D
G
Feasible F
Region
H
E
x1
x2
Finishing Cons.
Demand
Cons.
D
G
Carpentry Cons.
Feasible F
Region
H
x1
E
Point H (0, 0) Z = 3(0) + 2(0) = 0
Point E (40, 0) Z = 3(40) + 2(0) = 120
Point F (40, 20) Z = 3(40) + 2(20) = 160
Note that: at Point F Cons.2 and Cons.3 intersect
So
2x1 + x2 = 100
x1
= 40
x1 = 40, x2 = 20
Point G (20, 60) Z = 3(20) + 2(60) = 180* optimal solution
2x1 + x2 = 100
x1 + x2 = 80
x1 = 20, x2 = 60
Point D (0, 80) Z = 3(0) + 2(80) = 160
The optimal solution to this problem (point G)
x1 = 20
x2 = 60
Z = 180
[ Z = 3x1 + 2x2 ⇒ 3(20) + 2(60) = $120]
If we substitute the optimal values of decision variables into the left hand side of the constraints.
2x1 + x2 ≤ 100 ⇒ 2(20) + 60 = 100
S1 = 100 – 100 = 0
x1 + x2 ≤ 80 ⇒ 20 + 60 = 80
S2 = 80 – 80 = 0
x1 ≤ 40 ⇒ 20
S3 = 40 – 20 = 20
S: Slack variable: represent the amount of resource unused
S1 = 0
means decision variables use up the resources completely
S2 = 0
S3 = 20
20 units of resource is left over.
Slack variable → [≤] less than or equal to
Once the optimal solution to the LP problem it is useful to classify the constraint.
A constraint is binding constraint if left hand side and right hand side of it are equal when the
optimal values of decision variables are substituted into the constraint.
A constraint is nonbinding constraint if the left hand side and right hand side of constraint are
not equal when the optimal values of decision variables are substituted in to the constraint.
Left hand side
Right hand side
Constraint 1: 2x1 + x2 ≤ 100 2(20) + 60 = 100
100
Binding
Constraint 2: x1 + x2 ≤ 80
80
Binding
Constraint 3:
20 + 60 = 80
x1 ≤ 40
20
40
The other classification of resource
Resource
Slack value
Status
Finishing hours
0
Scarce
Carpentry hours
0
Scarce
Demand
20
Abundant
Not binding
Example 2
Advertisement (Winston 3.2, p 61)
Zmin  50x1  100x2
Subject to
7 x1  x22  28
2x1  12x2  24
x1 , x2  0
Example 3
Giapetto’ Woodcarving, Inc., (changed)
Z max  4 x1  2 x2
Subject to
2 x1  x2  100
x1  x2  80
x1  40
x1 , x2  0
Example 4
Giapetto’ Woodcarving, Inc., (changed)
Z max  3x1  2 x2
Subject to
2 x1  x2  100
x1  x2  80
x1  40
x1  30
x2  20
x1 , x2  0
Example 4
Giapetto’ Woodcarving, Inc., (changed)
Z max  4 x1  2 x2
Subject to
x1  40
x1  30
x2  20
x1 , x2  0
Sensitivity Analysis
Shadow Prices
• Shadow price of resource i measures the
marginal value of this resource.
Download