Uploaded by 陳澤洋

2-ch02 2023-10-05 09 21 06

advertisement
Chapter 2: An Introduction to
Linear Programming






Linear Programming Problem
Problem Formulation
Graph of Feasible Solutions
Graphical Solution Procedure
Extreme Points
Patterns of Optimal Solution
Slide 1
Linear Programming (LP) Problem


MP
〈
Mathematical programming problem: maximize or
minimize an objective function subject to constraints.
Linear programming problem: both objective function
and constraints are linear.
linegr programming
Non
-
linegr
pogramming
Slide 2
Linear Programming (LP) Problem


Linear function: variables appear in separate terms
with the first power and are multiplied by constants.
Linear constraint: linear function (is restricted to be)
“<", “=", or “>" a constant.
Slide 3
Problem Formulation


Problem formulation or modeling: translating a verbal
statement of a problem into a mathematical statement.
Guidelines:
1.
Define the decision variables.
2.
Write a verbal description of the objective.
3.
Write the objective in terms of the decision
variables.
4.
Write a verbal description of each constraint.
5.
Write each constraint in terms of the decision
variables.
Slide 4
Example 1: Catch-Big





Catch-Big (CB), a fishing equipment manufacturer, is
deciding how many ads to place in Sports Illustrated
(SI) and Esquire.
The goal is to maximize total product exposures to
buyers.
Esquire
SI
Exposures per ad:
500,000
700,000
Cost per ad ($):
20,000
30,000
CB budgeted a maximum of $190,000 for the ads.
No more than 6 ads should be placed in Esquire.
A total of at most 8 ads can be placed.
Slide 5
Example 1: Catch-Big

Decision variables:
x1:
x2:

Objective function:

Constraints:
Slide 6
Example 1: LP Formulation

Formulated as a LP (maximization problem):
Max
z = 500,000x1 + 700,000x2
s.t. 20,000 x1 + 30,000 x2 < 190,000
x1
< 6
x1 +
x2 < 8
x1, x2 > 0
Slide 7
Slack and Surplus Variables



Standard form of a LP: all variables are non-negative
and all constraints are equalities.
How to obtain standard form: add slack variables to
“<" constraints, or subtract surplus variables from “>"
constraints.
Slack and surplus variables:
• are the difference between the left and right sides
of the constraints.
• have coefficients 0 in objective function.
Slide 8
Example 1: Standard Form
Max z = 500,000x1 + 700,000x2 + 0s1 + 0s2 + 0s3
s.t.
20,000x1 + 30,000x2 + s1
x1
x1 +
x2
+ s2
+ s3
= 190,000
= 6
= 8
x1, x2 , s1 , s2 , s3 > 0
Slide 9
Feasible Solutions and Optimal Solution



Feasible solution: the values of decision variables
that satisfies all the constraints
Feasible region: all the feasible solutions
Optimal solution: feasible solution with the largest
(or smallest) objective function value for maximization
(or minimization)
Slide 10
Picture the Values For Decision Variables

Values for decision variables
with axes:
x2
points in a plane
5
4
3
2
1
1
2
3
4
5
6
x1
Slide 11
Example 2: Graph Feasible Region

Given a LP formulation:
Min z = 5x1 + 2x2
s.t.
4x1 - x2 > 12
x1 + x2 > 4
x 1, x 2 > 0
Slide 12
Example 2: Graph Constraints

Graph the region of points satisfying 4x1 - x2 > 12 :
x2
5
4
3
2
1
1
2
3
4
5
6
x1
Slide 13
Example 2: Graph Constraints

Graph the region of points satisfying x1 + x2 > 4 :
x2
5
4
3
2
1
1
2
3
4
5
6
x1
Slide 14
Example 2: How We Graphed Constraints
Constraint 1: Set x2 = 0, then x1 = 3. But setting x1
to 0 will yield x2 = -12, which is not on the graph.
Thus, to get a second point which is near, set x1 = 4,
then x2 = 4. Connect (3,0) and (4,4). The ">" side
is to the right.
Constraint 2: Set x1 = 0, then x2 = 4; Set x2 = 0, then
x1 = 4. Connect (4,0) and (0,4). The ">" side is above
this line.
Slide 15
Example 2: Graph of Feasible Region

