ISE203 Optimization 1 Linear Models. Dr. Arslan Örnek Chapter 4 Solving LP problems: The Simplex Method SIMPLEX

Similar documents
Linear programming II João Carlos Lourenço

Read: H&L chapters 1-6

Linear Programming. Linear programming provides methods for allocating limited resources among competing activities in an optimal way.

Controlling Air Pollution. A quick review. Reclaiming Solid Wastes. Chapter 4 The Simplex Method. Solving the Bake Sale problem. How to move?

Introduction. Linear because it requires linear functions. Programming as synonymous of planning.

Introduction to Operations Research

5 The Theory of the Simplex Method

Advanced Operations Research Techniques IE316. Quiz 1 Review. Dr. Ted Ralphs

CSC 8301 Design & Analysis of Algorithms: Linear Programming

Chap5 The Theory of the Simplex Method

Chapter 3: Towards the Simplex Method for Efficient Solution of Linear Programs

Section Notes 5. Review of Linear Programming. Applied Math / Engineering Sciences 121. Week of October 15, 2017

CSE 40/60236 Sam Bailey

Outline. CS38 Introduction to Algorithms. Linear programming 5/21/2014. Linear programming. Lecture 15 May 20, 2014

Introduction to Operations Research Prof. G. Srinivasan Department of Management Studies Indian Institute of Technology, Madras

Introduction to Linear Programming

The Ascendance of the Dual Simplex Method: A Geometric View

Other Algorithms for Linear Programming Chapter 7

Review for Mastery Using Graphs and Tables to Solve Linear Systems

The Simplex Algorithm

Introduction to Mathematical Programming IE496. Final Review. Dr. Ted Ralphs

DM545 Linear and Integer Programming. Lecture 2. The Simplex Method. Marco Chiarandini

Optimization of Design. Lecturer:Dung-An Wang Lecture 8

Finite Math Linear Programming 1 May / 7

Section Notes 4. Duality, Sensitivity, and the Dual Simplex Algorithm. Applied Math / Engineering Sciences 121. Week of October 8, 2018

Linear Optimization. Andongwisye John. November 17, Linkoping University. Andongwisye John (Linkoping University) November 17, / 25

AM 121: Intro to Optimization Models and Methods Fall 2017

Some Advanced Topics in Linear Programming

II. Linear Programming

What s Linear Programming? Often your try is to maximize or minimize an objective within given constraints

16.410/413 Principles of Autonomy and Decision Making

The Simplex Algorithm

Lesson 17. Geometry and Algebra of Corner Points

Mathematical and Algorithmic Foundations Linear Programming and Matchings

Linear Programming Problems

Linear Programming Terminology

BCN Decision and Risk Analysis. Syed M. Ahmed, Ph.D.

Copyright 2007 Pearson Addison-Wesley. All rights reserved. A. Levitin Introduction to the Design & Analysis of Algorithms, 2 nd ed., Ch.

Advanced Operations Research Techniques IE316. Quiz 2 Review. Dr. Ted Ralphs

Department of Mathematics Oleg Burdakov of 30 October Consider the following linear programming problem (LP):

Introduction to Operations Research Prof. G. Srinivasan Department of Management Studies Indian Institute of Technology, Madras

INEN 420 Final Review

Civil Engineering Systems Analysis Lecture XV. Instructor: Prof. Naveen Eluru Department of Civil Engineering and Applied Mechanics

CMPSCI611: The Simplex Algorithm Lecture 24

Chapter 1 Linear Programming. Paragraph 4 The Simplex Algorithm

Linear optimization. Linear programming using the Simplex method. Maximize M = 40 x x2. subject to: 2 x1 + x2 70 x1 + x2 40 x1 + 3 x2 90.

5.4 Pure Minimal Cost Flow

Chapter 15 Introduction to Linear Programming

Name: THE SIMPLEX METHOD: STANDARD MAXIMIZATION PROBLEMS

BACK TO MATH LET S START EASY.

Chapter 4: The Mechanics of the Simplex Method

Linear Programming. Linear Programming. Linear Programming. Example: Profit Maximization (1/4) Iris Hui-Ru Jiang Fall Linear programming

Using the Graphical Method to Solve Linear Programs J. Reeb and S. Leavengood

Using the Simplex Method to Solve Linear Programming Maximization Problems J. Reeb and S. Leavengood

R n a T i x = b i} is a Hyperplane.

