Studi Kasus PL dgn Simpleks Pertemuan 4: Mata kuliah:K0164-Pemrograman Matematika Tahun: 2008.

Slides:



Advertisements
Similar presentations
February 14, 2002 Putting Linear Programs into standard form
Advertisements

The simplex algorithm The simplex algorithm is the classical method for solving linear programs. Its running time is not polynomial in the worst case.
In a previous lecture, this dictionary resulted after the first phase 1 pivot: X0 = X1 - 1 X2 + 1 X3 X4 = X1 + 3 X2 + 1 X
Linear Programming (LP) (Chap.29)
Operation Research Chapter 3 Simplex Method.
Introduction to Algorithms
Solusi Model Transportasi dengan Program Komputer Pertemuan 13 : Mata kuliah : K0164/ Pemrograman Matematika Tahun: 2008.
UMass Lowell Computer Science Analysis of Algorithms Prof. Karen Daniels Fall, 2002 Lecture 8 Tuesday, 11/19/02 Linear Programming.
Dr. Sana’a Wafa Al-Sayegh
1 Introduction to Linear Programming. 2 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. X1X2X3X4X1X2X3X4.
Copyright (c) 2003 Brooks/Cole, a division of Thomson Learning, Inc
The Simplex Method: Standard Maximization Problems
1 Linear Programming Jose Rolim University of Geneva.
UMass Lowell Computer Science Analysis of Algorithms Prof. Karen Daniels Fall, 2006 Lecture 9 Wednesday, 11/15/06 Linear Programming.
ISM 206 Lecture 4 Duality and Sensitivity Analysis.
Model PL Primal dan Dual Pertemuan 7 : (Off Class) Mata kuliah:K0164-Pemrograman Matematika Tahun:
Design and Analysis of Algorithms
Penyelesaian PL Dengan Karmarkar Pertemuan 9 :
Solving Linear Programs: The Simplex Method
Chapter 10: Iterative Improvement
Computational Methods for Management and Economics Carla Gomes
Linear Programming (LP)
ISM 206 Lecture 4 Duality and Sensitivity Analysis.
MIT and James Orlin © Chapter 3. The simplex algorithm Putting Linear Programs into standard form Introduction to Simplex Algorithm.
Linear Programming - Standard Form
The Two-Phase Simplex Method LI Xiao-lei. Preview When a basic feasible solution is not readily available, the two-phase simplex method may be used as.
Simplex Algorithm.Big M Method
Duality Theory LI Xiaolei.
ECE 556 Linear Programming Ting-Yuan Wang Electrical and Computer Engineering University of Wisconsin-Madison March
1 1 Slide © 2000 South-Western College Publishing/ITP Slides Prepared by JOHN LOUCKS.
Kerimcan OzcanMNGT 379 Operations Research1 Linear Programming: The Simplex Method Chapter 5.
1 1 © 2003 Thomson  /South-Western Slide Slides Prepared by JOHN S. LOUCKS St. Edward’s University.
The Simplex Method Updated 15 February Main Steps of the Simplex Method 1.Put the problem in Row-Zero Form. 2.Construct the Simplex tableau. 3.Obtain.
1 1 © 2003 Thomson  /South-Western Slide Slides Prepared by JOHN S. LOUCKS St. Edward’s University.
Public Policy Modeling Simplex Method Tuesday, October 13, 2015 Hun Myoung Park, Ph.D. Public Management & Policy Analysis Program Graduate School of International.
Duality Theory  Every LP problem (called the ‘Primal’) has associated with another problem called the ‘Dual’.  The ‘Dual’ problem is an LP defined directly.
Simplex Method Adapting to Other Forms.  Until now, we have dealt with the standard form of the Simplex method  What if the model has a non-standard.
Linear Programming Revised Simplex Method, Duality of LP problems and Sensitivity analysis D Nagesh Kumar, IISc Optimization Methods: M3L5.
1 1 Slide © 2005 Thomson/South-Western Linear Programming: The Simplex Method n An Overview of the Simplex Method n Standard Form n Tableau Form n Setting.
Chapter 4 Linear Programming: The Simplex Method
Gomory Cuts Updated 25 March Example ILP Example taken from “Operations Research: An Introduction” by Hamdy A. Taha (8 th Edition)“Operations Research:
1 THE REVISED SIMPLEX METHOD CONTENTS Linear Program in the Matrix Notation Basic Feasible Solution in Matrix Notation Revised Simplex Method in Matrix.
OR Chapter 8. General LP Problems Converting other forms to general LP problem : min c’x  - max (-c)’x   = by adding a nonnegative slack variable.
Simplex Method for solving LP problems with two variables.
OR Chapter 7. The Revised Simplex Method  Recall Theorem 3.1, same basis  same dictionary Entire dictionary can be constructed as long as we.
An-Najah N. University Faculty of Engineering and Information Technology Department of Management Information systems Operations Research and Applications.
1 Introduction to Linear Programming. 2 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. X1X2X3X4X1X2X3X4.
Simplex Method Simplex: a linear-programming algorithm that can solve problems having more than two decision variables. The simplex technique involves.
CSC 445/545 is done at 4:30 so I did NOT fill in the box for 4:30 for our class. Please put your name here. Please put your as well. 1.
Linear Programming: Formulations, Geometry and Simplex Method Yi Zhang January 21 th, 2010.
Copyright © 2006 Brooks/Cole, a division of Thomson Learning, Inc. Linear Programming: An Algebraic Approach 4 The Simplex Method with Standard Maximization.
Simplex Method Review. Canonical Form A is m x n Theorem 7.5: If an LP has an optimal solution, then at least one such solution exists at a basic feasible.
Decision Support Systems INF421 & IS Simplex: a linear-programming algorithm that can solve problems having more than two decision variables.
The Simplex Method. and Maximize Subject to From a geometric viewpoint : CPF solutions (Corner-Point Feasible) : Corner-point infeasible solutions 0.
EMGT 6412/MATH 6665 Mathematical Programming Spring 2016
Solving Linear Program by Simplex Method The Concept
Chap 10. Sensitivity Analysis
The minimum cost flow problem
Perturbation method, lexicographic method
The Two-Phase Simplex Method
The Simplex Method: Standard Minimization Problems
Chapter 5. Sensitivity Analysis
Outline Simplex algorithm The initial basic feasible solution
Solving Linear Programming Problems: Asst. Prof. Dr. Nergiz Kasımbeyli
Well, just how many basic
Chapter 5. The Duality Theorem
DUALITY THEORY Reference: Chapter 6 in Bazaraa, Jarvis and Sherali.
Chapter 10: Iterative Improvement
Practical Issues Finding an initial feasible solution Cycling
Presentation transcript:

