Вы находитесь на странице: 1из 17

Do you remember?

 Standard equation form


 Slack and surplus variables
 Basic and nonbasic variables
 Entering and leaving variables
 Pivot element, row and column
 Artificial variables

1
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).

2
Conditions for optimal solution:
a) all the variables take nonnegative values (≥0)
b) the coefficients of the variables in the objective
function are all nonnegative with the coefficients
of the non-basic variables being positive (>0).

If condition (a) fulfilled  the solution is feasible


If condition (b) fulfilled  unique optimal solution.

If this solution had been feasible, but not optimal,


we would continue the algorithm using standard
steps until the optimal solution was found.

3
 Simplex method to solve LP problems that
satisfy three conditions:
1. The objective function is to be maximized.
2. All the variables involved are nonnegative.
3. Each linear constraint may be written so that
the expression involving the variables is less
than or equal () to a nonnegative constant.

 How simplex method used to solve


minimization problems that meet the
second and third conditions listed above???

4
 Solve the following linear programming problem:
Minimize C  2 x  3 y
subject to 5 x  4 y  32
x  2 y  10
x, y  0

 Thisproblem involves the minimization of the


objective function and so is not a standard
maximization problem.
 Note, however, that all the other conditions for a
standard maximization hold true.

5
 We can use the simplex method to solve this
problem by converting the objective function from
minimizing C to its equivalent of maximizing P = – C.
 Thus, the restated linear programming problem is

Maximize P  2 x  3 y
subject to 5 x  4 y  32
x  2 y  10
x, y  0
 This
problem can now be solved using the simplex
method

6
1. Express LP in standard equation form.
2. Set up the initial simplex table. Maximize P  2 x  3 y
subject to 5 x  4 y  32
Express LP in standard equation form:
x  2 y  10
Maximize P − 2x − 3y + 0u + 0v = 0 x, y  0
Subject to 5x + 4y + u = 32
x + 2y + v = 10
x, y, u, v  0

Initial table:
Basic x y u v P Solution
u 5 4 1 0 0 32
v 1 2 0 1 0 10
P –2 –3 0 0 1 0
7
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.
a) The column with most negative entry 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 to be pivot row.
d) Convert the pivot element into 1
New pivot row = old pivot row  pivot element
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)
f) Return to step 3.
5. Determine the optimal solution(s).
8
Final Iteration:
Basic x y u v P Solution
x 1 0 1/3 –2/3 0 4
y 0 1 –1/6 5/6 0 3
P 0 0 1/6 7/6 1 17

Step 5. Determine the optimal solution.


 Locate the basic variables in the final tableau.
In this case, the basic variables are x, y, and P.
 The optimal value for x is 4.
 The optimal value for y is 3.
 The optimal value for P is 17, which means that
the minimized value for C is –17 (refer slide 6)

9
1) Express LP problem in standard form.
2) Introduce Artificial variables (A) to LHS of
constraints for  or =
3) Add penalty (“-M” for max & “M” for min) to
objective function. M, a very large number, is used to
ensure that the values of A will be zero in the final (optimal) table

4) Apply simplex method until obtain optimum


solution & if it arises any of these 2 cases:
 No artificial variables in Basic
 Artificial variables = 0 in Basic

10
Minimize Z =2 X1 + 3 X2
Subject to ½ X1 + ¼ X 2 ≤ 4
X1 + 3X2  20
X1 + X2 = 10
X1, X2  0

Step 1 + 2: Standard Equation form + Artificial variables


Min Z = 2 X1 + 3 X2 + M A1 + M A2
Min Z – 2 X1 – 3 X2 - M A1 -M A2 =0
½ X1 + ¼ X2 + S1 =4
X1 + 3X2 - S2 + A1 = 20
X1 + X2 + A2 = 10
X1, X2 ,S1, S2, A1, A2  0 A1, A2 are artificial variables
where: M is a very large number

11
Step 2: Initial table

Basic X1 X2 S1 S2 A1 A2 Solution
S1 ½ ¼ 1 0 0 0 4
A1 1 3 0 -1 1 0 20
A2 1 1 0 0 0 1 10
Z -2 -3 0 0 -M -M 0

Note that one of the simplex rules is violated, which


is the basic variables A1, and A2 have a non zero
value in the z row; therefore, this violation must be
corrected before proceeding in the simplex algorithm
as follows.
 Tocorrect this violation before starting the
simplex algorithm, the elementary row operations
are used as follows:

13
 1st
iteration:
Basic X1 X2 S1 S2 A1 A2 RHS
S1 1/2 1/4 1 0 0 0 4
A1 1 3 0 -1 1 0 20
A2 1 1 0 0 0 1 10
Z 2M-2 4M-3 0 -M 0 0 30M

• Since there is a positive value in the last row, this solution


is not optimal (because is minimization problem)
• The entering variable is X2
• The leaving variable is A1 (it has the smallest positive ratio)
 2nd iteration:
Basic X1 X2 S1 S2 A1 A2 RHS
S1 5/12 0 1 1/12 -1/12 0 7/3

X2 1/3 1 0 -1/3 1/3 0 20/3

A2 2/3 0 0 1/3 -1/3 1 10/3

Z 2/3M-1 0 0 1/3M-1 1-4/3M 0 20+10/3M

• Since there is a positive value in the last row, this solution


is not optimal
• The entering variable is X1
• The leaving variable is A2 (it has the smallest positive ratio)
 3rd iteration: Final table
Basic X1 X2 S1 S2 A1 A2 RHS
S1 0 0 1 -1/8 1/8 -5/8 1/4

X2 0 1 0 -1/2 1/2 -1/2 5

X1 1 0 0 1/2 -1/2 3/2 5

Z 0 0 0 -1/2 ½-M 3/2-M 25

This solution is optimal, since there is no positive value in


the Z-row & no Artificial variable in BASIC. The optimal
solution is: X1 = 5, X2 = 5, S1 = ¼
A1 = A2 = 0 and min Z = 25
 In the final table, if one or more artificial
variables (A1, A2, …) still basic and has a
nonzero value, then the problem has an
infeasible solution.

 All other conditions in simplex method are


still valid in the Big M method.

17

Вам также может понравиться