Artificial Intelligence

An example of LP problem: Political Elections

The Simplex Algorithm. Chapter 5. Decision Procedures. An Algorithmic Point of View. Revision 1.0

Advanced Operations Research Prof. G. Srinivasan Department of Management Studies Indian Institute of Technology, Madras

4.1 The original problem and the optimal tableau

Marginal and Sensitivity Analyses

Linear Programming. L.W. Dasanayake Department of Economics University of Kelaniya

Lecture 4: Linear Programming

Introduction to Linear Programming. Chapter 3: Hillier and Lieberman Chapter 3: Decision Tools for Agribusiness Dr. Hurley s AGB 328 Course

Linear programming and duality theory

Primal Simplex Algorithm for the Pure Minimal Cost Flow Problem

CS675: Convex and Combinatorial Optimization Spring 2018 The Simplex Algorithm. Instructor: Shaddin Dughmi

Ahigh school curriculum in Algebra 2 contains both solving systems of linear equations,

IE 5531: Engineering Optimization I

3. The Simplex algorithmn The Simplex algorithmn 3.1 Forms of linear programs

Module 1 Lecture Notes 2. Optimization Problem and Model Formulation

How to Solve a Standard Maximization Problem Using the Simplex Method and the Rowops Program

Generalized Network Flow Programming

4.1 Graphical solution of a linear program and standard form

Graphing Linear Inequalities in Two Variables.

AMATH 383 Lecture Notes Linear Programming

Fundamentals of Operations Research. Prof. G. Srinivasan. Department of Management Studies. Indian Institute of Technology Madras.

Econ 172A - Slides from Lecture 2

Lecture 9: Linear Programming

3 INTEGER LINEAR PROGRAMMING

Part 1. The Review of Linear Programming The Revised Simplex Method

VARIANTS OF THE SIMPLEX METHOD

Discrete Optimization. Lecture Notes 2

Linear Programming: Basic Concepts. Chapter 2: Hillier and Hillier

Farming Example. Lecture 22. Solving a Linear Program. withthe Simplex Algorithm and with Excel s Solver

Part 4. Decomposition Algorithms Dantzig-Wolf Decomposition Algorithm

LECTURE 6: INTERIOR POINT METHOD. 1. Motivation 2. Basic concepts 3. Primal affine scaling algorithm 4. Dual affine scaling algorithm

Simulation. Lecture O1 Optimization: Linear Programming. Saeed Bastani April 2016

OPERATIONS RESEARCH. Linear Programming Problem

Chapter 7. Linear Programming Models: Graphical and Computer Methods

Solutions for Operations Research Final Exam

An iteration of the simplex method (a pivot )

Systems of Equations and Inequalities. Copyright Cengage Learning. All rights reserved.

Lecture Notes 2: The Simplex Algorithm

NOTATION AND TERMINOLOGY

LINEAR PROGRAMMING (LP), GRAPHICAL PRESENTATION GASPAR ASAMPANA

An FPGA Implementation of the Simplex Algorithm

David G. Luenberger Yinyu Ye. Linear and Nonlinear. Programming. Fourth Edition. ö Springer

Graphical Methods in Linear Programming

Question 2: How do you solve a linear programming problem with a graph?

Transcription:

ISE203 Optimization 1 Linear Models Dr. Arslan Örnek Chapter 4 Solving LP problems: The Simplex Method SIMPLEX Simplex method is an algebraic procedure However, its underlying concepts are geometric Understanding these geometric concepts helps before going into their algebraic equivalents 2 1

3 The point of intersection of constraint boundaries are the corner-point solutions of the problem. The points that lie on the corners of the feasible region are the corner-point feasible (CPF) solutions. 4 2

5 Edges For any LP problem with n decision variables, two CPF solutions are adjacent to each other if they share n-1 constraint boundaries. The two adjacent CPF solutions are connected by a line segment that lies on these same shared constraint boundaries. Such a line segment is referred to as an edge of the feasible region. 6 3

Optimality test Consider any LP problem that possesses at least one optimal solution. If a CPF solution has no adjacent CPF solutions that are better (as measured by Z), then it must be an optimal solution. 7 8 4

9 Introducing slack variables x 3, x 4 and x 5 to convert inequalities into equalities 10 5

