chapter 3 linear programming methods 高等作業研究 高等作業研究 ( 一 ) chapter 3 linear...

50
Chapter 3 Linear Programming Methods 高高高高高高 高高高高高高 ( ) Chapter 3 Linear Programming Methods (II)

Upload: jack-greer

Post on 27-Dec-2015

271 views

Category:

Documents


2 download

TRANSCRIPT

Chapter 3 Linear Programming Methods

高等作業研究

高等作業研究 (一 )

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 2 and

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 right-hand 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

高等作業研究Example

Max

s.t.

321 20x-35x--5xz

1 2 3

1 2

1 2 3

x -x -x -2

-x -3x -3

x 0, x 0, x 0

Chapter 3 Linear Programming Methods

高等作業研究

Chapter 3 Linear Programming Methods

高等作業研究

Leaving variable: the basic variable with most negative value.( )

Entering variable: min. ratio test }0 : min{ rj

rj

j aa

crBX

Chapter 3 Linear Programming Methods

高等作業研究

Chapter 3 Linear Programming Methods

高等作業研究

Chapter 3 Linear Programming Methods

高等作業研究

Restarting After Changing the Right-Hand-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 from 35 to 20 and 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

2b

3b

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 . The solution in the optimal tableau, = 20 and = 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 and then multiply it by -1 to achieve the correct form.

10x 2

1x 2x

10x-x s42

Chapter 3 Linear Programming Methods

高等作業研究

Chapter 3 Linear Programming Methods

高等作業研究

Chapter 3 Linear Programming Methods

高等作業研究

SIMPLEX METHOD USING MATRIX NOTATION

• Decision variables:

• Objective coefficients:

• Right-hand-side constants:

Tn1 )x,,(xx

)c,,(cc n1

T1 mb (b , ,b )

Chapter 3 Linear Programming Methods

高等作業研究

• Structural coefficients:

11 12 1n

21 22 2n

m1 m2 mn

a a a

a a aA

a a a

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 = ( ), where and 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

NB x,x

Bx Nx

Chapter 3 Linear Programming Methods

高等作業研究

• Multiplying through by yields

=>

=>

-1B

Chapter 3 Linear Programming Methods

高等作業研究

• we introduce the n-dimensional row vector of dual variables,π, and define it as

, so currently z =πb and xB=B-1b.

-1BBc

Chapter 3 Linear Programming Methods

高等作業研究Example

• Max

s.t. 321 3x1.25x2xz

0 x0, x0,x

96x x

6 x3x

72x x2x

321

32

21

321

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

=>

• The objective value as a function of alone is

kx

kkk-1

B-1

B )xc-AB(c-bBcz

N-1

BN-1

B N)xBc-(cbBcz

NN-1

B-1

B )xc-NB(c-bBcz

Chapter 3 Linear Programming Methods

高等作業研究

• Reduced cost of

• Optimality condition: (Q=set of nonbasic variables)

KKkk-1

Bk c-Ac-ABcc

kx

Qk allfor 0ck

Chapter 3 Linear Programming Methods

高等作業研究

• For a particular basis B, we have

• When we set all the nonbasic variables equal to zero except xk , this expression becomes

)Nx-(bBx N-1

B

kk-1-1

B xAB-bBx

Chapter 3 Linear Programming Methods

高等作業研究

• Note

• For the example problem, we start with the basic solution

mk

2k

1k

k1-

k

a

a

a

ABA

0

3/2

2

bbB

x

x

x

x 1-

5

3

1

B

Chapter 3 Linear Programming Methods

高等作業研究

• Allowing to enter the basis, we compute

• The minimum ratio is θ= 6 for the first equation, so , must leave the basis.

2x

0

1/6

1/3

1

1

1

BABA 1-2

1-2

1x

Chapter 3 Linear Programming Methods

高等作業研究 The initial and later simplex tableau

Iteration BV Z Original Variables

Slack Variables

RHS

Z 1 -c 0 0 0

SX 0 A I b

IterationBVZOriginalVariables

SlackVariables

RHS

Z 1 cABcB 1 1BcB bBcB1

AnyBX 0 AB1 1B bB1

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 LU decomposition 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

高等作業研究

Suppose that xk is the entering variable and the rth basic variable is the leaving variable.The new basis inverse is:

Inverse Update formula

11 oldnew EBB

where E is an identity matrix except that its rth column is replaced by

where

m

.

.2

1

riifa

riifa

a

rk

rk

ik

i

1

],...,,,,...,,[ 1121 mrr eeeeeE is,That

Ex:

example previous -the- )1(

100

012/1

003

rE