290 likes | 455 Vues
L16 LP part2. Homework Review N design variables, m equations Summary. H15 Prob 1. H15 prob 8.3. ≥. H15 Prob 8.8 and 8.9. H15 prob 8.19. H15 Prob 21. H15 Prob 21. x1=0. x2=0. x3=0. x4=0. Prob 8.21 cont’d. Linear Programming Prob.s. Must convert to standard form LP Problem!.
E N D
L16 LP part2 • Homework • Review • N design variables, m equations • Summary
Linear Programming Prob.s Must convert to standard form LP Problem!
Transforming LP to Std Form LP • If Max, then f(x) = - F(x) • If x is unrestricted, split into x+ and x-, and substitute into f(x) and all gi(x) andrenumber all xi • If bi < 0, then multiply constraint by (-1) • If constraint is ≤, then addslacksi • If constraint is ≥, then subtractsurplussi
Std Form LP Problem Matrix form All “=“ All “≥0” i.e. non-neg.
Ex 8.4 cont’d Pivot row Pivot column
Terms • basic solutions - solutions created by setting (n-m) variables to zero • basic feasible sol’ns - sol’ns @ vertices of feasibility polygon • feasible solution - any solution inS polyhedron • basic variables- dependent variables, not set to zero • non-basic variables - independent variables, set to zero, i.e. not in basis. • basis – identity columns of the coefficient matrixA
Method? • Set up LP prob in “tableau” • Select variable to leave basis • Select variable to enter basis (replace the one that is leaving) • Use Gauss-Jordan elimination to form identity sub-matrix, (i.e. new basis, identity columns) • Repeat steps 2-4 until opt sol’n is found!
Can we be efficient? • Are we at the min? • If not which non-basic variable should be brought into basis? • Which basic variable should be removed to make room for the new one coming on? SIMPLEX METHOD!
Simplex Method – Part 1 of 2Single Phase Simplex Method When the Standard form LP Problem has only ≤ inequalties…. i.e. only slack variables, we can solve using the Single-Phase Simplex Method! If surplus variables exist… we need the Two-Phase Simplex Method –with artificial variables… Sec 8.6 (after Spring Break)
Single-Phase Simplex Method • Set up LP prob in a SIMPLEX tableau add row for reduced cost, cj’ and column for min-ratio, b/a label the rows (using letters) of each tableau • Check if optimum, all non-basic c’≥0? • Select variable to enter basis(from non-basic) Largest negative reduced cost coefficient/ pivot column • Select variable to leave basis Use min ratio column / pivot row • Use Gauss-Jordan elimination on rows to form new basis, i.e. identity columns • Repeat steps 2-5 until opt solution is found!
Ex 8.7 1 phase Simp Meth All constraints are “slack” type Therefore, can use single-phase Simplex Method Figure 8.3 Graphical solution to the LP problem Example 8.7. Optimum solution along line C–D. z*=4.
Step 1. Set up Simplex Tableau Step 2. check if optimum? X1 and x2 are <0! Continue!
Step3 & 4 • 3. Select variable to enter basis(from non-basic) • Largest negative reduced cost coefficient/ pivot column • 4. Select variable to leave basis • Use min ratio column / pivot row
Why use Min Ratio Rule? We want to add x1 into basis, i.e. no longer is x1=0 How much of x1 can we add? Whoops!!!!
Step 5 Use Gauss-Jordan form new basis, i.e. identity columns Step 6. Repeat steps 2-5. Step 2. Check if optimal? Since all c’≥0… We have found the optimal solution!
Use Excel to help with arithmetic? See Excel spreadsheet on website
Summary • Need to transform into Std LP format Unrestricted, slack, surplus variables, min = - Max • Opt solution is on a vertex • Simplex Method moves efficiently from one feasible combination of basic variables to another. • Use Single-Phase Simplex Method when only “slack” type constraints. • Use Excel to assist w/arithmetic