Slack variables Slack variable = 0 in the current solution then this solution lies on the constraint boundary for the corresponding functional contraint. If 0 the solution lies on the feasible side of this constraint boundary. If 0, the solution lies on the infeasible side of this constraint boundary. 11 12 6

13 14 7

The Simplex Method in a Nutshell Initialization (Find initial CPF solution) Is the current CPF solution optimal? Yes Stop No Move to a better adjacent CPF solution 15 Language of the Simplex Method 16 8

Initial Assumptions All constraints are of the form All right-hand-side values (b j, j=1,,m) are positive We ll learn how to address other forms later 17 The Augmented Form Set up the method first: Convert inequality constraints to equality constraints by adding slack variables Original Form Augmented Form Maximize Z = 3x 1 +5x 2 Maximize Z = 3x 1 +5x 2 subject to x 1 4 2x 2 12 3x 1 +2x 2 18 x 1,x 2 0 subject to x 1 +s 1 = 4 2x 2 = 12 3x 1 +2x 2 = 18 x 1,x 2 0 18 9

X 2 Basic and Basic Feasible Solutions Augmented Form (0,9,4,-6,0) Maximize Z = 3x 1 + 5x 2 subject to x 1 +s 1 = 4 2x 2 +s 2 = 12 3x 1 + 2x 2 +s 3 = 18 (0,6,4,0,6) (2,6,2,0,0) (4,6,0,0,-6) x 1,x 2, s 1,s 2,s 3 0 (2,3,2,6,6) (4,3,0,6,0) Augmented solution Basic infeasible solution (0,2,4,8,14) (0,0,4,12,18) (4,0,0,12,6) (6,0,-2,12,0) Basic feasible solution (BFS) Nonbasic feasible solution X 1 19 Basic, Nonbasic Solutions and the Basis In an LP, number of variables > number of equations The difference is the degrees of freedom of the system e.g. in Wyndor Glass, degrees of freedom (d.f.)= 5-3=2 Can set some variables (# = d.f.) to an arbitrary value (simplex uses 0) These variables (set to 0) are called nonbasic variables The rest can be found by solving the remaining system The basis: the set of basic variables If all basic variables are 0, we have a BFS Between two basic solutions, if their bases are the same except for one variable, then they are adjacent 20 10

Algebra of the Simplex Method Initialization Maximize Z = 3x 1 + 5x 2 subject to x 1 +s 1 = 4 2x 2 +s 2 = 12 3x 1 + 2x 2 +s 3 = 18 x 1,x 2, s 1, s 2, s 3 0 Find an initial basic feasible solution Remember from key concepts: If possible, use the origin as the initial CPF solution Equivalent to: Choose original variables to be nonbasic (x i =0, i=1, n) and let the slack variables be basic (s j =b j, j=1, m)) 21 Algebra of the Simplex Method Optimality Test Maximize Z = 3x 1 + 5x 2 subject to x 1 +s 1 = 4 2x 2 +s 2 = 12 3x 1 + 2x 2 +s 3 = 18 x 1,x 2, s 1, s 2, s 3 0 Are any adjacent BF solutions better than the current one? Rewrite Z in terms of nonbasic variables and investigate rate of improvement Current nonbasic variables: x 1,x 2 Corresponding Z: 0 Optimal? no 22 11

Algebra of the Simplex Method Step 1 of Iteration 1: Direction of Movement Maximize Z = 3x 1 + 5x 2 subject to x 1 +s 1 = 4 2x 2 +s 2 = 12 3x 1 + 2x 2 +s 3 = 18 x 1,x 2, s 1, s 2, s 3 0 Which edge to move on? Determine the direction of movement by selecting the entering variable (variable entering the basis) Choose the direction of steepest ascent x 1 : Rate of improvement in Z =3 x 2 : Rate of improvement in Z =5 Entering basic variable = x 2 23 Algebra of the Simplex Method Step 2 of Iteration 1: Where to Stop Maximize Z = 3x 1 + 5x 2 subject to x 1 +s 1 = 4 (1) 2x 2 +s 2 = 12 (2) 3x 1 + 2x 2 +s 3 = 18 (3) x 1,x 2, s 1, s 2, s 3 0 How far can we go? Determine where to stop by selecting the leaving variable (variable leaving the basis) Increasing the value of x 2 decreases the value of basic variables The minimum ratio test Constraint (1): x 1 4 no bound on x 2 (s 1 = 4 - x 1 0) Constraint (2): x 2 6 min Constraint (3): x 2 9 Leaving basic variable = s 2 24 12

