ORF 307: Lecture 2. Linear Programming: Chapter 2 Simplex Methods

Similar documents
Standard Form An LP is in standard form when: All variables are non-negativenegative All constraints are equalities Putting an LP formulation into sta

Linear Programming: Chapter 5 Duality

MAT016: Optimization

CHAPTER 2. The Simplex Method

Lecture 11: Post-Optimal Analysis. September 23, 2009

ORF 307: Lecture 4. Linear Programming: Chapter 3 Degeneracy

Systems Analysis in Construction

Optimization (168) Lecture 7-8-9

TIM 206 Lecture 3: The Simplex Method

IE 400: Principles of Engineering Management. Simplex Method Continued

21. Solve the LP given in Exercise 19 using the big-m method discussed in Exercise 20.

AM 121: Intro to Optimization Models and Methods Fall 2018

LP. Lecture 3. Chapter 3: degeneracy. degeneracy example cycling the lexicographic method other pivot rules the fundamental theorem of LP

Slack Variable. Max Z= 3x 1 + 4x 2 + 5X 3. Subject to: X 1 + X 2 + X x 1 + 4x 2 + X X 1 + X 2 + 4X 3 10 X 1 0, X 2 0, X 3 0

Part 1. The Review of Linear Programming

Dr. Maddah ENMG 500 Engineering Management I 10/21/07

The Simplex Method. Lecture 5 Standard and Canonical Forms and Setting up the Tableau. Lecture 5 Slide 1. FOMGT 353 Introduction to Management Science

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

Metode Kuantitatif Bisnis. Week 4 Linear Programming Simplex Method - Minimize

The simplex algorithm

Simplex Method for LP (II)

Today s class. Constrained optimization Linear programming. Prof. Jinbo Bi CSE, UConn. Numerical Methods, Fall 2011 Lecture 12

9.1 Linear Programs in canonical form

February 22, Introduction to the Simplex Algorithm

Lecture 5 Simplex Method. September 2, 2009

OPRE 6201 : 3. Special Cases

February 17, Simplex Method Continued

1 Review Session. 1.1 Lecture 2

IE 5531: Engineering Optimization I

CO350 Linear Programming Chapter 8: Degeneracy and Finite Termination

MATH 445/545 Homework 2: Due March 3rd, 2016

Prelude to the Simplex Algorithm. The Algebraic Approach The search for extreme point solutions.

Linear programs Optimization Geoff Gordon Ryan Tibshirani

Farkas Lemma, Dual Simplex and Sensitivity Analysis

Sensitivity Analysis

Lesson 27 Linear Programming; The Simplex Method

ENGI 5708 Design of Civil Engineering Systems

Slide 1 Math 1520, Lecture 10

ECE 307 Techniques for Engineering Decisions

AM 121: Intro to Optimization Models and Methods

Simplex Algorithm Using Canonical Tableaus

Special cases of linear programming

Simplex method(s) for solving LPs in standard form

Lecture 11 Linear programming : The Revised Simplex Method

Introduction to optimization

AM 121: Intro to Optimization

CPS 616 ITERATIVE IMPROVEMENTS 10-1

Linear Programming Redux

Fast Algorithms for LAD Lasso Problems

Linear programming: algebra

Chap6 Duality Theory and Sensitivity Analysis

The augmented form of this LP is the following linear system of equations:

THE STEPS OF THE SIMPLEX ALGORITHM

In Chapters 3 and 4 we introduced linear programming

Chapter 4 The Simplex Algorithm Part I

Distributed Real-Time Control Systems. Lecture Distributed Control Linear Programming

Summary of the simplex method

Week_4: simplex method II

(includes both Phases I & II)

ORF 522. Linear Programming and Convex Analysis

The Simplex Method. Standard form (max) z c T x = 0 such that Ax = b.

IP Cut Homework from J and B Chapter 9: 14, 15, 16, 23, 24, You wish to solve the IP below with a cutting plane technique.

Math Models of OR: Some Definitions

Week 3: Simplex Method I

Lecture 2: The Simplex method

4.6 Linear Programming duality

3 The Simplex Method. 3.1 Basic Solutions

Yinyu Ye, MS&E, Stanford MS&E310 Lecture Note #06. The Simplex Method

Example Problem. Linear Program (standard form) CSCI5654 (Linear Programming, Fall 2013) Lecture-7. Duality

MATH 445/545 Test 1 Spring 2016

The Dual Simplex Algorithm

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

Lecture 9 Tuesday, 4/20/10. Linear Programming

IE 400 Principles of Engineering Management. The Simplex Algorithm-I: Set 3

