Presentation is loading. Please wait.

Presentation is loading. Please wait.

IEOR 4004 Midterm Review (part I) March 10, 2014.

Similar presentations


Presentation on theme: "IEOR 4004 Midterm Review (part I) March 10, 2014."— Presentation transcript:

1 IEOR 4004 Midterm Review (part I) March 10, 2014

2 Summary Modeling optimization problems Linear program Simplex method – Algorithm – Initialization – Variants Sensitivity analysis (in part II) Duality (in part II) – Upper bounds and Shadow prices – Complementary slackness

3 Mathematical modeling Simplified (idealized) formulation Limitations – Only as good as our assumptions/input data – Cannot make predictions beyond the assumptions We need more maps

4 Mathematical modeling Problem Model Problem simplification Model formulation Algorithm selection Numeric calculation Interpretation Sensitivity analysis

5 Mathematical modeling Deterministic = values known with certainty Stochastic = involves chance, uncertainty Linear, non-linear, convex, semi-definite

6 Formulating an optimization problem Linear program Decision variables Objective Constraints Domains x 1, x 2, x 3, x 4 2x 2 + 3x 3 x 1 − 2x 2 + x 3 − 3x 4 ≤ 1 − x 1 + 3x 2 + 2x 3 + x 4 ≥ − 2 x 1 ≥ 0 x 3 in {0,1} x 4 in [0,1] Linear constraints Linear constraints Sign restriction + x 1 (1 − 2x 2 ) 2 (x 1 ) 2 + (x 2 ) 2 + (x 3 ) 2 + (x 4 ) 2 ≤ 2 − 2x 1 x 3 = 1 Linear objective Linear objective x 2 ≠ 0.5 Minimize

