Introduction. Very efficient solution procedure: simplex method.

Similar documents
LINEAR PROGRAMMING. Introduction

Chap6 Duality Theory and Sensitivity Analysis

Worked Examples for Chapter 5

Linear programming I João Carlos Lourenço

The use of shadow price is an example of sensitivity analysis. Duality theory can be applied to do other kind of sensitivity analysis:

Introduction to Operations Research

Simplex Method for LP (II)

Introduction to Operations Research. Linear Programming

ISE 330 Introduction to Operations Research: Deterministic Models. What is Linear Programming? www-scf.usc.edu/~ise330/2007. August 29, 2007 Lecture 2

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

TIM 206 Lecture 3: The Simplex Method

Linear Programming. H. R. Alvarez A., Ph. D. 1

Sensitivity Analysis and Duality in LP

Review Solutions, Exam 2, Operations Research

Farkas Lemma, Dual Simplex and Sensitivity Analysis

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

Summary of the simplex method

Part 1. The Review of Linear Programming

END3033 Operations Research I Sensitivity Analysis & Duality. to accompany Operations Research: Applications and Algorithms Fatih Cavdur

Gauss-Jordan Elimination for Solving Linear Equations Example: 1. Solve the following equations: (3)

"SYMMETRIC" PRIMAL-DUAL PAIR

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

MATH2070 Optimisation

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

is called an integer programming (IP) problem. model is called a mixed integer programming (MIP)

The Graphical Method & Algebraic Technique for Solving LP s. Métodos Cuantitativos M. En C. Eduardo Bustos Farías 1

Brief summary of linear programming and duality: Consider the linear program in standard form. (P ) min z = cx. x 0. (D) max yb. z = c B x B + c N x N

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

2. Linear Programming Problem

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

F 1 F 2 Daily Requirement Cost N N N

NONLINEAR. (Hillier & Lieberman Introduction to Operations Research, 8 th edition)

Special cases of linear programming

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

4. Duality and Sensitivity

IE 400: Principles of Engineering Management. Simplex Method Continued

Introduction to the Simplex Algorithm Active Learning Module 3

THE UNIVERSITY OF HONG KONG DEPARTMENT OF MATHEMATICS. Operations Research I

Chapter 4 The Simplex Algorithm Part I

+ 5x 2. = x x. + x 2. Transform the original system into a system x 2 = x x 1. = x 1

Linear Programming: Chapter 5 Duality

OPRE 6201 : 3. Special Cases

Systems Analysis in Construction

Linear Programming in Matrix Form

In Chapters 3 and 4 we introduced linear programming

A Review of Linear Programming

Dr. S. Bourazza Math-473 Jazan University Department of Mathematics

Optimisation. 3/10/2010 Tibor Illés Optimisation

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)

Duality Theory, Optimality Conditions

MATH 445/545 Test 1 Spring 2016

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

Ω R n is called the constraint set or feasible set. x 1

Sensitivity Analysis and Duality

Formulating and Solving a Linear Programming Model for Product- Mix Linear Problems with n Products

MAT016: Optimization

II. Analysis of Linear Programming Solutions

SEN301 OPERATIONS RESEARCH I LECTURE NOTES

Answer the following questions: Q1: Choose the correct answer ( 20 Points ):

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

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

OPERATIONS RESEARCH. Michał Kulej. Business Information Systems

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

AM 121: Intro to Optimization Models and Methods

Math Models of OR: Sensitivity Analysis

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

Week 3: Simplex Method I

Lecture 4: Algebra, Geometry, and Complexity of the Simplex Method. Reading: Sections 2.6.4, 3.5,


Graphical and Computer Methods

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

9.5 THE SIMPLEX METHOD: MIXED CONSTRAINTS

56:171 Operations Research Fall 1998

The Simplex Method of Linear Programming

1 Simplex and Matrices

3. THE SIMPLEX ALGORITHM

1 Review Session. 1.1 Lecture 2

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

SAMPLE QUESTIONS. b = (30, 20, 40, 10, 50) T, c = (650, 1000, 1350, 1600, 1900) T.

