Download presentation

Presentation is loading. Please wait.

Published byDestiny Caley Modified about 1 year ago

1
4/17/ Simplex Method – standard form Key concept ： Change constraints from inequality to equality then find the solutions of the linear equations’ system. x 1 + x 2 3 x 1 - 2x 2 ≤ 4 x 1 + x 2 – s 2 = 3x 1 - 2x 2 + s 1 = 4 加上 slack variable ( 0) 使得等式成立 加上 surplus variable ( 0) 使得等式成立 Maximize f = 4x 1 + 3x 2 x 1 + x 2 ≤ 3 2x 1 - x 2 3 x 1 0, x 2 0 Maximize f = 4x 1 + 3x 2 x 1 + x 2 + s 1 = 3 2x 1 - x 2 - s 2 = 3 x 1, x 2, s 1, s 2 0 標準化

2
4/17/20152 a 11 x 1 + a 12 x 2 + … + a 1n x n = b The steps of Simplex Method 1.Transform into standard form. 2.Establish simplex tableau. 3.Choose the basic variables x B for initial feasible solution. ( 正常狀況下是 slack var.s) 4.Calculate the cost f j of each x j to produce objective benefit. f j 5.Calculate the pure objective benefit C j – f j of each x j under the current x B. x j * 6.Choose the max benefit producer x j * (the x j with max C j – f j ) as pivot variable. 7.Do the ratio test i = b i /a ij of each x Bi. Replace x B * (the x B having min i ) with x j *. 8.Do pivoting (elementary row operations), such that a ij * = 1 (a ij * : the coefficient in x B *’s row and x j *’s column), and such that the other coefficients in x j *’s column are A new tableau is obtained. C j – f j 9.Repeat from 4. until no C j – f j > 0. MaxC1C1 C2C2.. C j..CnCn i cBcB xBxB x1x1 x2x2 x j *.. xnxn bibi iiii 1c B1 x B1 a 11 a 12 …a 1n b1b1 b 1 a 1j 2c B2 x B2 a 21 a 22 …a 2n b2b2 b 2 a 2j … ……… mc Bm x Bm a m1 a m2 a mn bmbm b m a mj fjfj ∑ i c Bi a ij ∑ i c Bi b i C j -f j … Simplex Tableau 目標函數 的係數 技術矩陣 目標函數值 在目標函 數上的係數 x B 在目標函 數上的係數 c 1 x 1 + c 2 x 2 + … + c n x n

3
4/17/ Simplex method’s example CjCjCjCj i cBcB xBxB x1x1 x2x2 s1s1 s2s2 s3s3 bibi iiii 1c B1 =0 x B1 =s c B2 =0 x B2 =s c B3 =0 x B3 =s fjfj 00000∑ i c Bi b i =0 C j -f j Max f = 12x 1 + 8x 2 5x 1 + 2x 2 ≤ 150 2x 1 + 3x 2 ≤ 100 x 1, x 2 0 4x 1 + 2x 2 ≤ 80 5x 1 + 2x 2 + s 1 = 150 Max f = 12x 1 + 8x 2 + 0s 1 + 0s 2 + 0s 3 2x 1 + 3x 2 + s 2 = 100 4x 1 + 2x 2 + s 3 = 80 x 1, x 2, s 1, s 2, s 3 0 pivot Variable x 1 ratio test pivoting Row 3 用 x 1 換 s 3 step 9 step 8 step 7 step 6 step 5 step 4 step 3 step 2 step 1 [N|B] = [b] xNxBxNxB Initial Feasible Solution NX N + BX B = [b] B -1 NX N + X B = B -1 [b]

4
4/17/ Simplex method’s example – cont’s s2s s1s C j -f j ∑ i c Bi b i =0 000 fjfj x B3 =s 1 c B3 = x B2 =s 2 c B2 = x B1 =s 1 c B1 =0 1 ii bibi s3s3 x2x2 x1x1 xBxB cBcB i 0812CjCj Row3/ *Row3+Row2 -5*Row3+Row ∑ i c Bi b i = step 9 step 8 step 7 step 6 step 5 step 4 step 3 step 2 step 1 step 9 step 8 step 7 step 6 step 5 step 4 step 3 step 2 step 1 Loop 1 Loop 2 Pivoting x B3 =x 1 c B3 = x 1 + 2x 2 + s 1 = 150 2x 1 + 3x 2 + s 2 = 100 4x 1 + 2x 2 + s 3 = 80 x 1, x 2, s 1, s 2, s 3 0 Max f = 12x 1 + 8x 2 + 0s 1 + 0s 2 + 0s 3