7 Linear program solution = values of variables that together satisfy all constraints Feasible solution = satisfies also sign constraints Infeasible solution = not feasible Basis = set of m variables (where m = # of equations) Variable in basis = basic variable, all other non-basic Basic solution = set all non-basic variables to zero x 1 − 2x 2 + x 3 − 3x 4 = 1 − x 1 + 3x 2 + 2x 3 + x 4 = − 2 x 1 ≥ 0 x 1 = 4/3 x 2 = 0 x 3 = −1/3 x 4 = 0 x 1 = − 1 x 2 = −1 x 3 = 0 x 4 = 0 {x 1, x 2 }

8 Linear program Feasible region = set of all feasible solutions LP is Infeasible if feasible region empty LP is Unbounded if the objective function is unbounded over the feasible region objective function grows beyond bounds objective function growth is limited

9 x 5 = 3 − x 1 + 2x 2 − x 3 ’ + 3x 4 + − 3x 4 − x 6 = 2 − x 1 + 3x 2 + 2x 3 ’ + x 4 + − x 4 − x 3 ’ ≥ 0 Simplex algorithm Converting to standard form Add slack variables Substitute negative variables Substitute unrestricted variables Dictionary x 1 − 2x 2 − x 1 + 3x 2 ≤≥≤≥ 3 − 2 + x 5 = − x 6 = x 5, x 6 ≥ 0x 1, x 2 ≥ 0 + x 3 + 2x 3 − 3x 4 + x 4 x 3 ≤ 0 − x 3 ’ − 2x 3 ’ x 4 +, x 4 − ≥ 0 − 3x x 4 − + x 4 + − x 4 − z = − 2x 2 + 3x 3 ’

10 Simplex method (maximization) Optimality test Are all coefficients in z non-positive ? Variable selection Ratio test Find min b/a a = coeff of x i in xj b = value of x j a, b opposite signs Pivot x j to the basis Initial feasible solution END START NO YES xixi xjxj x j does not exist LP is unbounded optimal solution found x 5 = 3 − x 1 + 2x 2 − x 3 ’ + 3x 4 + − 3x 4 − x 6 = 2 − x 1 + 3x 2 + 2x 3 ’ + x 4 + − x 4 − z = − 2x 2 + 3x 3 ’ Alternative solutions?

11 Simplex algorithm Anatomy of a dictionary x 5 = 3 − x 1 + 2x 2 − x 3 ’ + 3x 4 + − 3x 4 − x 6 = 2 − x 1 + 3x 2 + 2x 3 ’ + x 4 + − x 4 − z = − 2x 2 + 3x 3 ’ negative coeff positive coeff zero coeff x 3 ’ enters Ratio test: x 5 : 3/1 = 3 x 6 : no constraint (different sign) (same sign) x 5 leaves (min ratio) basis objective(s)

12 z max 3x 1 +2x 2 x 1 + x 2 + x 3 = 80 2x 1 + x 2 + x 4 = 100 x 1, x 2, x 3, x 4 ≥ 0 Simplex/Graphical method Illustration isoprofit line 3x 1 +2x 2 = profit profit: optimal x 1 increases until x 4 =0 x 2 increases until x 3 =0 start: x 1 =0, x 2 =0, x 3 =80, x 4 =100 x 3, x 4 are slack variables x1x1 x2x2 x4x4 x3x3 max 3x 1 +2x 2 x 1 + x 2 ≤ 80 2x 1 + x 2 ≤ 100 x 1, x 2 ≥ 0

13 w = −3 + x 1 − 4x 2 − 3x 3 − 3x 4 − e 3 z = 2x 2 − 3x 3 Initialization - Phase I Goal: make all original variables non-basic (=0) If all-0 doesn’t satisfy a constraint, add artificial variable a i : – add +a i if the right-hand side is > 0 – add –a i if the right-hand side < 0 Add slack variables (where needed) New objective: minimize the sum of artificial variables Starting basis: all artificial + slack variables z = 2x 2 − 3x 3 x 1 − 2x 2 + x 3 − 3x 4 − x 1 + 3x 2 + 2x 3 + x 4 x 2 + x 3 + 2x 4 ≤ 1 = − 2 ≥ 1 Maximize w = − a 2 − a 3 + a 3 s 1 = 1 − x 1 + 2x 2 − x 3 + 3x 4 a 2 = 2 − x 1 + 3x 2 + 2x 3 + x 4 a 3 = 1 − x 2 − x 3 − 2x 4 + e 3 w = − a 2 − a 3 If optimal value negative, then LP Infeasible Else drop artificial variables and introduce z from equations without artificial variables + s 1 − a 2 − e 3 = 1 = − 2 = 1 x 1 = 5/2 − (7/2)x 3 + (1/4)a 2 − (7/4)a 3 − (5/4)s 1 + (7/4)e 3 x 2 = 0 − 2x 3 + (1/2)a 2 − (1/2)a 3 − (1/2)s 1 + (1/2)e 3 x 4 = 1/2 + (1/2)x 3 − (1/4) a 2 − (1/4)a 3 + (1/4)s 1 + (1/4)e 3 w = − a 2 − a 3 z = − 7x 3 − s 1 + e 3 x 1 = 5/2 − (7/2)x 3 − (5/4)s 1 + (7/4)e 3 x 2 = 0 − 2x 3 − (1/2)s 1 + (1/2)e 3 x 4 = 1/2 + (1/2)x 3 + (1/4)s 1 + (1/4)e 3

14 Degeneracy Basic solution is degenerate if some basic variable is zero – multiple dictionaries max 3x 1 +2x 2 x 1 + x 2 + x 3 = 80 2x 1 + x x 4 = 100 6x 1 + x 2 + +x 5 = 180 x 1, x 2, x 3, x 4, x 5 ≥ 0 x 1 = 20 +x 3 −x 4 x 2 = 60 − 2x 3 +x 4 x 5 = − 4x 3 + 5x 4 z = 180 − x 3 −x 4 x 1 = x 3 − 0.2x 5 x 2 = 60 − 1.2x x 5 x 4 = 0.8x x 5 z = 180 − 1.8x 3 − 0.2x 5 x 1 =20 x 2 =60 x 3 =x 4 =x 5 =0 x 1 = x 4 − 0.25x 5 x 2 = 60 −1.5x x 5 x 3 = 1.25x 4 − 0.25x 5 z = 180 − 2.25x x 5 optimal ??? optimal

15 Upper bounded Simplex Anatomy of a dictionary x 5 = 3 − x 1 + 2x 2 − x 3 + 3x 4 x 6 = 1 − x 1 + 3x 2 + 2x 3 + x 4 z = − 2x 2 + 3x 3 x 3 enters Ratio test: 1. (different sign) x 5 : 3/1 = 3 2. (entering variable) x 3 : 2 3. (same sign) x 6 : (4−1)/2 = 1.5 (different sign) (same sign) x 6 leaves (min ratio) basis objective(s) 0 ≤ x 1, x 2, x 4, x 5 0 ≤ x 3 ≤ 2 0 ≤ x 6 ≤ 4 bounds substitute x 6 = 4 − x 6 ’ 0 ≤ x 6 ’ ≤ 4

16 Dual Simplex Anatomy of a dictionary x 5 = − 3 − x 1 + 2x 2 − x 3 + 4x 4 x 6 = 1 − x 1 + 3x 2 + 2x 3 + x 4 z = − 5x 2 − 3x 3 − 7x 4 x 5 leaves Ratio test: x 1 : no constraint x 2 : 5/2 = 2.5 x 3 : no constraint x 4 : 7/4 = 1.75 (positive) x 4 enters (min ratio) basis objective(s) dually feasible (all coefficients non-positive) infeasible! negative value


Download ppt "IEOR 4004 Midterm Review (part I) March 10, 2014."

Similar presentations


Ads by Google