OPTIMISATION 3: NOTES ON THE SIMPLEX ALGORITHM

The simplex algorithm

Summary of the simplex method

Linear Programming, Lecture 4

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

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 5 Linear Programming (LP)

Sensitivity Analysis

Lesson 27 Linear Programming; The Simplex Method

LP Definition and Introduction to Graphical Solution Active Learning Module 2

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.

Overview of course. Introduction to Optimization, DIKU Monday 12 November David Pisinger

The Strong Duality Theorem 1

56:270 Final Exam - May

OPERATIONS RESEARCH. Linear Programming Problem

The Dual Simplex Algorithm

February 17, Simplex Method Continued

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

Understanding the Simplex algorithm. Standard Optimization Problems.

4.6 Linear Programming duality

9.1 Linear Programs in canonical form

Transcription:

LINEAR PROGRAMMING

Introduction Development of linear programming was among the most important scientific advances of mid 20th cent. Most common type of applications: allocate limited resources to competing activities in an optimal way. Linear programming uses a mathematical model. Linear because it requires linear functions. Programming as synonymous of planning. Very efficient solution procedure: simplex method. João Miguel da Costa Sousa / Alexandra Moutinho 31

Prototype example Wyndor Glass Co. produces glass products, including windows and glass doors. Plant t 1 produces aluminum frames, Plant 2 produces wood frames and Plant 3 produces glass and assembles. Two new products: Glass door with aluminum framing (Plant 1 and 3). New wood framed glass window (Plant 2 and 3). As the products compete for Plant 3, the most profitable mix of the two products is needed. João Miguel da Costa Sousa / Alexandra Moutinho 32

Formulation of the LP problem x 1 = number of batches of doors produced per week x 2 = number of batches of windows produced per week Z = total profit per week (in thousands) Wyndor Glass Co. Product Mix Problem Doors Windows Profit Per Batch $3.000 $5.000 (Batches of 20) Hours available Hours Used Per Batch Produced per week Plant 1 1 0 4 Plant 2 0 2 12 Plant 3 3 2 18 maximize Z= 3x1+ 5x2 subject to: x1 4 2x2 12 3 x1 + 2 x2 18 and x 0, x 0. 1 2 João Miguel da Costa Sousa / Alexandra Moutinho 33

Graphical solution Z= 3x + 5x 1 2 3 1 x2 = x1 + Z ( y= mx+ b) 5 5 Slope of the line is 3/5 Trial and error: Z = 10, 20, 36 Feasible region: satisfies all constraints maximize Z= 3x + 5x subject to: 1 2 x 4 2x 12 2 3x + 2x 18 1 and x 0, x 0. 1 2 2 1 João Miguel da Costa Sousa / Alexandra Moutinho 34

Excel Solution Wyndor Glass Co. Product Mix Problem Doors Windows Range Name Cells Profit Per Batch $3.000 $5.000 BatchesProduced C12:D12 Hours Hours HoursAvailable G7:G9 Hours Used Per Batch Produced Used Available HoursUsed E7:E9 Plant 1 1 0 2 <= 4 HoursUsedPerBatchProduced C7:D9 Plant 2 0 2 12 <= 12 ProfitPerBatch C4:D4 Plant 3 3 2 18 <= 18 TotalProfit G12 Doors Windows Total Profit Batches Produced 2 6 $36.000 João Miguel da Costa Sousa / Alexandra Moutinho 35

Matlab solution All solvers are designed to minimize the objective function in the optimization toolbox. To maximize f(x), minimize f(x) f(x). solution João Miguel da Costa Sousa / Alexandra Moutinho 36

Generalizing the example Prototype t example General problem Production capacities of plants Resources 3 plants m resources Production of products Activities 2 products n activities Production rate of product j, x j Level of activity j, x j Profit Z Overall measure of performance Z The most common type of application of LP involves allocating resources to activities. João Miguel da Costa Sousa / Alexandra Moutinho 37

Linear programming gmodel Z = value of overall performance measure. x j = level lof activity j, for j = 1, 2,, n. c j = parameters of Z related to x j. j b j = amount of resource i that is available for allocation of activities, for i = 1, 2,, m. a ij = amount of resource i consumed by each unity of activity j. j Decision variables Parameters João Miguel da Costa Sousa / Alexandra Moutinho 38

