高等作業研究 高等作業研究(一) Chapter 3 Linear Programming Methods (II) Chapter 3 Linear Programming Methods 高等作業研究 Initial BFS • When the original model contains "greater than or equal to" inequalities or equations, a BFS is not immediately available. • We now show how to find an initial solution by solving an augmented linear program as the first phase of a two-phase procedure. • The second phase involves solving the original problem using the BFS obtained in the first phase as the starting point. Chapter 3 Linear Programming Methods 高等作業研究 Example Chapter 3 Linear Programming Methods 高等作業研究 (artificial variables: 1 and 2 ) Note: The optimal objective value in phase 1 is w*=0. Chapter 3 Linear Programming Methods 高等作業研究 Chapter 3 Linear Programming Methods 高等作業研究 Chapter 3 Linear Programming Methods 高等作業研究 7 -3 Chapter 3 Linear Programming Methods 高等作業研究 DUAL SIMPLEX ALGORITHM • We say that the basis for the tableau is primal feasible if all elements of the righthand side are nonnegative. Alternatively, when some of the elements are negative, we say that the basis is primal infeasible. • Up to this point, we have always been concerned with primal feasible bases. Chapter 3 Linear Programming Methods 高等作業研究 • For the primal simplex algorithm, some elements in row 0 will be negative until the final iteration when the optimality conditions are satisfied. • In the event that all elements of row 0 are nonnegative, we say that the associated basis is dual feasible. • Alternatively, if some of the elements of row 0 are negative, we have a dual infeasible basis. Chapter 3 Linear Programming Methods 高等作業研究 • The primal simplex method works with primal feasible but dual infeasible (nonoptimal) bases. • At the final (optimal) solution, the basis is both primal and dual feasible. • Throughout the process, we maintain primal feasibility and drive toward dual feasibility. Chapter 3 Linear Programming Methods 高等作業研究 • For the dual simplex method, until the final iteration, each basis examined is primal infeasible (there are some negative values on the right-hand side) and dual feasible (all elements in row 0 are nonnegative). • At the final (optimal) iteration, the solution is both primal and dual feasible. Throughout the process, we maintain dual feasibility and drive toward primal feasibility. Chapter 3 Linear Programming Methods 高等作業研究 • The dual simplex algorithm is best suited for problems in which an initial dual feasible solution is easily available. • It is particularly useful for reoptimizing a problem after a constraint has been added or some parameters have been changed so that the previously optimal basis is no longer feasible. Chapter 3 Linear Programming Methods 高等作業研究 Max s.t. Example z -5x1 - 35x 2 - 20x 3 x1 -x 2 -x 3 -2 -x1 -3x 2 -3 x1 0, x 2 0, x 3 0 Chapter 3 Linear Programming Methods 高等作業研究 Chapter 3 Linear Programming Methods 高等作業研究 Leaving variable: the basic variable with most negative value.( X B ) r Entering variable: min. ratio test min{ cj arj : arj 0} Chapter 3 Linear Programming Methods 高等作業研究 Chapter 3 Linear Programming Methods 高等作業研究 Chapter 3 Linear Programming Methods 高等作業研究 Restarting After Changing the RightHand-Side Constants Ex: Chapter 3 Linear Programming Methods 高等作業研究 Chapter 3 Linear Programming Methods 高等作業研究 • Changing the RHS constants will change only the entries in the last column of the tableau. In particular, if we change b 2 from 35 to 20 and b 3 from 20 to 26 in the original problem statement, the RHS vector in the tableau shown in Table 3.29 for the current basis B becomes Chapter 3 Linear Programming Methods 高等作業研究 Why? The inverse matrix B-1 records the operations that have been done to the system of equations. Chapter 3 Linear Programming Methods 高等作業研究 46 Chapter 3 Linear Programming Methods 高等作業研究 Chapter 3 Linear Programming Methods 高等作業研究 Adding a Constraint • Using the preceding problem, we now add the constraint x 2 10 . The solution in the optimal tableau, x 1 = 20 and x 2 = 5, does not satisfy this constraint, so action must be taken to incorporate it into the tableau. • First we subtract a slack variable to get the equality x 2 - x s4 10 and then multiply it by -1 to achieve the correct form. Chapter 3 Linear Programming Methods 高等作業研究 Chapter 3 Linear Programming Methods 高等作業研究 Chapter 3 Linear Programming Methods 高等作業研究 SIMPLEX METHOD USING MATRIX NOTATION • Decision variables: x (x 1 ,, x n ) T • Objective coefficients: c (c1 ,, c n ) • Right-hand-side constants: b (b1 , ,b m )T Chapter 3 Linear Programming Methods 高等作業研究 • Structural coefficients: a11 a12 a 21 a 22 A a m1 a m2 a1n a 2n a mn Chapter 3 Linear Programming Methods 高等作業研究 LP Model Chapter 3 Linear Programming Methods 高等作業研究 • Suppose we now assume that the n variables are permuted so that the basic variables are the first m components of x. Then we can write x = (x B , x N), where x B and x N refer to the basic and nonbasic variables, respectively. The matrix A can also be partitioned similarly into A = (B, N), where B is the m × m basis matrix and N is m × (n - m). The equation Ax = b can thus be written as Chapter 3 Linear Programming Methods 高等作業研究 • Multiplying through by B-1 yields => => Chapter 3 Linear Programming Methods 高等作業研究 • we introduce the n-dimensional row vector of dual variables,π, and define it as c B B -1 , so currently z =πb and xB=B-1b. Chapter 3 Linear Programming Methods 高等作業研究 Example • Max z 2x 1 1.25x 2 3x 3 s.t. 2x 1 x 2 2x 3 7 3x 1 x2 6 x 2 6x 3 9 x 1 0, x 2 0, x 3 0 Chapter 3 Linear Programming Methods 高等作業研究 Chapter 3 Linear Programming Methods 高等作業研究 The dual solution is Chapter 3 Linear Programming Methods 高等作業研究 • we see that the objective function value for a given basis can be written as z c B B -1 b (c N - c B B -1 N)x N z c B B -1 b - (c B B -1 N - c N )x N => • The objective value as a function of x k alone is z c B B-1b - (c B B-1A k - c k )x k Chapter 3 Linear Programming Methods 高等作業研究 • Reduced cost of x k c k c B B A k - c k A K - c K -1 • Optimality condition: (Q=set of nonbasic variables) c k 0 for all k Q Chapter 3 Linear Programming Methods 高等作業研究 • For a particular basis B, we have x B B (b - Nx N ) -1 • When we set all the nonbasic variables equal to zero except xk , this expression becomes x B B-1b - B-1A k x k Chapter 3 Linear Programming Methods 高等作業研究 • Note a 1k a 2k -1 Ak B Ak a mk • For the example problem, we start with the basic solution x1 2 -1 x B x 3 B b b 3/2 x 0 5 Chapter 3 Linear Programming Methods 高等作業研究 • Allowing x 2 to enter the basis, we compute 1 1/3 -1 -1 A 2 B A 2 B 1 1/6 1 0 • The minimum ratio is θ= 6 for the first equation, so , x 1 must leave the basis. Chapter 3 Linear Programming Methods 高等作業研究 Iteration 0 The initial and later simplex tableau BV Z Z 1 Original Variables -c XS 0 A I Z Original Variables Slack Variables Z 1 cB B 1 A c cB B 1 XB 0 Iteration BV Any Slack Variables 0 1 B A B 1 RHS 0 b RHS 1 cB B b 1 B b Performing elementary row operations to a system of equations is equivalent to pre-multiply the system of equations by a certain matrix. Chapter 3 Linear Programming Methods 高等作業研究 REVISED SIMPLEX METHOD This method does not update and store the entire tableau but only those data elements needed to construct the current basis inverse and to reproduce the matrices describing the original problem. Chapter 3 Linear Programming Methods 高等作業研究 • Commercial codes do not store as an m × m matrix but use an implicit approach such as LUdecomposition to reconstruct it as needed. In this approach, the B-matrix is decomposed into an upper triangular matrix, U, and a lower triangular matrix, L, such that B = LU. Chapter 3 Linear Programming Methods 高等作業研究 • Components of Revised Simplex Algorithm: Chapter 3 Linear Programming Methods 高等作業研究 Chapter 3 Linear Programming Methods 高等作業研究 Chapter 3 Linear Programming Methods 高等作業研究 Chapter 3 Linear Programming Methods 高等作業研究 Chapter 3 Linear Programming Methods 高等作業研究 Chapter 3 Linear Programming Methods 高等作業研究 Inverse Update formula Suppose that xk is the entering variable and the rth basic variable is the leaving variable. 1 1 The new basis inverse is: Bnew EBold where E is an identity matrix except that its rth column is replaced by 1 2 . where . m aik a i rk 1 ark if i r if i r That is, E [e1, e2 ,..., er 1, , er 1,..., em ] Ex: 0 0 3 E 1 / 2 1 0 (r 1) - -the previous example 0 0 1 Chapter 3 Linear Programming Methods
© Copyright 2024 ExpyDoc