Studi Kasus PL dgn Simpleks Pertemuan 4: Mata kuliah:K0164-Pemrograman Matematika Tahun: 2008

Learning Outcomes Mahasiswa dapat menghitung solusi masalah/kasus model PL dengan menggunakan metode Simpleks..

Outline Materi: Pemecahan studi kasus PL dengan metode Simpleks. Studi kasus Maksimisasi Studi kasus Minimisasi. Pembahasan..

Standard form: Maximize 5x 1 + 4x 2 + 3x 3 Subject to 2x 1 + 3x 2 + x 3  5 4x 1 + x 2 + 2x 3  11 3x 1 + 4x 2 + 2x 3  8 x 1, x 2, x 3  0.

Slack form: we add “slack” variables Maximize 5x 1 + 4x 2 + 3x 3 Subject to 2x 1 + 3x 2 + x 3 + x 4 = 5 4x 1 + x 2 + 2x 3 + x 5 = 11 3x 1 + 4x 2 + 2x 3 + x 6 = 8 x 1, x 2, x 3, x 4, x 5, x 6  0. In slack form all constraints are of equality except the non-negativity constraints.

Basic and nonbasic variables. Basic solution. The basic variables are the ones on the left (in red). The nonbasic variables are the rest. The basic solution is produced by setting all nonbasic variables to 0: x 1 =x 2 =x 3 =0. we get x 4 =5, x 5 =11, x 6 =8, z=0. z = 5x 1 + 4x 2 + 3x 3 x 4 = 5 - 2x 1 - 3x 2 - x 3 x 5 = x 1 - x 2 - 2x 3 x 6 = 8 - 3x 1 - 4x 2 - 2x 3

The idea: Choose a nonbasic variable such that increasing it will increase the basic solution. Increase it until one of the basic variables becomes 0. This step is called "pivot".

1 st Iteration We want to increase the value of z from its current value of 0. Clearly, increasing the value of x 1 will increase the value of z. By how much can we increase it? z = 5x 1 + 4x 2 + 3x 3 x 4 = 5 - 2x 1 - 3x 2 - x 3 x 5 = x 1 - x 2 - 2x 3 x 6 = 8 - 3x 1 - 4x 2 - 2x 3 x 4  0  5 – 2x 1  0  5  2x 1  x 1  5/2 x 5  0  11 – 4x 1  0  11  4x 1  x 1  11/4 x 6  0  8 – 3x 1  0  8  3x 1  x 1  8/3

1 st Iteration We want to increase the value of z from its current value of 0. Clearly, increasing the value of x 1 will increase the value of z. By how much can we increase it? z = 5x 1 + 4x 2 + 3x 3 x 4 = 5 - 2x 1 - 3x 2 - x 3 x 5 = x 1 - x 2 - 2x 3 x 6 = 8 - 3x 1 - 4x 2 - 2x 3 x 4  0  5 – 2x 1  0  5  2x 1  x 1  5/2 x 5  0  11 – 4x 1  0  11  4x 1  x 1  11/4 x 6  0  8 – 3x 1  0  8  3x 1  x 1  8/3 “entering variable”  “leaving variable” 

X1’s row: x 4 = 5 - 2x 1 - 3x 2 - x 3  x 1 = (5 - 3x 2 - x 3 - x 4 )/2 = x 1 = 5/2 - 3/2x 2 - 1/2x 3 - 1/2x 4 The other rows (substitute X1): x 5 = x 1 - x 2 - 2x 3 x 5 = 11- 4(5/2 - 3/2x 2 - 1/2x 3 - 1/2x 4 ) - x 2 - 2x 3 x 5 = 1 + 5x 2 +2x 4 x 6 = ….

