Operations Research 1: Introduction To Operations Research Hillier & Liebermann Eighth Edition Mcgrawhill
Operations Research 1: Introduction To Operations Research Hillier & Liebermann Eighth Edition Mcgrawhill
Operations Research 1: Introduction To Operations Research Hillier & Liebermann Eighth Edition Mcgrawhill
Chapter 4 Introduction to Operations Research Hillier & Liebermann Eighth Edition McGrawHill
Operations Research 1 06/07 Chapter 4 1
Contents
Simplex method: Graphical Algorithm Simplex method: Algebraic Algorithm Differences between the graphical and the algebraic algorithm Simplex method: Tabular Form Simplex method: Tie breaking Simplex method: Other model forms
x1 = 4
For any linear= 3x1 + 5x2 Maximize Z programming problem with n decision variables, two CPF solutions are adjacent subject to to each other if they share n 1 x1 4 constraint boundaries. The two adjacent 12 solutions 2x2 CPF are connected by a line segment that3x1 + 2x2 lies on these 18 shared same constraint boundary. Such a line and segment is referred to as an edge of the feasible region.
x2
x1 = 4
CPF solution
x2
(0, 6) and (4, 0) (2, 6) and (0, 0) (4, 3) and (0, 6) (4, 0) and (2, 6) (0, 0) and (4, 3)
(4, 3) (4, 0)
= Corner-point solution (not feasible) = Corner-point feasible solution (CPF solution) = Edge
2.
Feasible region
3. Optimality test:
Choose (0,0) as the initial CPF solution Is (0,0) an optimal CPF solution? No (Z = 0), adjacent solutions are better. Move to a better CPF solution in three steps: Choose the direction with the highest rate of increasing Z. Z increases with a rate of 3 by moving up the x1 axis. Z increases with a rate of 5 by moving along the x2 axis. We choose to move up the x2 axis. Stop at the first new constraint boundary: 2x2 = 12 (We have to stay in the feasible region). Solve for the intersection of the new set of constraints boundaries: (0, 6). Z = 3 * 0 + 5 * 6 = 30 Is (0, 6) an optimal CPF solution? No, an adjacent solution is better. x1
10
Iteration 2: 1.
2.
3. Optimality test:
Feasible region
Move to a better CPF solution in three steps: Choose the best direction. Z will increase by moving to the right. Rate = 3. Z will decrease by moving down the x2 axis. We choose to move to the right. Stop at the first new constraint boundary: 3x1 + 2x2 = 12 (We have to stay in the feasible region). Solve for the intersection of the new set of constraints boundaries: (2, 6). Z = 3 * 2 + 5 * 6 = 36 Is (2, 6) an optimal CPF solution? Yes, there is no better CPF solution!
x1 1 2 3 4 5 6 7 8 9 10
Solution concept 2
Iterative algorithm:
Initialization: Set up, find a initial CPF-solution Optimality test: Is the solution optimal? If no, continue. If yes, stop. Iteration: Perform an iteration to find a better CPF solution. Then go back to the optimality test.
Solution concept 3
Whenever possible, choose the origin as the initial CPF-solution at initialization. This eliminates the use of algebraic procedures to find and solve for an initial CPF solution.
Operations Research 1 06/07 Chapter 4 7
Solution concept 5
After identification of the current CPF solution, examine all the edges that emanate from that CPF solution. The edges lead to other CPF solution. Choose the edge with the (highest) positive rate of improvement in Z.*
Solution concept 6
If the rate of improvement in Z is positive, the next adjacent CPF solution is better than the current CPF solution.* If the rate of improvement in Z is negative, the next adjacent CPF solution is worse.* If there are no positive rates of improvement, the current CPF solution is optimal.*
=4 = 12 = 18
9
Slack values
Slack variable > 0 Slack variable = 0 Slack variable < 0
Feasible Region
Infeasible Region
Solution on a corner Corner point point solution Solution on a feasible CPF solution corner point Example of a solution (0,6)
11
- Number of equations
Thus, we can choose a number of variables (= number of degrees of freedom) to be set equal to any arbitrary value. These variables are called nonbasic variables. (Together they are the basis.) The other variables are called basic variables.
Maximize Z = 3x1 + 5x2 subject to x1 + x3 2x2 + x4 3x1 + 2x2 +x5 and xj 0 for j = 1, 2, 3, 4, 5.
Operations Research 1 06/07 Chapter 4
=4 = 12 = 18
In this example there are 5 3 = 2 degrees of freedom. For example, we choose x1 = 4 and x4 = 2 (x1 and x4 are nonbasic vars) then this must be true: x3 = 0; x2 = 5; x5 = -4 (x3, x2 and x5 are basic vars)
12
13
Optimality test
Iteration 1 step 1
Move up the edge lying on the x2 Increase x2 while adjusting other variable axis. values to satisfy the system of equations. Stop when the first new Stop when the first basic variable (x3, x4 constraint boundary (2x2 = 12) is or x5) drops to zero (x4). reached. Find the intersection of the new With x2 now a basic variable and x4 now a pair of constraint boundaries: (0, nonbasic variable, solve the system of 6) is the new CPF solution. equations: (0, 6, 4, 0, 6) is the new BF solution.
Iteration 1 step 2
Iteration 1 step 3
14
Iteration 2 step 1
Iteration 2 step 2
Stop when the first new Stop when the first basic variable (x2, x3, constraint boundary (3x1 + 2x2 = or x5) drops to zero (x5). 18) is reached. Find the intersection of the new With x1 now a basic variable and x5 now a pair of constraint boundaries: nonbasic variable, solve the system of (2, 6) is the new CPF solution. equations: (2, 6, 2, 0, 0) is the new BF solution. (2, 6) is optimal, because (2, 6, 2, 0, 0) is optimal, because moving along either edge from increasing either nonbasic variable(x4 or (2, 6) decreases Z. x5) decreases Z.
Iteration 2 step 3
Optimality test
15
Optimality Test
The current BF solution is optimal if and only if every coefficent in row 0 is nonnegative ( 0). If it is, stop. Otherwise go to an iteration.
17
Iteration
Pivot column
Step 1. Determine the entering basic variable by selecting the variable with the most negative coefficient in Eq. (0). Put a box around the column and call this the pivot column.
Operations Research 1 06/07 Chapter 4 18
12 = 6 2 18 = 9 2
minimum
Iteration
Pivot number
Step 2. Determine the leaving basic variable by applying the minimum ratio test. Put a box around the row with the minimum ratio, this is the pivot row. Call the number in both boxes the pivot number.
19
Iteration: Step 3.
Solve for the new BF solution by changing the column of the entering basic variable (-5, 0, 2, 2) to the column of the leaving basic variable (0, 0, 1, 0) by using elementary row operations: 1. Divide the pivot row by the pivot number. Use this new pivot column in steps 2 and 3. 2. For each other row (including row 0) that has a negative coefficient in the pivot column, add to this row the product of the absolute value of this coefficient and the new pivot row. 3. For each other row that has a negative coefficient in the pivot column, substract from this row the product of this coefficient and 20 the new pivot row.
The operations in this example: 1. New row (2) = Old row (2) / 2 2. New row (0) = Old row (0) + 5 * New row (2) 3. New row (3) = Old row (3) 2 * New row (2)
4 = 4 1 6 = 2 3
36 2 6 2
Optimality test: Still not optimal because there is a negative coefficient in row (0). So at least one more iteration is needed. Iteration 2: - Determine the pivot row (and entering basic variable). - Run a minimum ratio test. - Determine the pivot column (and leaving basic variable). - Perform elementary operations:
- New row (3) = Old row (3) / 3 - New row (0) = Old row (0) + 3 * New row (3) - New row (1) = Old row (1) 1 * New row (3)
Optimality test: There is no negative coefficient in row (0), so the solution is optimal! Solution: Z = 36; x1 = 2; x2 = 6
Operations Research 1 06/07 Chapter 4 21
22
23
24
Basic Variable Z X3
Right Side 0 4
Ratio
None
25
26
Table 4.10
Iteration Basic Variable Z x3 x4 x5 Z x1 x4 x5 2 Z x1 x4 x2 Z x1 Coefficient of: Eq. (0) (1) (2) (3) Z 1 0 0 0 x1 -3 1 0 3 x2 -2 0 2 2 x3 0 1 0 0 x4 0 0 1 0 x5 0 0 0 0 Right Side 0 4 12 18 Optimal solution no
1 0 0 0 1 0 0 0
0 1 0 0 0 1 0 0
-2 0 2 2 0 0 0 1 0 0 0 1
3 1 0 -3 0 1 3 -3/2 0 0 1 0
12 4 12 6 18 4 6 3 18 2 2 6
no
Yes
Yes 27
Equality Constraints
Any equality constraint ai1x1 + ai2x2 + + ainxn = bi Actually is equivalent to a pair of inequality constraints: ai1x1 + ai2x2 + + ainxn bi ai1x1 + ai2x2 + + ainxn bi Example: Suppose that the Wyndor Glass Co. Problem is modified to require that Plant 3 be used at full capacity. The only resulting change in the LP model is that the third constraint, 3x1 + 2x2 18, instead becomes an equality constraint 3x1 + 2x2 = 18, so that the complete model becomes the one shown in the upper right hand corner of figure 4.3. This figure als shows in darker ink the feasible region which now consists of just the line segment connecting (2,6) and (4,3). After the slack variables still needed for the inequality constraints are introduced, the system of equations for the augmented form of the problem becomes (0) Z 3x1 5x2 =0 (1) x1 + x3 =4 (2) 2x2 + x4 =12 (3) 3x1 + 2x2 = 18
Operations Research 1 06/07 Chapter 4
28
Figure 4.3
Figure 4.3 When the third constraint becomes an equality constraint, the feasible region for the Wyndor Glass Co. problem becomes the line segment between (2,6) and (4,3). Maximize Z = 3x1 + 5x2, Subject to X1 4 2x2 12 3x1 + 2x2 = 18 And x1 0, x2 0
(2,6)
(4,3)
29
Minimization
Minimization problems can be converted to equivalent maximization problems: Minimizing
Z=
cjxj
j= 1
is equivalent to Maximizing
Z=
( cj)xj
j= 1
30
31
x1
4 12 18 x2 0
x1