Standard form of the model Sl Select the values for x 1, x 2,, x n to maximize: Z= c 1x 1+ c 2x 2+ + c nx n subject to: a x + a x + + a x b 11 1 12 2 1n n 1 a x + a x + + a x b 21 1 22 2 2n n 2 a x + a x + + a x b m1 1 m2 2 mn n m and x1 0, x2 0,, x n 0. João Miguel da Costa Sousa / Alexandra Moutinho 39

Allocation of resources to activities Resource Resource Usage per Unit of Activity Activity 1 2 n Amount of Resource available 1 a 11 a 12 a 1n b 1 2 a 21 a 22 a 2n b 2 m a m1 a m2 a mn b m Contribution to Z per unit of activity it c 1 c 2 c n João Miguel da Costa Sousa / Alexandra Moutinho 40

Terminology for solutions Solution: any specification of values for the decision variables (x 1, x 2,, x n ). Feasible solution: solution for which all the constraints are satisfied. Infeasible solution: solution for which at least one constraint t is violated. oated Feasible region: collection of all feasible solutions. No feasible solution: no solution satisfies all constraints. João Miguel da Costa Sousa / Alexandra Moutinho 41

Terminology for solutions Optimal solution: feasible solution with the most favorable value of the objective function. Most favorable value: largest value if maximizing or smallest value if minimizing. No optimal solutions: (1) no feasible solutions or, (2) )unbounded Z (see next etsde) slide). More than one solution: see next slide. João Miguel da Costa Sousa / Alexandra Moutinho 42

Examples of solutions More than one solution Unbounded cost function João Miguel da Costa Sousa / Alexandra Moutinho 43

Corner point feasible solution Solution that lies at a corner of feasible region. Best CPF solution must be an optimal solution.. João Miguel da Costa Sousa / Alexandra Moutinho 44

Assumptions of linear programming g Proportionality: the contribution of each activity to the value of the objective function Z and left hand side of each functional constraint is proportional to the level of activity x j. Violations: 1) Setup costs. João Miguel da Costa Sousa / Alexandra Moutinho 45

Violations of proportionality p 2) Increase of marginal return due to economy of scale (longer production runs, quantity discounts, learning curve effect, etc.). João Miguel da Costa Sousa / Alexandra Moutinho 46

Violations of proportionality p 3) Decrease of marginal return due to e.g. marketing costs: to sell more the advertisement grows exponentially. João Miguel da Costa Sousa / Alexandra Moutinho 47

Assumptions of linear programming g Additivity: every function in a linear programming model is the sum of the individual contributions. Divisibility: i ibilit decision i variables ibl can have any values. If values are limited to integer values, the problem needs an integer programming model. Certainty: parameters of the model c j, a ij and b i are assumed to be known constants. t In real applications parameters have always some degree of uncertainty tit and sensitivity analysis must be conducted d (identify sensitive parameters). João Miguel da Costa Sousa / Alexandra Moutinho 48

The assumptions in perspectivep Mathematical model is idealized representation of real problem. Approximations and simplifying assumptions are required for the model to be tractable. A reasonably high h correlation lti between prediction of model and reality is required. It is common in real applications of LP that almost none of the 4 assumptions holds completely. It is important to analyze how large the disparities are, and maybe use alternative models. Alexandra Moutinho 49

Conclusions Linear programming models can be solved using: Spreadsheet as Excel Solver for relatively simple problems Problems with thousands (or even millions!) of decision i variables and/or functional constraints must use modeling languages such as CPLEX/MDL and LINGO/LINDO. Matlab Optimization toolbox (GUI or code). Linear programming solves many problems. However, when one or more assumptions are violated seriously, other programming techniques are needed. João Miguel da Costa Sousa / Alexandra Moutinho 50

SIMPLEX METHOD

Example revisited Wyndor Glass Co. João Miguel da Costa Sousa / Alexandra Moutinho 52

