Linear Programming. Our market gardener example had the form: min x. subject to: where: [ acres cabbages acres tomatoes T

Similar documents
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

UNIT-4 Chapter6 Linear Programming

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

Systems Analysis in Construction

MATH 445/545 Test 1 Spring 2016

(includes both Phases I & II)

OPERATIONS RESEARCH. Linear Programming Problem

(includes both Phases I & II)

Lecture 11 Linear programming : The Revised Simplex Method

IN this paper we study a discrete optimization problem. Constrained Shortest Link-Disjoint Paths Selection: A Network Programming Based Approach

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

A = Chapter 6. Linear Programming: The Simplex Method. + 21x 3 x x 2. C = 16x 1. + x x x 1. + x 3. 16,x 2.

MATH2070 Optimisation

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

Polynomial Degree and Finite Differences

AM 121: Intro to Optimization Models and Methods

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

Integer Programming. The focus of this chapter is on solution techniques for integer programming models.

Chap6 Duality Theory and Sensitivity Analysis

GETTING STARTED INITIALIZATION

Tibor ILLèS. Katalin MèSZêROS

2. Linear Programming Problem

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

Exam 2 Review Math1324. Solve the system of two equations in two variables. 1) 8x + 7y = 36 3x - 4y = -13 A) (1, 5) B) (0, 5) C) No solution D) (1, 4)

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

MATH 225: Foundations of Higher Matheamatics. Dr. Morton. 3.4: Proof by Cases

...(iii), x 2 Example 7: Geetha Perfume Company produces both perfumes and body spray from two flower extracts F 1. The following data is provided:

F 1 F 2 Daily Requirement Cost N N N

Linear & Integer programming

Lecture 2: The Simplex method

Review Solutions, Exam 2, Operations Research

1 Simplex and Matrices

AM 121: Intro to Optimization

CPS 616 ITERATIVE IMPROVEMENTS 10-1

Week_4: simplex method II

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

OPRE 6201 : 3. Special Cases

DM545 Linear and Integer Programming. Lecture 7 Revised Simplex Method. Marco Chiarandini

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

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

The Role of the Graphing Calculator in the Qualitative Analysis of Function

Chapter 4 The Simplex Algorithm Part II

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

Special cases of linear programming

Graphs and polynomials

Farkas Lemma, Dual Simplex and Sensitivity Analysis

Online Supplementary Appendix B

UNIT 4 TRANSPORTATION PROBLEM

Revised Simplex Method

Section 2.1: Reduce Rational Expressions

SAMPLE QUESTION PAPER MATHEMATICS (041) CLASS XII

OR: Exercices Linear Programming

Luis Manuel Santana Gallego 100 Investigation and simulation of the clock skew in modern integrated circuits. Clock Skew Model

Chapter 1: Linear Programming

6.2: The Simplex Method: Maximization (with problem constraints of the form )

The Simplex Method of Linear Programming

Lecture 5. x 1,x 2,x 3 0 (1)

School of Business. Blank Page

Linear Programming. (Com S 477/577 Notes) Yan-Bin Jia. Nov 28, 2017

(b) For the change in c 1, use the row corresponding to x 1. The new Row 0 is therefore: 5 + 6

Higher. Polynomials and Quadratics. Polynomials and Quadratics 1

Worked Examples for Chapter 5

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

Math Models of OR: Sensitivity Analysis

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

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

56:270 Final Exam - May

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

CSC Design and Analysis of Algorithms. LP Shader Electronics Example

Graphs and polynomials

Summary of the simplex method

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

M340(921) Solutions Problem Set 6 (c) 2013, Philip D Loewen. g = 35y y y 3.

Introduction. Very efficient solution procedure: simplex method.

The Transportation Problem

Vardhaman Mahaveer Open University, Kota

0.1 O. R. Katta G. Murty, IOE 510 Lecture slides Introductory Lecture. is any organization, large or small.

MATH 4211/6211 Optimization Linear Programming

Linear programming on Cell/BE

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

4. Duality and Sensitivity

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

Water Resources Systems: Modeling Techniques and Analysis

SELECT TWO PROBLEMS (OF A POSSIBLE FOUR) FROM PART ONE, AND FOUR PROBLEMS (OF A POSSIBLE FIVE) FROM PART TWO. PART ONE: TOTAL GRAND

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

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)

