Professional Documents
Culture Documents
If
you can only check a corner point one at a time,
which corner point do you select to maximize P?
y
P = x + 1.2 y Graphical Method
200 Corners P
2 A(0, 0) 0
D(0, 100) 3 B(90, 0) 90
100 C(48, 84)
C(48, 84) 148.8
S x 3 y 300
1 A(0, 0)
D(0, 100) 120
B(90, 0)
x
100 200 300
Algebraic Method
2 x y 180
Corners P
1 A(0, 0) 0
How to solve LP without drawing a graph? 2 D(0, 100) 120
3 C(48, 84) 148.8
2
Algebraic representation of the LP solution space is made with
two conditions:
• All the constraints (with the exception of the non-negativity
restrictions) are equations with a non-negative RHS.
• All the variables are non-negative.
3
Find out the number of equations (e) and variables (v) for a
LP problem v!
Ce
v
e!(v e)!
Example LP formulation:
Maximize Max Z = 2x1 + 3x2
Subject to 2x1 + x2 4
x1 + 2x2 5 } NOT equation!
x1, x2 0
6
If the size of LP problem increases, such as,
4 equations and 8 variables:
v! 8!
Cev 70 basic solutions
e!(v e)! 4!(8 4)!
7
Maximize Z = 2x1 + 3x2
Simplex method starts
from origin (0,0), Z=0 Path of simplex algorithm:
Increase either x1 or x2 ABC
will improve Z value
Value x2 is increased
until reached corner B
At B, simplex method
will increase x1 to
reach corner C, which
is optimum
Each corner point is associated (alongside the
edges) with an iteration
8
1. Express LP in standard equation form.
2. Set up the initial simplex table.
3. Determine whether the optimal solution has
been reached by examining all entries in the
last row (Z-row).
a. If all the entries are nonnegative, the optimal
solution has been reached. Proceed to step 5.
b. If there are one or more negative entries, the
optimal solution has not been reached.
Proceed to step 4.
4. Perform the pivot operation. Return to step 3.
5. Determine the optimal solution(s).
9
Conditions for optimal solution:
a) all the variables take nonnegative values
b) the coefficients of the variables in the objective
function are all nonnegative with the coefficients
of the non-basic variables being positive.
10
maximize P x 1.2 y
subject to 2 x y 180 x0
x 3 y 300 y0
Express LP in standard equation form:
Maximize P − x − 1.2y + 0u + 0v = 0
Subject to 2x + y + u = 180
x + 3y + v = 300
x, y, u, v 0 u, v are slack variables
We have already performed step 1 & 2 obtaining the initial
simplex table:
Iteration 1:
VERIFY:
Basic x y u v P Solution Basic variables
must be ZERO
u 2 1 1 0 0 180
in objective
v 1 3 0 1 0 300 function
P –1 – 6/5 0 0 1 0 11
Step 3: Determine whether the optimal solution has
been reached.
Since there are negative entries in the last row
of the table, the initial solution is not optimal.
Basic x y u v Solution Pivot Operation
1 180
180
u 2 1 1 0 180
v 1 3 0 1 300 300
3 100
P –1 – 6/5 0 0 0
Conclusion: y enters to basic variable and v leaves basic
Step 4: Perform the pivot operation.
a) Since the entry – 6/5 is the most negative entry the
second column in the table is the pivot column.
b) Divide each positive number of the pivot column into the
corresponding entry in the column of solution.
c) Select the smallest nonnegative ratio (≥0) pivot row.
12
Step 4: Perform the pivot operation.
d)Convert the pivot element into 1
New pivot row = old pivot row pivot element
Basic x y u v Solution
u 2 1 1 0 180
pivot row
v 1 3 0 1 300 pivot element
P –1 – 6/5 0 0 0
Conclusion: y enters to basic variable and v leaves basic
Iteration 1:
Basic x y u v Solution
u 2 1 1 0 180
vy 1/3 1 0 1/3 100
P –1 – 6/5 0 0 0
13
Step 4: Perform the pivot operation.
e) Use elementary row operations to convert the pivot
column = 0 except for the pivot element remains as 1.
For the other rows:
New row = old row − (pivot column coefficient) x (new pivot row)
Basic x y u v Solution
u 2 1 1 0 180
vy 1/3 1 0 1/3 100
P –1 – 6/5 0 0 0
Conclusion: y enters to basic variable and v leaves basic
Row u: 2 1 1 0 0 180 old row
− 1 (1/3 1 0 1/3 0 100) new pivot row
5/3 0 1 -1/3 0 80 new row
Row P: -1 -6/5 0 0 1 0
− -6/5 (1/3 1 0 1/3 0 100)
-3/5 0 0 2/5 1 120
14
Iteration 2:
Basic x y u v Solution
u 5/3 0 1 –1/3 80
y 1/3 1 0 1/3 100
P –3/5 0 0 2/5 120
Basic x y u v Solution
ux 1 0 3/5 –1/5 48
y 1/3 1 0 1/3 100
P –3/5 0 0 2/5 120
Basic x y u v Solution
ux 1 0 3/5 –1/5 48
y 0 1 –1/5 2/5 84
P 0 0 9/25 7/25 148 4/5
16
Step 3: Determine whether the optimal solution has
been reached.
Iteration 2:
Basic x y u v P Solution
x 1 0 3/5 –1/5 0 48
y 0 1 –1/5 2/5 0 84
P 0 0 9/25 7/25 1 148 4/5
Step 5: Determine the optimal solution(s).
Locate the basic variables in the final table.
The basic variables = x, y, and P.
The optimal value for x is 48.
The optimal value for y is 84.
The optimal value for P is 148.8.
Thus, the firm will maximize profits at $148.80 by
producing 48 type-A souvenirs and 84 type-B
souvenirs.
17
1. Infinite solutions: If there are NO negative values in Z-row, but
there is a 0 coefficient associated with a variable that is not in the
basic. Basic x y u v Z Solution
y 0 1 1 –2 0 1
v 1 0 –1 3 0 1
Z 0 0 2 0 1 10