Setting up the simplex method Original form Augmented form Maximize Z= 3x + 5x subject b to 1 2 Maximize Z= 3x + 5x 1 2 x 4 (1) x + x = 4 1 2x 12 2 3x + 2x 18 1 2 and x 0, x 0. 1 2 subject to 1 3 (2) 2x + x = 12 (3) 3x + 2x + x = 18 2 4 1 2 5 and x 0, j = 1,2,3,4,5. Convert functional inequality constraints to equivalent equality constraints using slack variables João Miguel da Costa Sousa / Alexandra Moutinho 53 j

Setting up the simplex method Slack variable is: Zero: solution lies on constraint boundary; Positive: solution lies on feasible side of constraint; Negative: solution lies on infeasible side of constraint Example p problem has 5 variables and 3 nonredundant equations, and so 2 (5 3) degrees of freedom. Two variables have an arbitrary value. Simplex uses the zero value for these nonbasic variables. The solution for the other three variables (basic variables) is a basic solution. Basic solutions have thus a number of properties. João Miguel da Costa Sousa / Alexandra Moutinho 54

Properties of a basic solution Each variable is basic or nonbasic. Number of basic variables is equal to number of functional constraints t (equations). The nonbasic variables are set to zero. Values of basic variables are obtained solving system of equations (functional constraints in augmented form). Set of basic variables are called the basis. If basic variables satisfy the nonnegativity constraints, basic solution is a BF solution. João Miguel da Costa Sousa / Alexandra Moutinho 55

Final form Consider the objective function as the new constraint equation: Maximize subject to Z (0) Z 3x1 5x2 = 0 (1) x 1+ x 3 = 4 (2) 2x2+ x4 = 12 (3) 3 x + 2 x + x = 18 and x 0, j= 1,,5. j 1 2 5 João Miguel da Costa Sousa / Alexandra Moutinho 56

Tabular form (simplex tableau) (a) Algebraic form (b) Tabular Form Basic variable Eq. Coefficient of: Z x 1 x 2 x 3 x 4 x 5 Right side (0) Z 3x 1 5x 2 = 0 Z (0) 1 3 5 0 0 0 0 (1) x 1 + x 3 = 4 x 3 (1) 0 1 0 1 0 0 4 (2) 2x 2 + x 4 = 12 x 4 (2) 0 0 2 0 1 0 12 (3) 3x 1 + 2x 2 + x 5 = 18 x 5 (3) 0 3 2 0 0 1 18 João Miguel da Costa Sousa / Alexandra Moutinho 57

Simplex method in tabular form Initialization. Introduce slack variables. Select decision variables to be initial nonbasic variables (=0) and slack variables to be initial basic variables. Initial solution of example: (0, 0, 4, 12, 18) Optimality test. Current BF solution is optimal iff every coefficient in row (0) is nonnegative. If yes, stop; otherwise, iterate to obtain the next BF solution. Example: p coefficients of x 1 and x 2 are 3 and 5. João Miguel da Costa Sousa / Alexandra Moutinho 58

Simplex method in tabular form Iteration. Step 1: Determine the entering basic variable, which is the nonbasic variable ibl with the largest negative coefficient. pivot column entering basic variable Basic variable Eq. Coefficient of: Z x 1 x 2 x 3 x 4 x 5 Right side Z (0) 1 3 5 0 0 0 0 x 3 () (1) 0 1 0 1 0 0 4 x 4 (2) 0 0 2 0 1 0 12 x 5 (3) 0 3 2 0 0 1 18 João Miguel da Costa Sousa / Alexandra Moutinho 59

Iteration Step 2: Determine the leaving basic variable, by applying minimum ratio test: Basic variable Eq. Coefficient of: Z x 1 x 2 x 3 x 4 x 5 Right side Z (0) 1 3 5 0 0 0 0 x 3 (1) 0 1 0 1 0 0 4 x 4 (2) 0 0 2 0 1 0 12 12/2 = 6 pivot row minimum x 5 (3) 0 3 2 0 0 1 18 18/2 = 9 pivot number (PN) leaving basic variable replace leaving BV for entering BV in the BV column of the next simplex tableau João Miguel da Costa Sousa / Alexandra Moutinho 60