Synthetic asymptote formula for surface-printed resistor

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

The Big M Method. Modify the LP

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

Chapter 5 Linear Programming (LP)

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

In Chapters 3 and 4 we introduced linear programming

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

OPERATIONS RESEARCH. Michał Kulej. Business Information Systems

1. (7pts) Find the points of intersection, if any, of the following planes. 3x + 9y + 6z = 3 2x 6y 4z = 2 x + 3y + 2z = 1

Math Models of OR: Handling Upper Bounds in Simplex

Linear Programming, Lecture 4

Summary of the simplex method

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

Transcription:

Our market gardener eample had the form: min - 900 1500 [ ] suject to: Ñ Ò Ó 1.5 2 â 20 60 á ã Ñ Ò Ó 3 â 60 á ã where: [ acres caages acres tomatoes T ]. We need a more systematic approach to solving these prolems, particularly when there are many variales and constraints. SIMPLEX method (Dantzig). always move to a verte which improves the value of the ojective function. Fraser Fores, 1997 LP Simple 1

SIMPLEX Algorithm 1) Convert prolem to standard form with: positive right-hand sides, lower ounds of zero. 2) Introduce slack / surplus variales: change all inequality constraints to equality constraints. 3) Define an initial feasile asis: choose a starting set of variale values which satisfy all of the constraints. 4) Determine a new asis which improves ojective function: select a new verte with a etter value of P(). 5) Transform the equations: perform row reduction on the equation set. 6) Repeat Steps 4 & 5 until no more improvement in the ojective function is possile. Fraser Fores, 1997 LP Simple 2

Market Gardener Revisited The prolem was written: ma c,t 900 c + 1500 t suject to: trucking 1.5 c + 2 t 3 20 c + 60 t 60 fertilizer 1) in standard form, the prolem is: min - 900 1500 [ ] suject to: Ñ Ò Ó 1.5 2 â 20 60 á ã Ò Ñ Ó 0 3 â 60 á ã where [ c t T ]. Fraser Fores, 1997 LP Simple 3

Market Gardener Revisited 2) Introduce slack variales ( or convert all inequality constraints to equality constraints): min c,t - 900 c - 1500 t suject to: trucking 1.5 c + 2 t + s = 3 20 c + 60 t + s = 60 1 2 c, t, s, s 0 1 2 fertilizer or in matri form: min - 900 1500 0 0 [ ] suject to: 1.5 2 1 0 3 á Ñ = â Ò â 20 60 0 1 60 Ñ Ò Ó ã Ó 0 á ã where c t s s 1 2 [ ]. T Fraser Fores, 1997 LP Simple 4

Market Gardener Revisited 3) Define an initial asis and set up taleau: choose the slacks as the initial asic variales, this is equivalent to starting at the origin. the initial taleau is: c t s 1 asis variales s 1 1.5 2 2.0 6 3.0 6-900 -1500 ojective function coefficients ojective function value Fraser Fores, 1997 LP Simple 5

Market Gardener Revisited 4) Determine the new asis: eamine the ojective function coefficients and choose a variale with a negative weight. (you want to decrease the ojective function ecause you are minimizing. Usually we will choose the most negative weight, ut this is not necessary). this variale will e rought into the asis. divide each element of y the corresponding constraint coefficient of the new asic variale. the variale which will e removed from the asis is in the pivot row (given y the smallest positive ratio of i /a ij ). new non-asic variale new asic variale c t s 1 s 1 1.5 2 2.0 6 3.0 6 1 /a 12 = 3/2 2 /a 22 = 1-900 -1500 pivot most negative coefficient, ring "t" into the asis Fraser Fores, 1997 LP Simple 6

Market Gardener Revisited 5) Transform the constraint equations: perform row reduction on the constraint equations to make the pivot element 1 and all other elements of the pivot column 0. c t s 1 s 1 t 5/6 1/3-1/30 1/60-400 25.0 1500 i) new row #2 = row #2 / 60 ii) new row #1 = row #1-2*new row #2 iii) new row #3 = row #3 + 1500* new row #2 Fraser Fores, 1997 LP Simple 7