All constraints graphed together (with x1 > 0, x2 > 0):
x2
Feasible Region
5
4x1 - x2 > 12
4
x1 + x2 > 4
3
2
1
1
2
3
4
5
6
x1
Slide 16
Summary: How to Graph Feasible Region
Two Steps For Drawing a Graph of Feasible Region:
• Prepare a graph of the feasible solutions for each
of the constraints.
• Determine the feasible region that satisfies all the
constraints simultaneously.
Slide 17
Feasible Region

Feasible region for a two-variable linear program:
• non-existent:
• point:
Slide 18
Feasible Region
• line:
• polygon:
• unbounded area:
Slide 19
Graphical Solution Procedure
for Maximization (or Minimization) Problems
1.
Graph feasible region. (done!)
2.
Draw an objective function line.
3.
Move parallel the objective function line in the direction
toward larger (or smaller) objective values without
entirely leaving the feasible region.
4.
Any (feasible) point on the objective function line with
the largest (or smallest) value is an optimal solution.
Slide 20
Example 2: Graph Objective Function Line

Graph a objective function line for 5x1 + 2x2 :
x2
5
5x1 + 2x2 = 10
4
(or 5x1 + 2x2 = 12)
3
2
1
1
2
3
4
5
6
x1
Slide 21
Example 2: Graphical Solution


Draw an Objective Function Line:
Set the objective function equal to an arbitrary constant
(say 10) and graph it. For 5x1 + 2x2 = 10, when x1 = 0,
then x2 = 5; when x2= 0, then x1 = 2. Connect (0,5) and
(2,0).
Move the Objective Function Line Toward Optimality:
Move it in the direction which lowers its value (down),
since we are minimizing, until it touches the last point
of the feasible region, determined by the last two
constraints.
Slide 22
Example 2: Graphical Solution

Optimal position of objective function line:
z = 5x1 + 2x2 = 25
x2
5
z = 5x1 + 2x2 = ?
4
3
z = 5x1 + 2x2 = 10
2
1
1
2
3
4
5
6
x1
Slide 23
Finding Optimal Values of the Variables

The constraints intersecting at the optimal point are said
to be binding.

Write the equations for the binding constraints.

Solve the system of linear equations.
Slide 24
Example 2: Graphical Solution


Solve out the Intersection Point of the Two Binding
Constraints:
4x1 - x2 = 12
x1+ x2 = 4
Adding these two equations gives:
5x1 = 16 or x1 = 16/5.
Substituting this into x1 + x2 = 4 gives: x2 = 4/5
Obtain the Optimal Value of the Objective Function:
Solve for z = 5x1 + 2x2 = 5(16/5) + 2(4/5) = 88/5.
Thus the optimal solution is
x1 = 16/5; x2 = 4/5; z = 88/5
Slide 25
Example 2: Graphical Solution

Optimal solution and optimal value:
x2
Optimal Value:
z = 5x1 + 2x2 = 88/5
5
4
3
Optimal Solution:
x1 = 16/5
x2 = 4/5
2
1
1
2
3
4
5
6
x1
Slide 26
Example 2: Values of Slack and Surplus

Given the optimal solution x1= 16/5 and x2 =4/5, what
are the values of slack and surplus for the constraints?
Min z = 5x1 + 2x2
s.t.
4x1 - x2 > 12
x1 + x2 > 4
x 1, x 2 > 0
(surplus: 0)
(surplus: 0)
No slacks!
Slide 27
Example 1: LP Formulation