Iteration Step p 3: solve for the new BF solution by using elementary row operations. Iteration Basic variable Eq. Coefficient i of: Z x 1 x 2 x 3 x 4 x 5 Right side Z (0) 1 33 55 0 0 0 0 row with negative coef. 0 x 3 (1) 0 1 0 1 0 0 4 x 4 (2) 0 0 2 0 1 0 12 4 x 5 (3) 0 3 2 0 0 1 18 Z (0) 1 3 0 0 2.5 0 30 row with positive coef. 1 x 3 (1) 0 1 0 1 0 0 4 x 2 (2) 0 0 1 0 0.5 0 6 2 (PN) x 5 (3) 0 3 0 0 1 1 6 João Miguel da Costa Sousa / Alexandra Moutinho 61

Iteration 2: Steps 1 and 2 Optimality test: solution still not optimal one more iteration Iteration Basic variable Eq. Coefficient of: Z x 1 x 2 x 3 x 4 x 5 Right side Ratio Z (0) 1 3 0 0 2.5 0 30 1 x 3 (1) 0 1 0 1 0 0 4 4/1 = 4 x 2 (2) 0 0 1 0 0.5 0 6 x 5 (3) 0 3 0 0 1 1 6 6/3 = 2 minimum João Miguel da Costa Sousa / Alexandra Moutinho 62

Complete set of simplex tableau Iteration Basic variable Eq. Coefficient of: Z x 1 x 2 x 3 x 4 x 5 Right side Z (0) 1 3 5 0 0 0 0 0 x 3 (1) 0 1 0 1 0 0 4 x 4 (2) 0 0 2 0 1 0 12 x 5 (3) 0 3 2 0 0 1 18 Z (0) 1 3 0 0 2.5 0 30 1 x 3 (1) 0 1 0 1 0 0 4 x 2 (2) 0 0 1 0 0.5 0 6 x 5 (3) 0 3 0 0 1 1 6 Z (0) 1 0 0 0 1.5 1 36 2 x 3 (1) 0 0 0 1 1/3 1/3 2 x 2 (2) 0 0 1 0 0.5 0 6 x 1 (3) 0 1 0 0 1/3 1/3 2 João Miguel da Costa Sousa / Alexandra Moutinho 63

Tie breaking in simplex method Tie for entering basic variable: arbitrary choice; Tie for leaving basic variable: arbitrary choice; No leaving basic variable: ibl unbounded Z, i.e., error in model or computation; Multiple optimal solutions: simplex finds one optimal BF solution; find the others by continuing the algorithm choosing a nonbasic variable with a zero coefficient as the entering BV. João Miguel da Costa Sousa / Alexandra Moutinho 64

Adapting to other model forms Equality constraints There is no obvious initial BF solution, so artificial variables and the Big M method are used. Negative g right hand sides: Multiply inequality by 1; Functional constraints in form Surplus and artificial variables / big M method are used. Minimization Maximize Z. João Miguel da Costa Sousa / Alexandra Moutinho 65

Artificial variables and Big M method The real problem Maximize Z= 3x + 5x subject to 1 2 x 1 4 2x 12 2 3 x + 2 x = 18 1 2 and x 0, x 0. 1 2 The artificial problem Define x = 18 3x 2 x. 5 1 2 Maximize Z= 3x + 5 x Mx, subject to 1 2 5 (1) x 4 (2) 2x 12 (3) 3 x + 2 x 18 1 2 1 2 (so 3x + 2x + x = 18) 1 2 5 and x 0, x 0, x 0. 1 2 5 Algebraically eliminate x from equation (0) for proper form. x 5 João Miguel da Costa Sousa / Alexandra Moutinho 66

Postoptimality analysis Reoptimization: when the problem changes slightly, new solution is derived from the final simplex tableau. Shadow price for resource i (denoted y i* ) measures the marginal value of this resource, i.e., how much Z can be increased by (slightly) increasing the amount of this resource b i. Example: p recall b i values of Wyndor Glass problem. The final tableau gives y 1* = 0, y 2* = 1.5, y 3* = 1. João Miguel da Costa Sousa / Alexandra Moutinho 67

