Simplex Method MSci331—Week 3~4.

Slides:



Advertisements
Similar presentations
TWO STEP EQUATIONS 1. SOLVE FOR X 2. DO THE ADDITION STEP FIRST
Advertisements

You have been given a mission and a code. Use the code to complete the mission and you will save the world from obliteration…
Monday HW answers: p B25. (x – 15)(x – 30) 16. (t – 3)(t – 7)29. (x -2)(x – 7) 19. (y – 6)(y + 3)roots = 2 and (4 + n)(8 + n)34. (x + 7)(x.
1
Feichter_DPG-SYKL03_Bild-01. Feichter_DPG-SYKL03_Bild-02.
© 2008 Pearson Addison Wesley. All rights reserved Chapter Seven Costs.
Copyright © 2003 Pearson Education, Inc. Slide 1 Computer Systems Organization & Architecture Chapters 8-12 John D. Carpinelli.
Chapter 1 The Study of Body Function Image PowerPoint
Copyright © 2011, Elsevier Inc. All rights reserved. Chapter 6 Author: Julia Richards and R. Scott Hawley.
Author: Julia Richards and R. Scott Hawley
1 Copyright © 2013 Elsevier Inc. All rights reserved. Appendix 01.
Properties Use, share, or modify this drill on mathematic properties. There is too much material for a single class, so you’ll have to select for your.
UNITED NATIONS Shipment Details Report – January 2006.
February 21, 2002 Simplex Method Continued
February 7, 2002 A brief review of Linear Algebra Linear Programming Models Handouts: Lecture Notes.
Tuesday, March 5 Duality – The art of obtaining bounds – weak and strong duality Handouts: Lecture Notes.
and 6.855J Spanning Tree Algorithms. 2 The Greedy Algorithm in Action
February 14, 2002 Putting Linear Programs into standard form
We need a common denominator to add these fractions.
1 RA I Sub-Regional Training Seminar on CLIMAT&CLIMAT TEMP Reporting Casablanca, Morocco, 20 – 22 December 2005 Status of observing programmes in RA I.
Jeopardy Q 1 Q 6 Q 11 Q 16 Q 21 Q 2 Q 7 Q 12 Q 17 Q 22 Q 3 Q 8 Q 13
Exit a Customer Chapter 8. Exit a Customer 8-2 Objectives Perform exit summary process consisting of the following steps: Review service records Close.
FACTORING ax2 + bx + c Think “unfoil” Work down, Show all steps.
Year 6 mental test 10 second questions
1 Outline relationship among topics secrets LP with upper bounds by Simplex method basic feasible solution (BFS) by Simplex method for bounded variables.
Solve Multi-step Equations
REVIEW: Arthropod ID. 1. Name the subphylum. 2. Name the subphylum. 3. Name the order.
Break Time Remaining 10:00.
PP Test Review Sections 6-1 to 6-6
EU market situation for eggs and poultry Management Committee 20 October 2011.
An Application of Linear Programming Lesson 12 The Transportation Model.
2 |SharePoint Saturday New York City
VOORBLAD.
15. Oktober Oktober Oktober 2012.
Artificial Variables, 2-Phase and Big M Methods
Copyright © 2012, Elsevier Inc. All rights Reserved. 1 Chapter 7 Modeling Structure with Blocks.
1 RA III - Regional Training Seminar on CLIMAT&CLIMAT TEMP Reporting Buenos Aires, Argentina, 25 – 27 October 2006 Status of observing programmes in RA.
Factor P 16 8(8-5ab) 4(d² + 4) 3rs(2r – s) 15cd(1 + 2cd) 8(4a² + 3b²)
Basel-ICU-Journal Challenge18/20/ Basel-ICU-Journal Challenge8/20/2014.
1..
LP—Graphical Solution Method MSci331—Week Convex Set and Extreme Points 2.
© 2012 National Heart Foundation of Australia. Slide 2.
Adding Up In Chunks.
Understanding Generalist Practice, 5e, Kirst-Ashman/Hull
Note to the teacher: Was 28. A. to B. you C. said D. on Note to the teacher: Make this slide correct answer be C and sound to be “said”. to said you on.
Model and Relationships 6 M 1 M M M M M M M M M M M M M M M M
25 seconds left…...
Subtraction: Adding UP
: 3 00.
Solving Systems of Linear Equations By Elimination
Januar MDMDFSSMDMDFSSS
Analyzing Genes and Genomes
We will resume in: 25 Minutes.
©Brooks/Cole, 2001 Chapter 12 Derived Types-- Enumerated, Structure and Union.
Essential Cell Biology
Clock will move after 1 minute
Intracellular Compartments and Transport
PSSA Preparation.
Essential Cell Biology
1 Chapter 13 Nuclear Magnetic Resonance Spectroscopy.
Energy Generation in Mitochondria and Chlorplasts
Select a time to count down from the clock above
Murach’s OS/390 and z/OS JCLChapter 16, Slide 1 © 2002, Mike Murach & Associates, Inc.
Completing the Square Topic
1 Decidability continued…. 2 Theorem: For a recursively enumerable language it is undecidable to determine whether is finite Proof: We will reduce the.
EMIS 8374 LP Review: The Ratio Test. 1 Main Steps of the Simplex Method 1.Put the problem in row-0 form. 2.Construct the simplex tableau. 3.Obtain an.
Presentation transcript:

Simplex Method MSci331—Week 3~4

Simplex Algorithm Consider the following LP, solve using Simplex:

Step 1: Preparing the LP LP Model Is the LP model in normal form? LP in a standard form All constraints are “=“ All RHS >0 All variables>0 If there are = or > Add an artificial variables to these constraints Write Row 0 Move all variables in the objective function equation to LHS. Keep all constants in the RHS A min problem can be treated as a –MAX problem Obtain an initial BFS If the original LP is not in normal form apply the Big M method to obtain the initial BFS.

Step 2: Express the LP in a tableau form Z X1 X2 S1 S2 S3 RHS Ratio Row 0 1 -3 -2 -- Row 1 - 2 100 Row 2 80 Row 3 40

Step 3: Obtain the initial basic feasible solution (if available) a) Set n-m variables equal to 0 These n-m variables the NBV b) Check if the remaining m variables satisfy the condition of BV = If yes, the initial feasible basic solution (bfs) is readily a available = else, carry on some ERO to obtain the initial bfs Z X1 X2 S1 S2 S3 RHS Ratio Row 0 1 -3 -2 -- Row 1 - 2 100 Row 2 80 Row 3 40