ORF 522. Linear Programming and Convex Analysis

MATH2070 Optimisation

Algebraic Simplex Active Learning Module 4

Non-Standard Constraints. Setting up Phase 1 Phase 2

Ann-Brith Strömberg. Lecture 4 Linear and Integer Optimization with Applications 1/10

(P ) Minimize 4x 1 + 6x 2 + 5x 3 s.t. 2x 1 3x 3 3 3x 2 2x 3 6

Lecture slides by Kevin Wayne

Introduction to Mathematical Programming IE406. Lecture 10. Dr. Ted Ralphs

(includes both Phases I & II)

CSCI5654 (Linear Programming, Fall 2013) Lecture-8. Lecture 8 Slide# 1

Linear Programming, Lecture 4

min 4x 1 5x 2 + 3x 3 s.t. x 1 + 2x 2 + x 3 = 10 x 1 x 2 6 x 1 + 3x 2 + x 3 14

IE 5531: Engineering Optimization I

Dual Basic Solutions. Observation 5.7. Consider LP in standard form with A 2 R m n,rank(a) =m, and dual LP:

56:171 Operations Research Fall 1998

CSC Design and Analysis of Algorithms. LP Shader Electronics Example

"SYMMETRIC" PRIMAL-DUAL PAIR

Math Homework 3: solutions. 1. Consider the region defined by the following constraints: x 1 + x 2 2 x 1 + 2x 2 6

Part 1. The Review of Linear Programming

Math Models of OR: Sensitivity Analysis

A Review of Linear Programming

Linear & Integer programming

1 Implementation (continued)

LINEAR PROGRAMMING I. a refreshing example standard form fundamental questions geometry linear algebra simplex algorithm

CO350 Linear Programming Chapter 8: Degeneracy and Finite Termination

The Simplex Algorithm

Transcription:

ORF 307: Lecture 2 Linear Programming: Chapter 2 Simplex Methods Robert Vanderbei February 8, 2018 Slides last edited on February 8, 2018 http://www.princeton.edu/ rvdb

Simplex Method for LP An Example. maximize x 1 + 3x 2 3x 3 subject to 3x 1 x 2 2x 3 7 2x 1 4x 2 + 4x 3 3 x 1 2x 3 4 2x 1 + 2x 2 + x 3 8 3x 1 5 x 1, x 2, x 3 0 1

Rewrite with Slack Variables maximize x 1 + 3x 2 3x 3 subject to 3x 1 x 2 2x 3 7 2x 1 4x 2 + 4x 3 3 x 1 2x 3 4 2x 1 + 2x 2 + x 3 8 3x 1 5 x 1, x 2, x 3 0 maximize ζ = x 1 + 3x 2 3x 3 subject to w 1 = 7 3x 1 + x 2 + 2x 3 w 2 = 3 + 2x 1 + 4x 2 4x 3 w 3 = 4 x 1 + 2x 3 w 4 = 8 + 2x 1 2x 2 x 3 w 5 = 5 3x 1 x 1, x 2, x 3, w 1, w 2, w 3, w 4, w 5 0 2

Rewrite with Slack Variables Notes: maximize ζ = x 1 + 3x 2 3x 3 subject to w 1 = 7 3x 1 + x 2 + 2x 3 w 2 = 3 + 2x 1 + 4x 2 4x 3 w 3 = 4 x 1 + 2x 3 w 4 = 8 + 2x 1 2x 2 x 3 w 5 = 5 3x 1 x 1, x 2, x 3, w 1, w 2, w 3, w 4, w 5 0 This layout is called a dictionary: the variables on the left are defined in terms of the variables on the right. We will use the Greek letter ζ for the objective function. Dependent variables, on the left, are called basic variables. Independent variables, on the right, are called nonbasic variables. Setting x 1, x 2, and x 3 to 0, we can read off the values for the other variables: w 1 = 7, w 2 = 3, etc. This specific solution is called a basic solution (aka dictionary solution). It s called a solution because it is one of many solutions to the system of linear equations. We are not implying that it is a solution to the optimization problem. We will call that the optimal solution. 3

Basic Solution is Feasible We got lucky! x 1 = 0, x 2 = 0, x 3 = 0, w 1 = 7, w 2 = 3, w 3 = 4, w 4 = 8, w 5 = 5 Notes: maximize ζ = x 1 + 3x 2 3x 3 subject to w 1 = 7 3x 1 + x 2 + 2x 3 w 2 = 3 + 2x 1 + 4x 2 4x 3 w 3 = 4 x 1 + 2x 3 w 4 = 8 + 2x 1 2x 2 x 3 w 5 = 5 3x 1 x 1, x 2, x 3, w 1, w 2, w 3, w 4, w 5 0. All the variables in the current basic solution are nonnegative. Such a solution is called feasible. The initial basic solution need not be feasible we were just lucky above. 4