2 nd Iteration Now we see that increasing the value of x 3 will improve the value of z. z = 25/2 - 7/2x 2 + 1/2x 3 - 1/2x 4 x 1 = 5/2 - 3/2x 2 - 1/2x 3 - 1/2x 4 x 5 = 1 + 5x 2 + 2x 4 x 6 = 1/2 + 1/2x 2 - 1/2x 3 + 3/2x 4 x 1  0  5/2 – 1/2x 3  0  5/2  1/2x 3  x 3  5 x 5  0  x 3 unbounded x 6  0  1/2 – 1/2x 3  0  1/2  1/2x 3  x 1  1

z = x 2 - x 4 - x 6 x 1 = 2 - 2x 2 - 2x 4 + x 6 x 5 = 1 + 5x 2 + 2x 4 x 3 = 1 + x 2 + 3x 4 - 2x 6 Optimal!!! The solution: x 1 = 2, x 2 = 0, x 3 = 1 x 4 = 0, x 5 = 1, x 6 = 0. z = 13.

The algorithm: Assume we have a procedure “Init-Simplex” that takes a LP in standard form and returns a LP in slack form with basic feasible solution, or a message “infeasable”. Notation: n Maximize  c i x i i=1 Subject to n  a ij x j  b i, 1  i  m j=1 x j  0, 1  j  n

Maximize- x 0 Subject to n  a ij x j – x 0  b i, 1  i  m j=1 x j  0, 0  j  n let Laux be the following program n Maximize  c i x i i=1 Subject to n  a ij x j  b i, 1  i  m j=1 x j  0, 1  j  n Note: 1.The objective function does not affect the feasibility of the program. 2.If x 1, …, x n is a feasable solution to L then x 0 =0, x 1, …, x n is a feasable solution to Laux, and it’s optimal since we have x 0  If x 0 =0, x 1, …, x n is the optimal solution to Laux then x 1, …, x n is a feasable solution to L.

Maximize- x 0 Subject to n  a ij x j – x 0  b i, 1  i  m j=1 x j  0, 0  j  n Maximize- x 0 Subject to n x n+i = b i –  a ij x j + x 0, 1  i  m j=1 x j  0, 0  j  n+m Denote by b l the minimal b i for 1  i  m. By choosing x 0 as the entering variable and x l as the leaving variable we get a basic feasable solution: We get: n x n+l = b l –  a ij x j + x 0 j=1 n x 0 = -b l +  a ij x j + x n+l, 1  i  m j=1 Now for each other row x i we get after subtituting x 0 that b i ‘= b i + x 0  0 because b l was minimal Transformed to slack form:

1.The original program: Maximize 2x 1 - x 2 Subject to 2x 1 - x 2  2 x 1 - 5x 2  -4 x 1, x 2  0. Finding the initial feasable solution: an example 2.The auxiliary program: Maximize - x 0 Subject to 2x 1 - x 2 - x 0  2 x 1 - 5x 2 - x 0  -4 x 1, x 2, x 0  0.

3.In slack form (basic solution not feasable!): z = - x 0 x 3 = 2 - 2x 1 + x 2 + x 0 x 4 = -4 - x 1 + 5x 2 + x 0 4.Pivoting. Minimal ( x 4 ) is leaving, x 0 is entering: x 4 = -4 - x 1 + 5x 2 + x 0  x 0 = 4 + x 1 - 5x 2 + x 4 x 3 = 2 - 2x 1 + x 2 + x 0 x 3 = 2 - 2x 1 + x x 1 - 5x 2 + x 4 = 4 + …..

3.In slack form (basic solution not feasible!): z = - x 0 x 3 = 2 - 2x 1 + x 2 + x 0 x 4 = -4 - x 1 + 5x 2 + x 0 4.Pivoting. Minimal ( x 4 ) is leaving, x 0 is entering: x 4 = -4 - x 1 + 5x 2 + x 0  x 0 = 4 + x 1 - 5x 2 + x 4 x 3 = 2 - 2x 1 + x 2 + x 0 x 3 = 2 - 2x 1 + x x 1 - 5x 2 + x 4 = 4 + ….. Now that we have slack form with the basic solution feasible we can call Simplex!

The primal problem (1): n Maximize  c j x j j=1 Subject to n  a ij x j  b i, 1  i  m j=1 x j  0, 1  j  n The dual problem (2): m Minimize  b j y j j=1 Subject to m  a ij y j  c i, 1  j  n i=1 y j  0, 1  i  m Maximize 5x 1 + 4x 2 + 3x 3 Subject to 2x 1 + 3x 2 + x 3  6 4x 1 + x 2 + 2x 3  11 x 1, x 2, x 3  0. Minimize 6y y 2 Subject to 2y 1 + 4y 2  5 3y 1 + y 2  4 y 1 + 2y 2  3 y 1, y 2  0.