Step 4: Apply the Simplex Algorithm a) Is the initial bfs optimal? (Will bringing a NBV improve the value of Z?) b) If yes, which variable from the set of NBV to bring into the set of BV? - The entering NBV defines the pivot column c) Which variable from the set of BV has to become NBV? - The exiting BV defines the pivot row Exits Pivot cell Enters Z X1 X2 S1 S2 S3 RHS Ratio Row 0 1 -3 -2 -- Row 1 - 2 100 100/2 Row 2 80 80/1 Row 3 40 40/1

Summary of Simplex Algorithm for Papa Louis Set: n-m=0 m≠0 BFS (intial) BFS (1) BFS (2) BFS (3) 1 The optimal solution is x1=20, x2=60 The optimal value is Z=180 The BFS at optimality x1=20, x2=60, s3=20

Geometric Interpretation of Simplex Algorithm

Class activity Consider the following LP:   This is a maximizing LP, in normal form. So an initial BFS exists.

Class activity

Class activity Z x1 x2 s1 s2 s3 s4 RHS 1 -3 100 ----- 4 2 6 -1

Class activity Z x1 x2 s1 s2 s3 s4 RHS 1 -3 100 ----- 4 2 6 -1 4/1 6/1 Make this coefficient equal 1 and pivot all other rows relative to it Enters Exits Z x1 x2 s1 s2 s3 s4 RHS 1 -3 100 ----- 4 2 6 -1 4/1 6/1 2/2* ---

Class activity Z x1 x2 s1 s2 s3 s4 RHS 1 -3 100 ----- 4 2 6 -3/2 1/2 100 ----- 4 2 6 -3/2 1/2 -1 -7.5 3/2 103 2.5 1 -1/2 3 3.5 1 -1/2 5 1/2 1 5

Class activity Z x1 x2 s1 s2 s3 s4 RHS 1 -3 100 ----- 4 2 6 -3/2 1/2 Make this coefficient equal 1 and pivot all other rows relative to it Enters Z x1 x2 s1 s2 s3 s4 RHS 1 -3 100 ----- 4 2 6 -3/2 1/2 -1 -7.5 3/2 103 3/2.5* 2.5 1 -1/2 3 3.5 1 -1/2 5 5/3.5 --- 5/0.5 1/2 1 5