Simplex Method First Iteration If x 2 increases, obj goes up. How much can x 2 increase? Until w 4 decreases to zero. Do it. End result: x 2 > 0 whereas w 4 = 0. That is, x 2 must become basic and w 4 must become nonbasic. Algebraically rearrange equations to, in the words of Jean-Luc Picard, Make it so. This is a pivot. 5

A Pivot: x 2 w 4 becomes 6

Simplex Method Second Pivot Here s the dictionary after the first pivot: Now, let x 1 increase. Of the basic variables, w 5 hits zero first. So, x 1 enters and w 5 leaves the basis. New dictionary is... 7

Simplex Method Final Dictionary It s optimal (no pink)! Click here to practice the simplex method. Click here to solve some challenge problems. 8

Agenda Discuss unboundedness; (today) Discuss initialization/infeasibility; i.e., what if initial dictionary is not feasible. (today) Discuss degeneracy. (next lecture) 9

Unboundedness Consider the following dictionary: Could increase either x 1 or x 3 to increase obj. Consider increasing x 1. Which basic variable decreases to zero first? Answer: none of them, x 1 can go off to infinity, and obj along with it. This is how we detect unboundedness with the simplex method. 10

Unbounded or Not? maximize x 1 + 2x 2 subject to x 1 + x 2 1 x 1 2x 2 2 x 1, x 2 0. Questions: 1. Is initial basic solution feasible or not? 2. Does the initial dictionary show the problem to be unbounded or not? 3. Is the problem unbounded or not? 4. How can we tell? 11

Unbounded or Not? maximize x 1 + 2x 2 subject to x 1 + x 2 1 x 1 2x 2 2 x 1, x 2 0. 2 1.5 1 0.5 0-0.5-0.5 0 0.5 1 1.5 2 2.5 3 Check out this python notebook: http://www.princeton.edu/ rvdb/307/python/primalsimplex2.ipynb 12

Unbounded or Not? maximize x 1 + 2x 2 subject to x 1 + x 2 1 x 1 2x 2 2 x 1, x 2 0. 13

Initialization Consider the following problem: maximize 3x 1 + 4x 2 subject to 4x 1 2x 2 8 2x 1 2 3x 1 + 2x 2 10 x 1 + 3x 2 1 3x 2 2 x 1, x 2 0 Phase-I Problem Modify problem by subtracting a new variable, x 0, from each constraint and replacing objective function with x 0 14

Phase-I Problem maximize x 0 subject to x 0 4x 1 2x 2 8 x 0 2x 1 2 x 0 + 3x 1 + 2x 2 10 x 0 x 1 + 3x 2 1 x 0 3x 2 2 x 0, x 1, x 2 0 Current basic solution is infeasible. But... Problem is clearly feasible: pick x 0 large, x 1 = 0 and x 2 = 0. If optimal solution has obj = 0, then original problem is feasible. Final phase-i dictionary can be used as initial phase-ii dictionary (ignoring x 0 thereafter). If optimal solution has obj < 0, then original problem is infeasible. 15

Initialization First Pivot Applet depiction shows both the Phase-I and the Phase-II objectives: Dictionary is infeasible even for Phase-I. One pivot needed to get feasible. Entering variable is x 0. Leaving variable is one whose current value is most negative, i.e. w 1. After first pivot... 16

Initialization Second Pivot Going into second pivot: Feasible! Focus on the yellow highlights. Let x 1 enter. Then w 5 must leave. After second pivot... 17

Initialization Third Pivot Going into third pivot: x 2 must enter. x 0 must leave. After third pivot... 18

End of Phase-I Current dictionary: Optimal for Phase-I (no yellow highlights). obj = 0, therefore original problem is feasible. 19

Phase-II Current dictionary: For Phase-II: Ignore column with x 0 in Phase-II. Ignore Phase-I objective row. w 5 must enter. w 4 must leave... 20

Optimal Solution Optimal! Click here to practice the simplex method on problems that may have infeasible first dictionaries. 21

Solve This Problem maximize 2x 1 + x 2 subject to x 1 + x 2 1 2x 1 x 2 4 x 1, x 2 0. Use the two-phase simplex method to solve this problem. 22

3 2.5 2 1.5 1 0.5 0-0.5-0.5 0 0.5 1 1.5 2 2.5 3 3.5 4 23