Optimisation and Operations Research

Similar documents
Optimisation and Operations Research

Review Solutions, Exam 2, Operations Research

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 programs Optimization Geoff Gordon Ryan Tibshirani

Simplex Algorithm Using Canonical Tableaus

Part 1. The Review of Linear Programming

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

MS-E2140. Lecture 1. (course book chapters )

Lecture 11 Linear programming : The Revised Simplex Method

Farkas Lemma, Dual Simplex and Sensitivity Analysis

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

Math Models of OR: Some Definitions

Systems Analysis in Construction

Linear Programming Duality P&S Chapter 3 Last Revised Nov 1, 2004

Optimisation and Operations Research

1. Introduce slack variables for each inequaility to make them equations and rewrite the objective function in the form ax by cz... + P = 0.

Optimisation and Operations Research

LINEAR PROGRAMMING 2. In many business and policy making situations the following type of problem is encountered:

OPTIMISATION /09 EXAM PREPARATION GUIDELINES

MS-E2140. Lecture 1. (course book chapters )

AM 121: Intro to Optimization Models and Methods

AM 121: Intro to Optimization

Understanding the Simplex algorithm. Standard Optimization Problems.

9.1 Linear Programs in canonical form

Optimisation and Operations Research

OPTIMISATION 2007/8 EXAM PREPARATION GUIDELINES

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

ORF 522. Linear Programming and Convex Analysis

Sensitivity Analysis and Duality in LP

3. Duality: What is duality? Why does it matter? Sensitivity through duality.

CPS 616 ITERATIVE IMPROVEMENTS 10-1

OPTIMISATION 3: NOTES ON THE SIMPLEX ALGORITHM

The Simplex Algorithm

Notes on Simplex Algorithm

Lesson 27 Linear Programming; The Simplex Method

February 17, Simplex Method Continued

CO350 Linear Programming Chapter 6: The Simplex Method

Today: Linear Programming (con t.)

TIM 206 Lecture 3: The Simplex Method

Linear Programming. Linear Programming I. Lecture 1. Linear Programming. Linear Programming

Part III: A Simplex pivot

CS711008Z Algorithm Design and Analysis

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

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

Initial feasible origin: 1. Set values of original variables to zero. 2. Set values of slack variables according to the dictionary.

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

IE 400: Principles of Engineering Management. Simplex Method Continued

Non-Standard Constraints. Setting up Phase 1 Phase 2

MATH2070 Optimisation

Lecture slides by Kevin Wayne

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

February 22, Introduction to the Simplex Algorithm

In Chapters 3 and 4 we introduced linear programming

F 1 F 2 Daily Requirement Cost N N N

4.3 Minimizing & Mixed Constraints

Slide 1 Math 1520, Lecture 10

Part 1. The Review of Linear Programming Introduction

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

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

c) Place the Coefficients from all Equations into a Simplex Tableau, labeled above with variables indicating their respective columns

Math Models of OR: Sensitivity Analysis

CSC Design and Analysis of Algorithms. LP Shader Electronics Example

Math 210 Finite Mathematics Chapter 4.2 Linear Programming Problems Minimization - The Dual Problem

Linear Programming, Lecture 4

Lecture 10: Linear programming. duality. and. The dual of the LP in standard form. maximize w = b T y (D) subject to A T y c, minimize z = c T x (P)

Part 1. The Review of Linear Programming

The dual simplex method with bounds

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

MATH 445/545 Test 1 Spring 2016

Note 3: LP Duality. If the primal problem (P) in the canonical form is min Z = n (1) then the dual problem (D) in the canonical form is max W = m (2)

IE 5531: Engineering Optimization I

CO350 Linear Programming Chapter 5: Basic Solutions

Motivating examples Introduction to algorithms Simplex algorithm. On a particular example General algorithm. Duality An application to game theory

Linear Programming Redux

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

Chapter 1 Linear Programming. Paragraph 5 Duality

4.4 The Simplex Method and the Standard Minimization Problem

Notes taken by Graham Taylor. January 22, 2005

Math 354 Summer 2004 Solutions to review problems for Midterm #1

Lecture 1 Introduction

Summary of the simplex method

Linear Programming Duality

1 Review Session. 1.1 Lecture 2

CS261: A Second Course in Algorithms Lecture #8: Linear Programming Duality (Part 1)