Class activity Z x1 x2 s1 s2 s3 s4 RHS 1 ----- 3 112 -7.5 3/2 103 1 3 112 -7.5 3/2 103 1 2/5 -1/5 6/5 -1.4 1 1/5 0.8 3.5 1 -1/2 5 1 3/5 0.8 2.8 1 -3/2 1/2 -1/5 0.6 1 4.4 1/2 1 5

Example: LP model with Minimization Objective Solve the following LP model: Initial Tableau

Example: LP model with Minimization Objective Iteration 0 Iteration 1 Optimality test:

> Constraint x2 x1 Constraint 1 Constraint 3 Constraint 2 40 35 30 25 20 15 10 5 5 10 15 20 25 30 35 40 Constraint 1 Constraint 3 Z Constraint 2 x1 Constraint 4 New feasible region

Equality Constraint x2 x1 Constraint 1 Constraint 3 Constraint 2 40 35 30 25 20 15 10 5 5 10 15 20 25 30 35 40 Constraint 1 Constraint 3 Z Constraint 2 x1 New feasible region

The Problem of Finding an Initial Feasible BV An LP Model Standard Form Cannot find an initial basic variable that is feasible.

Example: Solve Using the Big M Method Write in standard form

Example: Solve Using the Big M Method Adding artificial variables

Example: Solve Using the Big M Method Put in tableau form

Example: Solve Using the Big M Method Eliminating a2 from row 0 by operations: new Row 0 = old Row 0 -M*old Row 2

Example: Solve Using the Big M Method Eliminating a3 from the new row 0 by operations: new Row=old Row-M*old Row 3

Example: Solve Using the Big M Method The initial basic variables are s1=25, a2=12, and a3=0. Now ready to proceed for the simplex algorithm. The initial Tableau

Example: Solve Using the Big M Method Using EROs change the column of x1 into a unity vector. Iteration 1

Example: Solve Using the Big M Method Using EROs change the column of z into a unity vector. Iteration 2 Students to try more iterations. The solution is infeasible. See the attached solution.

Special case 1: Alternative Optima . Observation: At optimality, all nonbasic variables have nonnegative (≥0) coefficients in row 0, hence the bfs is optimal. At optimality, the non-basic variable x2 has a zero coefficient in row 0. If variable x2 enters into the basis, the basis and bfs changes but the objective function value remains the same. Hence we have multiple optima. Conclusions: If there is no nonbasic variable with a zero coefficient in row 0 of the optimal tableau, then the LP has a unique optimal solution. Even if there is a nonbasic variable with a zero coefficient in row 0 of the optimal tableau, it is possible that the LP may not have an alternative optimal solutions. See Notes on this slide (below) for more information

Special case 1: Alternative Optima Observation: At optimality, all nonbasic variables have nonnegative (≥0) coefficients in row 0, hence the bfs is optimal.

Special case 2: Unbounded LPs 1 s1 x1 Notice after the first iteration:  At this stage, x2 is the entering variable (because it has the most negative reduced cost, but there is no ratio to compute, since there is no positive entry in the column of x2. As we start increasing x2, the value of z increases (from Row 0) and the values of the basic variables increase as well (from Rows 1 and 2). There is nothing to stop them going off to infinity. So the problem is unbounded. Conclusions: An unbounded LP for a maximization problem occurs when a nonbasic variable with a negative coefficient in row 0 has a nonpositive coefficient in each constraint. The objective function value improves with each iteration See Notes on this slide (below) for more information

Special Case 3: Degeneracy Definition: An LP is degenerate if it has at least one bfs in which a basic variable is equal to zero. Notice S1=0 However notice that degeneracy is detected when the ratio tests for row 1 and 2 are equal. This means as X2 enters, both S1 and S2 will reach zero at the same time. Hence we have a choice of selecting S1 or S2 as the exiting BV.

Special Case 5: Degeneracy Iteration 0 Iteration 1 Definition: An LP is degenerate if it has at least one bfs in which a basic variable is equal to zero. Iteration 2

Special Case 5: Degeneracy Degeneracy reveals from practical standpoint that the model has at least one redundant constraint.