Graphical check Increasing b 2 in 1 unit, the new profit is 37.5 João Miguel da Costa Sousa / Alexandra Moutinho 68

Shadow prices Increasing b 2 in 1 unit increases the profit in $1500. Should this be done? Depends on the marginal profitability of other products using that hour time. Shadow prices are part of the sensitivity analysis. Constraint on resource 1 is not binding the optimal solution. There is a surplus of this resource. Resources as this are free goods. Constraints on resources 2 and 3 are binding constraints. They have positive shadow prices and no surplus. Resources are scarce goods. João Miguel da Costa Sousa / Alexandra Moutinho 69

Sensitivity analysis Identify sensitive parameters (those that cannot be changed without changing optimal solution). Parameters b i can be analyzed using shadow prices. Parameters c i for 2 variables can be analyzed graphically. Parameters a ij can also be analyzed graphically. For problems with a large number of variables usually only b i and c i are analyzed, because a ij are determined by the technology being used. João Miguel da Costa Sousa / Alexandra Moutinho 70

Sensitivity analysis of parameters c i Graphical analysis of Wyndor example: c 1 can have values in [0, 7.5] without changing optimal solution. c 2 can have any value greater than 2 without changing goptimal solution. João Miguel da Costa Sousa / Alexandra Moutinho 71

Theory of simplex method Recall the standard form: Maximize Z = c x + c x + + c x subject to 1 1 2 2 a x + a x + + a nxn b a x + a x + + a nxn b a 1 x1 + a 2 x2 + + a x b and x 0, x 0,, x 0. 1 2 11 1 12 2 1 1 21 1 22 2 2 2 m m mn n m n n n João Miguel da Costa Sousa / Alexandra Moutinho 72

Augmented form Maximize subject to Z= c x + + c x + c x + + c x 1 1 n n n+ 1 n+ 1 n n+ m a x + a x + + a x + x = b 11 1 12 2 1n n n+ 1 1 a x + a x + + a x + x = b 21 1 22 2 2n n n+ 2 2 a x + a x + + a x + x = b and x 0, j= 1,2,, n. j m1 1 m2 2 mn n n+ m m João Miguel da Costa Sousa / Alexandra Moutinho 73

Matrix form (standard form) Maximize Z = cx subject to Ax b and x 0 c = [ c1, c2,, c n ], x1 b1 a11 a12 a1 n x = 2 b = 2 a = 21 a22 a2n x, b, A. x n b m a m 1 a m 2 a mn João Miguel da Costa Sousa / Alexandra Moutinho 74