Algebra of the Simplex Method Step 3 of Iteration 1: Solving for the New BF Solution Z - 3x 1-5x 2 = 0 (0) x 1 +s 1 = 4 (1) 2x 2 +s 2 = 12 (2) 3x 1 + 2x 2 +s 3 = 18 (3) Convert the system of equations to a more proper form for the new BF solution Elementary algebraic operations: Gaussian elimination Eliminate the entering basic variable (x 2 ) from all but its equation Since x 1 =0 and s 2 =0 we obtain (x 1,x 2,s 1,s 2,s 3 )= (0,6,4,0,6) 25 Algebra of the Simplex Method Optimality Test Z - 3x 1 + + 5/2 s 2 = 30 (0) x 1 +s 1 = 4 (1) x 2 + 1/2 s 2 = 6 (2) 3x 1 -s 2 + s 3 = 6 (3) Are any adjacent BF solutions better than the current one? Rewrite Z in terms of nonbasic variables and investigate rate of improvement Current nonbasic variables: x 1, s 2 Corresponding Z: 30 Optimal? No (increasing x 1 increases Z value) 26 13

Algebra of the Simplex Method Step 1 of Iteration 2: Direction of Movement Z - 3x 1 + + 5/2 s 2 = 30 (0) x 1 +s 1 = 4 (1) x 2 + 1/2 s 2 = 6 (2) 3x 1 -s 2 + s 3 = 6 (3) Which edge to move on? Determine the direction of movement by selecting the entering variable (variable entering the basis) Choose the direction of steepest ascent x 1 : Rate of improvement in Z = 3 s 2 : Rate of improvement in Z = - 5/2 Entering basic variable = x 1 27 Algebra of the Simplex Method Step 2 of Iteration 2: Where to Stop Z - 3x 1 + + 5/2 s 2 = 30 (0) x 1 +s 1 = 4 (1) x 2 + 1/2 s 2 = 6 (2) 3x 1 -s 2 + s 3 = 6 (3) How far can we go? Determine where to stop by selecting the leaving variable (variable leaving the basis) Increasing the value of x 1 decreases the value of basic variables The minimum ratio test Constraint (1): x 1 4 Constraint (2): no upper bound on x 1 Constraint (3): x 1 6/3= 2 Leaving basic variable = s 3 28 14

Algebra of the Simplex Method Step 3 of Iteration 2: Solving for the New BF Solution Z - 3x 1 + + 5/2 s 2 = 30 (0) x 1 +s 1 = 4 (1) x 2 + 1/2 s 2 = 6 (2) 3x 1 -s 2 + s 3 = 6 (3) Convert the system of equations to a more proper form for the new BF solution Elementary algebraic operations: Gaussian elimination Eliminate the entering basic variable (x 1 ) from all but its equation The next BF solution is (x1,x2,s1,s2,s3)= (2,6,2,0,0) 29 Algebra of the Simplex Method Optimality Test Z + 3/2 s 2 + s 3 = 36 (0) +s 1 + 1/3 s 2-1/3 s 3 = 2 (1) x 2 + 1/2 s 2 = 6 (2) x 1-1/3 s 2 + 1/3 s 3 = 2 (3) Are any adjacent BF solutions better than the current one? Rewrite Z in terms of nonbasic variables and investigate rate of improvement Current nonbasic variables: s 2, s 3 Corresponding Z: 36 Optimal? yes 30 15

The Simplex Method in Tabular Form For convenience in performing the required calculations Record only the essential information of the (evolving) system of equations in tableaux Coefficients of the variables Constants on the right-hand-sides Basic variables corresponding to equations 31 32 16

33 34 17

35 36 18

37 38 19

39 40 20

41 42 21

43 44 22

45 46 23

47 48 24

49 50 25

51 52 26

53 54 27

55 Fig. 4.3 Equality constraint 56 28

57 58 29

59 Fig. 4.4 Sequence of CPF solutions 60 30

61 62 31

63 64 32

65 66 33

67 68 34

69 70 35

71 72 36

Fig. 4.5 CP Solutions 73 74 37

75 Fig. 4.6 Feasible region and the sequence of operations 76 38

77 78 39

79 80 40

81 82 41

83 84 42

85 86 43

87 88 44

89 90 45

91 92 46

93 94 47

95 96 48

97 98 49

99 100 50