OPERATIONS RESEARCH. Linear Programming Problem

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

GETTING STARTED INITIALIZATION

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

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

1. Algebraic and geometric treatments Consider an LP problem in the standard form. x 0. Solutions to the system of linear equations

The Simplex Method for Solving a Linear Program Prof. Stephen Graves

Contents. 4.5 The(Primal)SimplexMethod NumericalExamplesoftheSimplexMethod

Variants of Simplex Method

The Avis-Kalunzy Algorithm is designed to find a basic feasible solution (BFS) of a given set of constraints. Its input: A R m n and b R m such that

Sensitivity Analysis

Lecture 10: Linear programming duality and sensitivity 0-0

AM 121: Intro to Optimization Models and Methods Fall 2018

Discrete Optimization

MVE165/MMG631 Linear and integer optimization with applications Lecture 5 Linear programming duality and sensitivity analysis

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

Transcription:

Optimisation and Operations Research Lecture 5: The Simplex Algorithm Matthew Roughan <matthew.roughan@adelaide.edu.au> http://www.maths.adelaide.edu.au/matthew.roughan/ Lecture_notes/OORII/ School of Mathematical Sciences, University of Adelaide July 12, 2017

Section 1 Simplex overview July 12, 2017 2 / 21

A little history Leonid Vitaliyevich Kantorovich; (19 January 1912 7 April 1986) was a Soviet mathematician and economist, known for his theory and development of techniques for the optimal allocation of resources. He was the winner of the Nobel Prize in Economics in 1975 and the only winner of this prize from the USSR. George Bernard Dantzig: (November 8, 1914 May 13, 2005) was an American mathematical scientist who made important contributions to operations research, computer science, economics, and statistics. He is particularly well known for his development of the simplex algorithm and his work with linear programming, some years after it was pioneered by the Soviet mathematician and economist Leonid Kantorovich. July 12, 2017 3 / 21

Problem Recap We will start with a problem in standard equality form. { argmax z = c T } x + z 0 Ax = b, x 0 x or in longer form, find x that solves max z = c T x + z 0 such that Ax = b and x 0 July 12, 2017 4 / 21

Intuition Remember that often this has been converted from inequality form: so the vector x could include slack variables from inequalities. Intuitively, we want to search the vertices (efficiently) of the original feasible region for the optimal vertex. Vertices (of the original inequality problem) are feasible basic solutions to the equality We will organise our search so as to force the constraints towards being true, and then staying true Search always improves the objective July 12, 2017 5 / 21

Our First Problem max z = 13x 1 + 12x 2 + 17x 3 subject to 2x 1 + x 2 + 2x 3 225 x 1 + x 2 + x 3 117 3x 1 + 3x 2 + 4x 3 420 x i 0 July 12, 2017 6 / 21

Simplex Overview 1 Form the Simplex Tableau its convenient to put all the information in one large matrix 2 Phase I look for a starting point either we get a feasible starting point we show the problem is infeasible 3 Phase II find the optimal point or show that the problem is unbounded July 12, 2017 7 / 21

Teaching Order We teach this in the order 1 Tableau 2 Phase II 3 Phase I because sometimes Simplex Phase I isn t needed phase I can be written in terms of Phase II July 12, 2017 8 / 21

Section 2 The Simplex Tableau July 12, 2017 9 / 21

The Simplex Tableau The Simplex Tableau M for argmax x { z = c T x + z 0 Ax = b, x 0 } is constructed by z col. b col. M = A 0 b c T 1 z 0 z row Assuming there are m constraints, and n variables, the Tableau M has size (m + 1) (n + 2). Note the z column never changes, so we don t need to actually have this, but its useful to understand the algorithm. July 12, 2017 10 / 21

The Simplex Tableau Example Example The LP from our first problem in standard equality form max z = 13x 1 + 12x 2 + 17x 3 + 0 subject to 2x 1 + x 2 + 2x 3 + 1x 4 = 225 x 1 + x 2 + x 3 + 1x 5 = 117 3x 1 + 3x 2 + 4x 3 + 1x 6 = 420 x i 0 i can be written in Tableau form (with z 0 = 0) as x 1 x 2 x 3 x 4 x 5 x 6 z b 2 1 2 1 0 0 0 225 1 1 1 0 1 0 0 117 3 3 4 0 0 1 0 420 13 12 17 0 0 0 1 0 July 12, 2017 11 / 21