Matrix augmented form Introduce d the column vector of slack variables: ibl x s x n + 1 x n+ 2 = x n + m The constraints are (with I (m m) and 0 (1 (n+m))( ): [, ] x = and x AI b 0 xs xs João Miguel da Costa Sousa / Alexandra Moutinho 75

Solving for a BF solution One iteration of simplex: The n nonbasic variables are set to zero. The m basic variables are in a column vector denoted as x B. The basic matrix B is obtained from [A, I] by eliminating the columns with coefficients of nonbasic variables. The problem becomes: Bx B = b. The solution for basic variables and the value of the objective function for this basic solution are: x B b c x c B b 1 1 B = and Z = B B = B João Miguel da Costa Sousa / Alexandra Moutinho 76

Revised simplex method 1. Initialization (as original): Introduce slack variables x s. Decision variables are initial nonbasic variables. 2. Iteration: Step 1 (as original): Determine entering basic variable (nonbasic variable with the largest negative coefficient). Step 2: Determine leaving basic variable. As original, but computations are simplified. Step 3: Determine new BF solution setting x B = B 1 b. 3. Optimality test: solution is optimal if every coefficient in Z is 0. Computations are simplified. João Miguel da Costa Sousa / Alexandra Moutinho 77

Fundamental insight Initial tableau Row 0: Other rows: Combined: Final tableau Row 0: Other rows: Combined: t= [ c 0 0] T =[ A I b ] t c00 = T A I b t* = t+ y* T= [ y* A c y* y* b], y* = cb B T* S* T [ S* A S* S* b], S* B = = = 1 t* y* A cy* y* b = T* S* A S* S* b 1 João Miguel da Costa Sousa / Alexandra Moutinho 78

Fundamental insight Optimal performance index: Z*=y*b Optimal p solution: x B=S*b, x nb=0 Shadow prices: y* After any iteration, the coefficients of the slack variables in each equation immediately reveal eal how that equation has been obtained from the initial equations. João Miguel da Costa Sousa / Alexandra Moutinho 79

DUALITY THEORY AND SENSITIVITY ANALYSIS

Duality theory Every linear programming problem (primal) has a dual problem. Most problem parameters are estimates, others (as resource amounts) represent managerial decisions. The choice of parameter values is made based on a sensitivity analysis. Interpretation and implementation of sensitivity analysis are key uses of duality theory. João Miguel da Costa Sousa / Alexandra Moutinho 81

Primal and Dual Problems Primal problem (standard form) Maximize subject to n j= 1 Z n = j=1 c x ax b, for i= 1,2,, m ij j i j j Minimize subject to m Dual problem W m = i=1 yb and x 0, 0 for j= 12 1,2,, n. and y 0, for i = 1,2, 12, m. j i= 1 ya c, for j= 1,2,, n i ij j i i i João Miguel da Costa Sousa / Alexandra Moutinho 82

Example: Wyndor Glass Co. Primal problem [ ] x1 Maximize Z = 3 5, x2 subject to 1 0 4 x1 0 2 12 x 3 2 2 18 x1 0 and. x 2 0 Dual problem 4 Minimize Z= y1 y2 y3 12, subject to 18 10 y1 y2 y3 02 35 32 [ ] and y1 y2 y3 [ 000. ] João Miguel da Costa Sousa / Alexandra Moutinho 83

Primal dual table for LP Primal problem Coefficient of: x 1 x 2 x n Right side Coeff ficient of: y 1 a 11 a 12 a 1n b 1 y 2 a 21 a 22 a 2n b 2 y m a m1 a m2 a mn b m Righ side Coef object (M fficients o ive functi inimize) f on Dual pro oblem t c 1 c 2 c n Coefficients of objective function (Maximize) João Miguel da Costa Sousa / Alexandra Moutinho 84

Example: Wyndor Glass Co. x 1 x 2 Right side y 1 1 0 4 y 2 0 2 12 y 3 3 2 18 Right side 3 5 João Miguel da Costa Sousa / Alexandra Moutinho 85

Duality theory General relations between primal and dual problems: 1. The parameters for a (functional) constraint in either problem are the coefficients of a variable in the other problem. 2. The coefficients in the objective function of either problem pobe are aethe right hand dsdes sides for the eother problem. João Miguel da Costa Sousa / Alexandra Moutinho 86

Primal dual relationships Weak duality property: If x is a feasible solution for the primal problem and y is a feasible solution for the dual problem, then cx yb Strong duality property: If x * is an optimal solution for the eprimal pobe problem and dyy * is an optimal solution o for the dual problem, then cx * = y * b João Miguel da Costa Sousa / Alexandra Moutinho 87

Primal dual relationships Complementary solutions property: At each iteration, the simplex method identifies a CPF solution x for the primal problem and a complementary solution y for the dual problem, where cx = yb If x is not optimal for the primal problem, then y is not feasible for the dual problem. João Miguel da Costa Sousa / Alexandra Moutinho 88

Primal dual relationships Complementary optimal solutions property: At the final iteration, the simplex method identifies an optimal solution x* for the primal problem and a complementary optimal solution y* for the dual problem, where cx* = y*b The y i * are the shadow prices for the primal problem. João Miguel da Costa Sousa / Alexandra Moutinho 89

Primal dual relationships Symmetry y yproperty: p For any primal problem and its dual problem, all relationships between them must be symmetric because the dual of this dual problem is this primal problem. Duality theorem: The following are the only possible relationships between the primal and dual problems: 1. If one problem has feasible solutions and a bounded objective function, then so does the other problem, so both the weak and strong duality properties are applicable. João Miguel da Costa Sousa / Alexandra Moutinho 90

Primal dual relationships 2. If one problem has feasible solutions and an unbounded objective function, then the other problem has no feasible solution. 3. If one problem has no feasible solutions, then the other problem has either no feasible solutions lti or an unbounded d objective function. João Miguel da Costa Sousa / Alexandra Moutinho 91

Primal dual relationships Relationships between complementary basic solutions Primal basic solution Complementary Both basic solutions dual basic solution Primal feasible? Dual feasible? Suboptimal Superoptimal Yes No Optimal Optimal Yes Yes Superoptimal Suboptimal No Yes Neither feasible nor superoptimal Neither feasible nor superoptimal No No João Miguel da Costa Sousa / Alexandra Moutinho 92

Primal dual relationships João Miguel da Costa Sousa / Alexandra Moutinho 93

Applications of duality theory If f the number of functional constraints m is bigger than the number of variables n, applying the SM directly to the dual problem will achieve a substantial reduction in computational effort. Evaluating a proposed solution for the primal problem. i) if cx=yb, x and y must be optimal even without applying the SM; ii) if cx<yb, yb provides an upper bound on the optimal value of Z. Economic interpretation João Miguel da Costa Sousa / Alexandra Moutinho 94