Equivalent form of original LP:
Max z = 5x1 + 7x2
s.t. 2x1 + 3x2 < 19
x1
< 6
x1 + x2 < 8
(in 100,000)
(in 10,000)
x1, x2 > 0
Slide 28
Example 1: Feasible Region
8
x2
7
6
5
4
3
2
1
1
2
3
4
5
6
7
8
9
10
x1
Slide 29
Example 1: Objective Function Line
8
x2
7
6
5
4
3
2
1
Feasible
Region
1
2
3
4
5
6
7
8
9
10
x1
Slide 30
Example 1: Optimal Solution and Objective Value


Solve out the Intersection Point of the Two Binding
Constraints:
2x1 + 3x2 = 19
x1 + x2 = 8
Multiplying –2 to the second equation and adding it to
the first equation:
x2 = 3
Substituting this into x1 + x2 = 8 gives: x1 = 5.
Obtain the Optimal Value of the Objective Function:
Solve for z = 5x1 + 7x2 = 5(5) + 7(3) = 46 (in 100,000).
Thus the optimal solution is
x1 = 5; x2 = 3; z = 46 (in 100,000).
Slide 31
Example 1: Values of Slack and Surplus

Given the optimal solution x1= 5 and x2=3, what are the
values of slack and surplus for the constraints?
Max z = 5x1 + 7x2
s.t. 2x1 + 3x2 < 19
x1
< 6
x1 + x2 < 8
(slack: 0)
(slack: 1)
(slack: 0)
x1, x2 > 0
No surplus!
Slide 32
Extreme Points and Optimal Solution



Extreme point: corner point of feasible region
LP optimal solution can always be found at some
extreme point of the feasible region.
Do not have to evaluate all the feasible solution points
for the optimal solution. Just need to look at the extreme
points of the feasible region.
Slide 33
Example 1: Extreme Points and Feasible Region
8
7
x2
5
6
5
4
4
3
2
1
3
Feasible
Region
1
2
1
2
3
4
5
6
7
8
9
10
x1
Slide 34
Possible Patterns of Optimal Solution

There are only four types of LPs:
• has unique optimal solution.
• has alternate optimal solutions.
• is infeasible.
• is unbounded in the feasible region.
Slide 35
Alternative Optimal Solutions


When the objective function line is parallel to a
boundary constraint in the direction of optimization,
all points on this line segment are optimal.
Example:
Min
s.t.
z = 2x1 + 2x2
x1 + x2 > 5
3x1 + x2 > 8
x1, x2 > 0
Slide 36
Example: Alternative Optimal Solutions

The objective function line is parallel to a boundary
constraint in the direction of optimization. The points (5,0)
and (1.5,3.5) and all points on the line segment in between
are optimal.
x2
3x1 + x2 > 8
8
Min 2x1 + 2x2
5
x1 + x2 > 5
2.67
5
x1
Slide 37
Infeasibility

Infeasible LP: no points satisfies all the constraints.

Example:
Max z = 2x1 + 6x2
s.t. 4x1 + 3x2 < 12
2x1 + x2 > 8
x1, x2 > 0
Slide 38
Example: Infeasible Problem

No points satisfies both constraints, hence its feasible
region is empty, and there is no optimal solution.
x2
2x1 + x2 > 8
8
4x1 + 3x2 < 12
4
3 4
x1
Slide 39
Unbounded Problem


Unbounded LP: The feasible region is unbounded,
and the objective function line can be moved in a
direction in which the region is unbounded.
Example:
Max z = 3x1 + 4x2
s.t. x1 + x2 > 5
3x1 + x2 > 8
x1, x2 > 0
Slide 40
Example: Unbounded Problem

The feasible region is unbounded, and the objective
function line can be moved parallel to itself without
bound so that the objective function value Z can always
be improved.
x2
3x1 + x2 > 8
8
Max 3x1 + 4x2
5
x1 + x2 > 5
2.67
5
x1
Slide 41
Optimal Solution in Unbounded Feasible Region

A feasible region may be unbounded and yet there may
be optimal solutions.
x2
3x1 + x2 > 8
8
Min 3x1 + 4x2
5
x1 + x2 > 5
2.67
5
x1
Slide 42
Download