Linear Programming: The Graphical Method
Linear Programming: The Graphical Method
GRAPHICAL METHOD
Slide
1
Linear Programming (LP) Problem
A mathematical programming problem is one that
seeks to maximize or minimize an objective function
subject to constraints.
If both the objective function and the constraints are
linear, the problem is referred to as a linear
programming problem.
Linear functions are functions in which each variable
appears in a separate term raised to the first power
and is multiplied by a constant (which could be 0).
Linear constraints are linear functions that are
restricted to be "less than or equal to", "equal to", or
"greater than or equal to" a constant.
Slide
2
Building Linear Programming Models
Slide
3
Building Linear Programming Models
Slide
4
Building Linear Programming Models
Slide
5
Properties of LPs
Proportionality
The profit contribution and the amount of the
resources used by a decision variable is directly
proportional to its value.
Additivity
The value of the objective function and the
amount of the resources used can be calculated by
summing the individual contributions of the decision
variables.
Divisibility
Fractional values of the decision variables are
permitted.
Slide
6
LP Solutions
The maximization or minimization of some quantity is
the objective in all linear programming problems.
A feasible solution satisfies all the problem's constraints.
Changes to the objective function coefficients do not
affect the feasibility of the problem.
An optimal solution is a feasible solution that results in
the largest possible objective function value, z, when
maximizing or smallest z when minimizing.
In the graphical method, if the objective function line is
parallel to a boundary constraint in the direction of
optimization, there are alternate optimal solutions, with
all points on this line segment being optimal.
Slide
7
LP Solutions
A graphical solution method can be used to solve a
linear program with two variables.
If a linear program possesses an optimal solution,
then an extreme point will be optimal.
If a constraint can be removed without affecting the
shape of the feasible region, the constraint is said to
be redundant.
A nonbinding constraint is one in which there is
positive slack or surplus when evaluated at the
optimal solution.
A linear program which is overconstrained so that no
point satisfies all the constraints is said to be
infeasible.
Slide
8
LP Solutions
A feasible region may be unbounded and yet there may
be optimal solutions. This is common in minimization
problems and is possible in maximization problems.
The feasible region for a two-variable linear
programming problem can be nonexistent, a single
point, a line, a polygon, or an unbounded area.
Any linear program falls in one of three categories:
• is infeasible
• has a unique optimal solution or alternate optimal
solutions
• has an objective function that can be increased
without bound
Slide
9
Slack and Surplus Variables
A linear program in which all the variables are non-
negative and all the constraints are equalities is said
to be in standard form.
Standard form is attained by adding slack variables
to "less than or equal to" constraints, and by
subtracting surplus variables from "greater than or
equal to" constraints.
Slack and surplus variables represent the difference
between the left and right sides of the constraints.
Slack and surplus variables have objective function
coefficients equal to 0.
Slide
10
Example: Graphical Solution
Solve graphically for the optimal solution:
x1, x2 > 0
Slide
11
Example: Graphical Solution
Slide
12
Example: Graphical Solution
Constraints Graphed
x2 Feasible Region
4x1 - x2 > 12
5
4 x1 + x2 > 4
3
2x1 + 5x2 > 10
2
1
x1
1 2 3 4 5 6
Slide
13
Example: Graphical Solution
Graph the Objective Function
Set the objective function equal to an arbitrary constant
(say 20) and graph it. For 5x1 + 2x2 = 20, when x1 = 0,
then x2 = 10; when x2= 0, then x1 = 4. Connect (4,0) and
(0,10).
Slide
14
Example: Graphical Solution
4x1 - x2 > 12
5
4 x1 + x2 > 4
3
2x1 + 5x2 > 10
2
1
x1
1 2 3 4 5 6
Slide
15
Example: Graphical Solution
Slide
16
Example: Graphical Solution
4x1 - x2 > 12
5
4 x1 + x2 > 4
3
2x1 + 5x2 > 10
2
Optimal: x1 = 16/5
1
x x2 = 4/5
1
1 2 3 4 5 6
Slide
17
Sensitivity Analysis
Slide
18
Range of Optimality
Slide
19
Shadow Price
Slide
20
Shadow Price
Slide
21
Dual Price
Slide
22
Range of Feasibility
Slide
23
Example: Sensitivity Analysis
s.t. x1 < 6
2x1 + 3x2 < 19
x1 + x2 < 8
x1, x2 > 0
Slide
24
Example: Sensitivity Analysis
Graphical Solution
x2
8
x1 + x2 < 8
Max 5x1 + 7x2
7
6
x1 < 6
5
Optimal x1 = 5, x2 = 3
4
z = 46
3
2
2x1 + 3x2 < 19
1
1 2 3 4 5 6 7 8 9 10
x1
Slide
25
Example: Sensitivity Analysis
Slide
26
Example: Sensitivity Analysis
Slide
27
Example: Sensitivity Analysis
Shadow Prices
Constraint 1: Since x1 < 6 is not a binding constraint,
its shadow price is 0.
Constraint 2: Change the RHS value of the second
constraint to 20 and resolve for the optimal point
determined by the last two constraints:
2x1 + 3x2 = 20 and x1 + x2 = 8.
The solution is x1 = 4, x2 = 4, z = 48. Hence, the
shadow price = znew - zold = 48 - 46 = 2.
Slide
28
Example: Sensitivity Analysis
Slide
29
Example: Infeasible Problem
x1, x2 > 0
Slide
30
Example: Infeasible Problem
8 2x1 + x2 > 8
x1
3 4
Slide
31
Example: Unbounded Problem
s.t. x1 + x2 > 5
3x1 + x2 > 8
x1 , x2 > 0
Slide
32
Example: Unbounded Problem
x1 + x2 > 5
5
x1
2.67 5
Slide
33
The End of Chapter 7
Slide
34