Duality theory in sensitivity analysis Sensitivity analysis investigates the effect in the optimal solution of changing parameters a ij, b i, c j. It can be easier to study these effects in the dual problem: Optimal solution of the dual problem are the shadow prices of the primal problem. Changes in coefficients of a nonbasic variable. Only changes one constraint in the dual problem. If this constraint is satisfied the solution is still optimal. Introducing a new variable. Only introduces a new constraint in the dual problem. If the dual problem is still feasible, solution is still optimal. João Miguel da Costa Sousa / Alexandra Moutinho 95

The essence of sensitivity analysis One assumption of LP is that all the parameters of the model (a ij, b i and c j ) are known constants. Actually: The parameters values used are just estimates based on a prediction of future conditions; The data may represent deliberate overestimates or underestimates to protect the interests of the estimators. An optimal solution is optimal only with respect to the specific model being used to represent the real problem sensitivity analysis is crucial! João Miguel da Costa Sousa / Alexandra Moutinho 96

Simplex tableau with parameter changes What h changes in the simplex tableau if changes are made in the model parameters, namely b b, c c, A A? Coefficient of: Eq. Z Original variables Slack variables Right side New initial (0) 1 c 0 0 tableau (1,2,,m) 0 A I b Revised final tableau (0) 1 z* c= y* A c y* (1,2,,m) 0 A* = S* A S* Z* = y* b b* = S* b João Miguel da Costa Sousa / Alexandra Moutinho 97

Applying sensitivity analysis Changes in b i : Allowable range: range of values for which the current optimal BF solution remains feasible (find range of b i such that b* = S* b 0, assuming this is the only change in the model). The shadow price for b i remains valid if b i stays within this interval. The 100% rule for simultaneous changes in RHS: the shadow prices remain valid as long as the changes are not too large. If the sum of the % changes does not exceed 100%, the shadow prices will definitely still be valid. João Miguel da Costa Sousa / Alexandra Moutinho 98

Applying sensitivity analysis Changes in coefficients i of nonbasicvariable: i bl Allowable range to stay optimal: range of values over which the current optimal solution remains optimal (find c j y*a j, assuming this is the only change in the model). The 100% rule for simultaneous s changes in objective e function coefficients: if the sum of the % changes does not exceed 100%, the original optimal solution will definitely still be valid. Introduction of a new variable: Same as above. João Miguel da Costa Sousa / Alexandra Moutinho 99

Other simplex algorithms Dual simplex method Modification useful for sensitivity analysis, based on the duality theory. Parametric linear programming Et Extension for systematic ti sensitivity analysis. Vary one or more parameters continuously over some interval(s) to see when the optimal solution changes. Upper bound technique A simplex version for dealing with decision variables having upper bounds: x j u j, where u j is the maximum feasible value of x j. João Miguel da Costa Sousa / Alexandra Moutinho 100