Date post: | 15-Dec-2015 |
Category: |
Documents |
Upload: | marco-tolley |
View: | 214 times |
Download: | 0 times |
Copyright (c) 2003 Brooks/Cole, a division of Thomson Learning, Inc
Linear Programming: An Algebraic Approach
4
The Simplex Method with
• Standard Maximization Problems
• Standard Minimization Problems
• Nonstandard Problems
Copyright (c) 2003 Brooks/Cole, a division of Thomson Learning, Inc
The Simplex Method
The simplex method is an iterative process. Starting at some initial feasible solution (a corner point – usually the origin), each iteration moves to another corner point with an improved (or at least not worse) value of the objective function. Iteration stops when an optimal solution (if it exists) is found.
Copyright (c) 2003 Brooks/Cole, a division of Thomson Learning, Inc
A Standard (maximization) Linear Programming Problem:
1. The objective function is to be maximized.
2. All the variables involved in the problem are nonnegative.
3. Each constraint may be written so that the expression with the variables is less than or equal to a nonnegative constant.
Copyright (c) 2003 Brooks/Cole, a division of Thomson Learning, Inc
Maximize P = 4x + 5y
Subject to 3 5 20
6
0, 0
x y
x y
x y
Ex. A standard maximization problem:
First introduce nonnegative slack variables to make equations out of the inequalities:
3 5 20
6
x y u
x y v
Next, rewrite the objective function Set = 0 with a 1 on P:
–4x – 5y + P = 0
Copyright (c) 2003 Brooks/Cole, a division of Thomson Learning, Inc
3 5 20
6
4 5 0
x y u
x y v
x y P
Form the system:
Write as a tableau:
constant
3 5 1 0 0 20
1 1 0 1 0 6
4 5 0 0 1 0
x y u v P
Nonbasic variables
Basic variables
Variables in non-unit columns are given a value of zero, so initially x = y = 0.
Copyright (c) 2003 Brooks/Cole, a division of Thomson Learning, Inc
Choose a pivot:
1. Select column: select most negative entry in the last row (to left of vertical line).
2. Select row: select smallest ratio: constant/entry (using only entries from selected column)
constant
3 5 1 0 0 20
1 1 0 1 0 6
4 5 0 0 1 0
x y u v P
20 / 5 4
6 /1 6
Ratios:
Next using the pivot, create a unit column
Copyright (c) 2003 Brooks/Cole, a division of Thomson Learning, Inc
constant
3/5 1 1/5 0 0 4
1 1 0 1 0 6
4 5 0 0 1 0
x y u v P
11
5R
constant
3/5 1 1/5 0 0 4
2/5 0 1/5 1 0 2
1 0 1 0 1 20
x y u v P
2 1
3 15
R R
R R
Copyright (c) 2003 Brooks/Cole, a division of Thomson Learning, Inc
constant
3/5 1 1/5 0 0 4
2/5 0 1/5 1 0 2
1 0 1 0 1 20
x y u v P
25
2R
Repeat steps
Ratios:4
20 / 33/ 5
25
2 / 5
constant
3/5 1 1/5 0 0 4
1 0 1/2 5/2 0 5
1 0 1 0 1 20
x y u v P
Copyright (c) 2003 Brooks/Cole, a division of Thomson Learning, Inc
1 2
3 2
3
5R R
R R
constant
0 1 1/2 3/2 0 1
1 0 1/2 5/2 0 5
0 0 1/ 2 5 / 2 1 25
x y u v P
All entries in the last row are nonnegative therefore an optimal solution has been reached:
Assign 0 to variables w/out unit columns (u, v).
Notice x = 1, y = 5, and P = 25 (the max).
Copyright (c) 2003 Brooks/Cole, a division of Thomson Learning, Inc
The Simplex Method:
1. Set up the initial simplex tableau.
2. If all entries in the last row are nonnegative then an optimal solution has been reached, go to step 4.
3. Perform the pivot operation: convert pivot to a 1, then use row operations to make a unit column. Return to step 2.
4. Determine the optimal solution(s). The value of the variable heading each unit column is given by the corresponding value in the column of constants. Variables heading the non-unit columns have value zero.
Copyright (c) 2003 Brooks/Cole, a division of Thomson Learning, Inc
Multiple Solutions
There are infinitely many solutions if and only if the last row to the right of the vertical line of the final simplex tableau has a zero in a non-unit column.
No SolutionA linear programming problem will have no solution if the simplex method breaks down (ex. if at some stage there are no nonnegative ratios for computation).
Copyright (c) 2003 Brooks/Cole, a division of Thomson Learning, Inc
Minimization with Constraints
3 5 20
6
0, 0
x y
x y
x y
Ex. Minimize C = –4 x – 5ySubject to
Notice if we let P = –C = 4x + 5y we have a standard maximization problem.
If we solve this associated problem we find P = 25, therefore the minimum is C = –25.
Copyright (c) 2003 Brooks/Cole, a division of Thomson Learning, Inc
A Standard (minimization) Linear Programming Problem:
1. The objective function is to be minimized.
2. All the variables involved in the problem are nonnegative.
3. Each constraint may be written so that the expression with the variables is greater than or equal to a nonnegative constant.
Copyright (c) 2003 Brooks/Cole, a division of Thomson Learning, Inc
Maximization problems can be associated with minimization problems (and vice versa). The original problem is called the Primal and the associated problem is called the Dual.
The Dual Problem
Theorem of Duality•A primal problem has a solution if and only if the dual has a solution.
•Both objective functions attain the same optimal value.
•The optimal solution of the primal appears under the slack variables in the last row of the final simplex tableau associated with the dual.
Copyright (c) 2003 Brooks/Cole, a division of Thomson Learning, Inc
Ex.
20 10 300
15 15 300
10 20 250
x y
x y
x y
Minimize C = 10x + 11y
Subject to
Write down the primal information:
Constant
20 10 300
15 15 300
10 20 250
10 11
x y
Copyright (c) 2003 Brooks/Cole, a division of Thomson Learning, Inc
Interchange the columns and rows and use variables u, v, w.
constant
20 15 10 10
10 15 20 11
300 300 250
u v w
This can be represented by the problem:
Maximize P = 300u + 300v + 250w
Subject to 20 15 10 10
10 15 20 11
0, 0, 0
u v w
u v w
u v w
This is a standard maximization problem
Copyright (c) 2003 Brooks/Cole, a division of Thomson Learning, Inc
Create the initial simplex tableau adding slack variables x and y.
constant
20 15 10 1 0 0 10
10 15 20 0 1 0 11
300 300 250 0 0 1 0
u v w x y P
constant
1 3/ 4 1/ 2 1/ 20 0 0 1/ 2
10 15 20 0 1 0 11
300 300 250 0 0 1 0
u v w x y P
11
20R
pivot
Copyright (c) 2003 Brooks/Cole, a division of Thomson Learning, Inc
constant
1 3/ 4 1/ 2 1/ 20 0 0 1/ 2
0 15 / 2 15 1/ 2 1 0 6
0 75 100 15 0 1 150
u v w x y P
2 1
3 1
10
300
R R
R R
constant
1 3/ 4 1/ 2 1/ 20 0 0 1/ 2
0 1/ 2 1 1/ 30 1/15 0 2 / 5
0 75 100 15 0 1 150
u v w x y P
21
15R
Copyright (c) 2003 Brooks/Cole, a division of Thomson Learning, Inc
constant
1 1/ 2 0 1/15 1/ 30 0 3/10
0 1/ 2 1 1/ 30 1/15 0 2 / 5
0 25 0 35 / 3 20 / 3 1 190
u v w x y P
1 2
3 2
1
2100
R R
R R
12R
constant
2 1 0 2 /15 1/15 0 3/ 5
0 1/ 2 1 1/ 30 1/15 0 2 / 5
0 25 0 35 / 3 20 / 3 1 190
u v w x y P
Copyright (c) 2003 Brooks/Cole, a division of Thomson Learning, Inc
constant
2 1 0 2 /15 1/15 0 3/ 5
1 0 1 1/10 1/10 0 1/10
50 0 0 15 5 1 205
u v w x y P
2 1
3 1
1
225
R R
R R
This is the final tableau with x = 15, y = 5, and P = C = 205.
Copyright (c) 2003 Brooks/Cole, a division of Thomson Learning, Inc
Maximize P = 8x + 3y
Subject to 2 8
2
0, 0
x y
x y
x y
Ex. A nonstandard maximization problem:
First change the inequalities to less than or equal to.
2 8
2
0, 0
x y
x y
x y
Now proceed with the simplex method
Copyright (c) 2003 Brooks/Cole, a division of Thomson Learning, Inc
Introduce slack variables to make equations out of the inequalities and set the objective function = 0:
2 8
2
8 3 0
x y u
x y v
x y P
The initial tableau and notice v = –2 (not feasible):
constant
2 1 1 0 0 8
1 1 0 1 0 2
8 3 0 0 1 0
x y u v P
We need to pivot to a feasible solution
Copyright (c) 2003 Brooks/Cole, a division of Thomson Learning, Inc
constant
2 1 1 0 0 8
1 1 0 1 0 2
8 3 0 0 1 0
x y u v P
Locate any negative number in the constant column ( –2). Now go to the first negative to the left of that constant (–1). This determines the pivot column. The pivot row is found by examining the positive ratios. So –1 is our pivot.
Ratios
8
2
Create unit column
Copyright (c) 2003 Brooks/Cole, a division of Thomson Learning, Inc
constant
2 1 1 0 0 8
1 1 0 1 0 2
8 3 0 0 1 0
x y u v P
constant
3 0 1 1 0 6
1 1 0 1 0 2
11 0 0 3 1 6
x y u v P
1 2
3 23
R R
R R
2R
Note: now we have a feasible solution proceed with simplex
New pivot since it is the only positive ratio
Copyright (c) 2003 Brooks/Cole, a division of Thomson Learning, Inc
constant
1 0 1/3 1/3 0 2
1 1 0 1 0 2
11 0 0 3 1 6
x y u v P
constant
1 0 1/3 1/3 0 2
0 1 1/3 2 / 3 0 4
0 0 11/ 3 2 / 3 1 28
x y u v P
2 1
3 111
R R
R R
11
3R
This is the final tableau: x = 2, y = 4, P = 28
Copyright (c) 2003 Brooks/Cole, a division of Thomson Learning, Inc
The Simplex Method for Nonstandard Problems1. If necessary, rewrite as a maximization problem.
2. If necessary, rewrite inequalities as less or equal to.
3. Introduce slack variables and write simplex tableau.
4. If no negative constants (upper column) use simplex method, otherwise go to step 5.
5. Pick a negative entry in a row with a negative constant (this is the pivot column). Compute positive ratios to determine pivot row. Then pivot and return to step 4.