Why use the Simplex Tableau? The Simplex Tableau isn t really a necessary part of the algorithm e.g., sometimes people put the various bits in different parts of the Tableaux it doesn t matter So why do it? The Simplex Tableau puts all the data in one place useful back in the days of crappy memory management Does it in a way that means we can use a single operation pivot does the bulk of the work makes the code simpler Its useful for teaching we can understand what the algorithm is doing in a very simple way July 12, 2017 12 / 21

The Simplex Tableau and solutions Imagine the Simplex Tableau M = A 0 b c T 1 z 0 can be (re)written in the form M = Q I b Then we can read off the solution immediately: set the free variables x i = 0 for i = 1,..., n then just read off the basic variables x n+i = b i for i = 1,..., m We want to generalise and exploit this idea July 12, 2017 13 / 21

The Simplex Tableau and Solutions Example Solution: x 1 x 2 x 3 x 4 x 5 x 6 z b 2 1 2 1 0 0 0 225 1 1 1 0 1 0 0 117 3 3 4 0 0 1 0 420 13 12 17 0 0 0 1 0 x = ( 0, 0, 0, 225, 117, 420 ) and z = 0 We want to generalise and exploit this idea: we are looking for unit columns, i.e., columns with m entries zero and the remaining element is 1. we need a complete set of these unit columns July 12, 2017 14 / 21

Basic columns If x j is a basic variable, then the jth column M(:, j) will be a unit column, which we call a basic column A solution should have m basic variables, so we need m basic columns, plus 1 (the z column). The basic columns need to have their 1 s in different rows, or we don t really have independent basic variables. Let s construct a vector of the indexes of the basic variables: l B = [l 1, l 2,..., l m ] then we want to get M in the form such that when we take the columns corresponding to these variables, we get an identity matrix: [M l1 M l2... M lm M z ] = I m+1 where I m+1 is the (m + 1) (m + 1) identity matrix. July 12, 2017 15 / 21

Canonical form Definition (Canonical form) The tableau M is said to be in canonical form if there is a complete set of (m + 1) unit columns: [M l1 M l2... M lm M z ] = I m+1 and l B = [l 1, l 2,..., l m ] is the canonical form of the list of basic variables. Example Note that the basic variables don t have to be in order M = x 1 x 2 x 3 x 4 x 5 z b 0 1 0 6 1 0 2 2 3 1 1 0 0 5 0 1 0 0 0 1 4 is in canonical form, with l B = [5, 3] July 12, 2017 16 / 21

Canonical form Example M = x 1 x 2 x 3 z b 1 2 0 0 2 0 3 0 0 3 0 0 1 0 4 0 4 0 1 4 is not in canonical form, because there is no unit column with 1 in the second row. July 12, 2017 17 / 21

Feasible Canonical form Definition (Feasible Canonical form) A tableau M in canonical form is said to be in feasible canonical form iff its solution is feasible. We can detect a feasible canonical form by noting that the solution where we read of the x i values as above will have x i values that are either 0 or b j. These automatically satisfy Ax = b, but must also satisfy x 0, so a canonical form is feasible iff the b column is non-negative! 1 A feasible canonical form corresponds to a vertex of the original inequality feasible region. 1 Ignoring the z 0 element July 12, 2017 18 / 21

Getting to feasible canonical form Simplex Phase II starts with a matrix in feasible canonical form how do we get there? { If we start with the problem max x z = c T x + z 0 A x b, x 0 }, with b 0, then conversion to standard equality form will introduce slack variables that create the required identity matrix. Example x 1 x 2 x 3 s 4 s 5 s 6 z b 2 1 2 1 0 0 0 225 1 1 1 0 1 0 0 117 3 3 4 0 0 1 0 420 13 12 17 0 0 0 1 0 this canonical form corresponds to a starting point x = 0 (with positive slack variables), i.e., the origin Otherwise we use Simplex Phase I to get into feasible canonical form before we perform Phase II. July 12, 2017 19 / 21

Takeaways The Tableau M encapsulates all of the information we need to keep track of we need to know how to construct it The form we aim for or want to keep is feasible canonical form complete set of unit columns b column is non-negative In this form we can read off a basic feasible solution July 12, 2017 20 / 21

Further reading I July 12, 2017 21 / 21