Market Gardener Revisited 6) Repeat Steps 4 & 5 until no more improvement is possile: pivot s 1 t c t s 1 5/6 1/3-1/30 1/60-400 25.0 1500 the new taleau is: c t s 1 c t 6/5-1/3-1/25 3/100 6/5 3/5 480 9.0 1980 no further improvements are possile, since there are no more negative coefficients in the ottom row of the taleau. Fraser Fores, 1997 LP Simple 8

Market Gardener Revisited The final taleau is: optimal acres of caages & tomatoes c t s 1 c t 6/5-1/3-1/25 3/100 6/5 3/5 480 9.0 1980 optimal asis contains oth caages and tomatoes. maimum profit shadow prices Fraser Fores, 1997 LP Simple 9

Market Gardener Revisited Recall that we could graph the market garden prolem: 3 fertilizer increasing profit c (acres) 2 * profit contours 1 feasile region trucking start 1 2 t (acres) We can track how the SIMPLEX algorithm moved through the feasile region. The SIMPLEX algorithm started at the origin. Then moved along the tomato ais (this was equivalent to introducing tomatoes into the asis) to the fertilizer constraint. The algorithm then moved up the fertilizer constraint until it found the intersection with the trucking constraint, which is the optimal solution. Fraser Fores, 1997 LP Simple 10

Another SIMPLEX Eample: We have een commissioned y one of Ontario s most famous wineries to schedule their production. The winery makes three types of wine: sweet, regular and dry. The profit per litre, required raw materials and laour for each of these types of wine is: wine type Grade A grapes (u) Grade B grapes (u) sugar (kg) laour (hr) profit sweet regular dry 0.10 0.20 0 0.10 0 0.20 0.2 0.1 0 0.4 0.6 0.2 $1.40 $0 $1.60 The winery has availale 80 kilograms of sugar, 225 hours of laour, 150 ushels each of grade A and grade B grapes per day. What product mi of wines will maimize the companies daily profit. 1) What is the physical interpretation of each slack variale? 2) What can we do to increase daily profit for the winery? 3) What will it cost us to deviate from the optimum mi? Fraser Fores, 1997 LP Simple 11

Some Other Considerations 1) Negative lower ounds on variales: SIMPLEX method requires all variales to have non-negative lower ounds (i.e. 0). prolems can have variales for which negative values are physically meaningful (e.g. intermediate cross-flows etween parallel process units). introduce artificial variales. If we have ounds on the variale 1 such that: -a 1 Then we introduce two new artificial variales (e.g. 5, 6 ) where: and we can require: 1 = 5-6 5 0, 6 0 while satisfying the ounds on 1. Fraser Fores, 1997 LP Simple 12

Some Other Considerations 2) Mied constraints: until this point we have always een ale to formulate our constraints sets using only constraints (with positive right-hand sides). how can we handle constraint sets that also include constraints (with positive right-hand sides). introduce surplus variales. Suppose we have the constraint: [a i1... a in ] The we can introduce a surplus variale s i to form an equality constraint y setting: a i1 1 +... + a in n - s i = i We have a prolem if we start with an initial feasile asis such that = 0 (i.e. starting at the origin). Then: s i = - i which violates the non-negativity constraint on all variales (including slack / surplus variales). i We need a way of finding a feasile starting point for these situations. Fraser Fores, 1997 LP Simple 13

Some Other Considerations 3) Origin not in the feasile region: increasing profit profit contours 1 feasile region 2 The SIMPLEX algorithm requires a feasile starting point. We have een starting at the origin, ut In this case the origin is not in the feasile region. There are several different approaches: Big M method (Murty, 1983). Fraser Fores, 1997 LP Simple 14

Big M Method Consider the minimization prolem with mied constraints: min + 2 suject to: 1 2 3 + 4 5 1 2 + 2 = 3 1 3 + 4 1 2 1) As well as the usual slack / surplus variales, introduce a separate artificial variale a i into each equality and constraint: 3 + 4 - s + a = 5 1 2 1 1 + 2 + a = 3 1 3 2 + + s = 4 1 2 2 2) Augment the ojective function y penalizing non-zero values of the artificial variales: T P( ) = c + Ma Í m i= 1 i Fraser Fores, 1997 LP Simple 15