5
4/17/ Simplex method’s example – cont’s CjCjCjCj icBcB xBxB x1x1 x2x2 s1s1 s2s2 s3s3 bibi iiii 1c B1 =0x B1 =s c B2 =8x B2 =x c B3 =12x B3 =x fjfj ∑ i c Bi b i =300 C j -f j step 9 step 8 step 7 step 6 step 5step 4step 3 step 2 step 1 沒有大於 0 的值 x 1 = 5, x 2 = 30, Max f =300

6
4/17/ Summary for simplex method C1C1 C2C2.. C j..CnCn i cBcB xBxB x1x1 x2x2 x j *.. xnxn bibi iiii 1c B1 x B1 a 11 a 12 …a 1n b1b1 b 1 a 1j 2c B2 x B2 a 21 a 22 …a 2n b2b2 … ……… mc Bm x Bm a m1 a m2 a mn bmbm fjfj ∑ i c Bi a ij ∑ i c Bi b i C j -f j … a 11 x 1 + a 12 x 2 + … + a 1n x n = b 1 a 21 x 1 + a 22 x 2 + … + a 2n x n = b 2 …… a i1 x 1 + a i2 x 2 + … + a in x n = b i …… a m1 x 1 + a m2 x 2 + … + a mn x n = b m x 1, x 2, …, x n 0 Maximize f = C 1 x 1 + C 2 x 2 + … + C n x n

7
4/17/ simplex method example again (example from Topic 1) CjCjCjCj icBcB xBxB xaxa xgxg s1s1 s2s2 s3s3 bibi iiii 1c B1 =0x B1 =s c B2 =0x B2 =s c B3 =0x B3 =s fjfj ∑ i c Bi b i =0 C j -f j Max f = 1.5x a + 1.2x g 1.5x a + 2x g ≤ x a + 3x g ≤ 2100 x a, x g 0 6x a + 3x g ≤ 3600 Max f = 1.5x a + 1.2x g 1.5x a + 2x g + s 1 = x a + 3x g + s 2 = 2100 x a, x g, s 1, s 2, s 3 0 6x a + 3x g + s 3 = 3600 標準化 6

8
4/17/ simplex method example again (cont’) CjCjCjCj icBcB xBxB xaxa xgxg s1s1 s2s2 s3s3 bibi iiii 1c B1 =0x B1 =s c B2 =0x B2 =s c B3 =1.5x B3 =x a fjfj C j -f j 66 1 (-3)+ 1/2 1/ /2-1/2 300 (-1.5)+ 0 -1/ ∑ i c Bi b i =900 – CjCjCjCj icBcB xBxB xaxa xgxg s1s1 s2s2 s3s3 bibi iiii 1c B1 =0x B1 =s 1 0-1/ c B2 =1.2x B2 =x g 0102/3-1/3200 3c B3 =1.5x B3 =x a 11/2001/6600 fjfj C j -f j * 900 ∑ i c Bi b i =900 CjCjCjCj icBcB xBxB xaxa xgxg s1s1 s2s2 s3s3 bibi iiii 1c B1 =0x B1 =s /6-1/3350 2c B2 =1.2x B2 =x g 0102/3-1/3200 3c B3 =1.5x B3 =x a 100-1/31/3500 fjfj C j -f j ∑ i c Bi b i = x g +s 2 － 0.5s 3 = 300 s 2 = 300 － 1.5x g +0.5s 3 s 2 /1.5= 300/1.5 － x g +(0.5/1.5)s 3 x g = 200 － 2s 2 /3 +s 3 /3 <<< i=2 x g = 1200 － 2x a +(1/3)s 3 <<< i=3 s 2 對目標函數值最沒貢獻， 所 以換成有貢獻的 x g ?

9
4/17/20159 C j -f j 是什麼 ? f j 與 C j -f j 是什麼 ? 5x 1 + 2x 2 + s 1 = 150 s 1 = x 1 - 2x 2 x 1 每增加 1 每個 s 1 就會減少 5 2x 1 + 3x 2 + s 2 = 100 4x 1 + 2x 2 + s 3 = 80 x 1 每增加 1 每個 s 2 就會減少 2 x 1 每增加 1 每個 s 3 就會減少 4 f j 是 x j 生產 basic var.s 的單位成本 C-f C j -f j 是 x j 當 basic var.s 後可創造的單位利益 s 2 = x 1 - 3x 2 s 3 = x 1 - 2x 2

Similar presentations

© 2016 SlidePlayer.com Inc.

All rights reserved.

Ads by Google