Big M Method Choose a large value for M ( say 10 times the magnitude of the largest coefficient in the ojective function). For the eample minimization prolem: P( ) = 1 + 2 2 + 20a 1 + 20 a2 3) Set up the taleau as usual. The initial asis will include all of the artificial variales and the required slack variales: 1 2 3 s 1 a 1 a 2 a 1 a 2 3.0 4.0 2.0-5.0 3.0 4.0 2.0 2 2 0 Fraser Fores, 1997 LP Simple 16

Big M Method Phase 1 modify the ojective row in the taleau to reduce the coefficients of the artificial variales to zero: a 1 a 2 1 2 3 s 1 a 1 a 2 3.0 4.0 2.0-5.0 3.0 4.0-59 -78 2 2-100 a 1 a 2 1 2 3 s 1 a 1 a 2 3.0 4.0 2.0-5.0 3.0 4.0-79 -78-40 20-160 Fraser Fores, 1997 LP Simple 17

Big M Method 4) Phase 2, Solve the prolem as efore starting from the final taleau from Phase 1. 1 2 3 s 1 a 1 a 2 a 1 a 2 3.0 4.0 2.0-5.0 3.0 4.0-79 -78-40 20-160 1 2 3 s 1 a 1 a 2 1 a 2 4/3-4/3-1/3 2.0-1/3 1/3 1/3 1/3-1/3-1/3 5/3 4/3 7/4 82/3-40 -19/3 79/3-85/3 Fraser Fores, 1997 LP Simple 18

the final taleau is: 1 2 3 s 1 a 1 a 2 1 3 4/3-2/3-1/3-1/3 1/6 1/3 1/3-1/6-1/3 1/2 5/3 2/3 7/3 2/3 1/3 59/3 20-5/3 The optimal solution is: 1 = 5/3, 2 = 0, 3 = 2/3, P() = 5/3 What would e the effect of: 1) introducing 2 into the asis? 2) introducing s 1 into the asis? 3) introducing a 1 or a 2 into the asis? Fraser Fores, 1997 LP Simple 19

SIMPLEX Method Summary 1) Write the prolem in standard form, 2) Introduce slack, surplus and artificial variales as required, 3) Choose a starting point (usually = 0), 4) Determine a new asis which improves the value of the ojective function, 5) Transform the equation set, 6) Repeat steps 4 & 5 until no further improvement is possile. Fraser Fores, 1997 LP Simple 20

SIMPLEX Algorithm (Matri Form) To develop the matri form for the Linear Programming prolem: T min c suject to: A 0 we introduce the slack variales and partition, A and c as follows: asic B = N non-asic [ M ] A = B N c = c B c N Then, the Linear Programming prolem ecomes: min T c suject to: T + c B B N N B + N = B N, 0 B N Fraser Fores, 1997 LP Simple 21

SIMPLEX Algorithm (Matri Form) Feasile values of the asic variales ( B ) can e defined in terms of the values for non-asic variales ( N ): [ N ] -1 = B - N B The value of the ojective function is given y: [ ] P( ) = c T BB -1 - N N + c T N N or: [ ] P( ) = c T BB -1 + c T N - c T BB -1 N N Then, the taleau we used to solve these prolems can e represented as: B T N T B I B -1 N B -1 0 T T -1 [ c c B N ] - N - T -1 B c B B Fraser Fores, 1997 LP Simple 22

SIMPLEX Algorithm (Matri Form) The Simple Algorithm is: 1) form the B and N matrices. Calculate B -1. 2) calculate the shadow prices (reduced costs) of the nonasic variales ( N ): T T -1 [ c N c B B N ] - - 3) calculate B -1 N and B -1. 4) find the pivot element y performing the ratio test using the column corresponding to the most negative shadow price. 5) the pivot column corresponds to the new asic variale and the pivot row corresponds to the new non-asic variale. Modify the B and N matrices accordingly. Calculate B -1. 6) repeat step through 5 until there are no negative shadow prices remaining. Fraser Fores, 1997 LP Simple 23

SIMPLEX Algorithm (Matri Form) This method is computationally inefficient ecause you must calculate a complete inverse of the matri B at each iteration of the SIMPLEX algorithm. There are several variations on the Revised SIMPLEX algorithm which attempt to minimize the computations and memory requirements of the method. Eamples of these can e found in: Chvatal Edgar & Himmellau (references in 7.7) Fletcher Gill, Murray and Wright Fraser Fores, 1997 LP Simple 24