Sebastian Bitzer Seminar Constraint Logic Programming University of Osnabrueck November 11 th 2002 The Simplex Algorithm.

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.
Linear Programming Problem. Introduction Linear Programming was developed by George B Dantzing in 1947 for solving military logistic operations.
Linear Programming. Introduction: Linear Programming deals with the optimization (max. or min.) of a function of variables, known as ‘objective function’,
Linear Programming (LP) (Chap.29)
Operation Research Chapter 3 Simplex Method.
1 Constraint operations: Simplification, Optimization and Implication.
Introduction to Algorithms
Dr. Sana’a Wafa Al-Sayegh
Copyright (c) 2003 Brooks/Cole, a division of Thomson Learning, Inc
Linear Inequalities and Linear Programming Chapter 5 Dr.Hayk Melikyan/ Department of Mathematics and CS/ Linear Programming in two dimensions:
Computational Methods for Management and Economics Carla Gomes Module 8b The transportation simplex method.
Chapter 6 Linear Programming: The Simplex Method Section 3 The Dual Problem: Minimization with Problem Constraints of the Form ≥
Chapter 6 Linear Programming: The Simplex Method
Linear Inequalities and Linear Programming Chapter 5
The Simplex Method: Standard Maximization Problems
Operation Research Chapter 3 Simplex Method.
Design and Analysis of Algorithms
Chapter 10: Iterative Improvement
Finite Mathematics & Its Applications, 10/e by Goldstein/Schneider/SiegelCopyright © 2010 Pearson Education, Inc. 1 of 99 Chapter 4 The Simplex Method.
Optimization Linear Programming and Simplex Method
Linear Programming (LP)
Chapter 4 The Simplex Method
MIT and James Orlin © Chapter 3. The simplex algorithm Putting Linear Programs into standard form Introduction to Simplex Algorithm.
LINEAR PROGRAMMING SIMPLEX METHOD.
Chapter 19 Linear Programming McGraw-Hill/Irwin
Algebra 2 Chapter 3 Notes Systems of Linear Equalities and Inequalities Algebra 2 Chapter 3 Notes Systems of Linear Equalities and Inequalities.
Algebra 2 Chapter 3 Notes Systems of Linear Equalities and Inequalities Algebra 2 Chapter 3 Notes Systems of Linear Equalities and Inequalities.
1 Chapter 8 Linear programming is used to allocate resources, plan production, schedule workers, plan investment portfolios and formulate marketing (and.
Chapter 6 Linear Programming: The Simplex Method
Simplex method (algebraic interpretation)
ECE 556 Linear Programming Ting-Yuan Wang Electrical and Computer Engineering University of Wisconsin-Madison March
Chapter 3. Pitfalls Initialization Ambiguity in an iteration
Topic III The Simplex Method Setting up the Method Tabular Form Chapter(s): 4.
Barnett/Ziegler/Byleen Finite Mathematics 11e1 Learning Objectives for Section 6.4 The student will be able to set up and solve linear programming problems.
Linear Programming McGraw-Hill/Irwin Copyright © 2012 by The McGraw-Hill Companies, Inc. All rights reserved.
1. 2 Computing the Adjoint matrix: 3 Assignment #3 is available. Due: Monday Nov. 5, beginning of class.
Chapter 6 Linear Programming: The Simplex Method Section 3 The Dual Problem: Minimization with Problem Constraints of the Form ≥
Mechanical Engineering Department 1 سورة النحل (78)
Simplex Method Continued …
Chapter 4 Linear Programming: The Simplex Method
Chapter 6 Linear Programming: The Simplex Method Section 4 Maximization and Minimization with Problem Constraints.
Barnett/Ziegler/Byleen Finite Mathematics 11e1 Learning Objectives for Section 6.3 The student will be able to formulate the dual problem. The student.
1 Simplex Method (created by George Dantzig in late 1940s) A systematic way of searching for an optimal LP solution BMGT 434, Spring 2002 Instructor: Chien-Yu.
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.
MIT and James Orlin © Chapter 3. The simplex algorithm Putting Linear Programs into standard form Introduction to Simplex Algorithm file Simplex2_AMII_05a_gr.
An-Najah N. University Faculty of Engineering and Information Technology Department of Management Information systems Operations Research and Applications.
Simplex Method Simplex: a linear-programming algorithm that can solve problems having more than two decision variables. The simplex technique involves.
Copyright © 2006 Brooks/Cole, a division of Thomson Learning, Inc. Linear Programming: An Algebraic Approach 4 The Simplex Method with Standard Maximization.
Linear Programming 虞台文.
1 Simplex algorithm. 2 The Aim of Linear Programming A Linear Programming model seeks to maximize or minimize a linear function, subject to a set of linear.
The Simplex Method. and Maximize Subject to From a geometric viewpoint : CPF solutions (Corner-Point Feasible) : Corner-point infeasible solutions 0.
Introduction to Linear Programming Romil Jain. The Nutrition Problem Each fruit contains different nutrients Each fruit has different cost An apple a.
MIT and James Orlin © The Geometry of Linear Programs –the geometry of LPs illustrated on GTC.
Chapter 2: Simplification, Optimization and Implication
Discrete Optimization
Linear Programming for Solving the DSS Problems
Linear Programming Many problems take the form of maximizing or minimizing an objective, given limited resources and competing constraints. specify the.
Optimization Problems
Chapter 2: Simplification, Optimization and Implication
Perturbation method, lexicographic method
Linear programming Simplex method.
Linear Programming.
Chapter 4 Linear Programming: The Simplex Method
Outline Simplex algorithm The initial basic feasible solution
Well, just how many basic
Linear programming Simplex method.
Chapter 10: Iterative Improvement
Practical Issues Finding an initial feasible solution Cycling
Presentation transcript:

Sebastian Bitzer Seminar Constraint Logic Programming University of Osnabrueck November 11 th 2002 The Simplex Algorithm An approach to optimization problems for linear real arithmetic constraints

11 November, 2002The Simplex Algorithm2 Content Optimization – what is that? The Simplex Algorithm – background Simplex form Basic feasible solved form / basic feasible solution The algorithm Initial basic feasible solved form

11 November, 2002The Simplex Algorithm3 Content Optimization – what is that? The Simplex Algorithm – background Simplex form Basic feasible solved form / basic feasible solution The algorithm Initial basic feasible solved form

11 November, 2002The Simplex Algorithm4 Optimization – what is that? In general Optimization problem (C,f) with constraint C and objective function f e.g.

11 November, 2002The Simplex Algorithm5 Optimization – what is that? Objective function f: –expression over variables V in constraint C –evaluates to a real number –e.g.

11 November, 2002The Simplex Algorithm6 Optimization – what is that? a valuation θ (substituting variables by values): solution of objective function using θ:

11 November, 2002The Simplex Algorithm7 Optimization – what is that? preferred valuations: –valuation θ is preferred to valuation θ', if f(θ) < f(θ') optimal solution: –θ is optimal, if f(θ) < f(θ') for all solutions θ'  θ (there is no solution that is preferred to θ)

11 November, 2002The Simplex Algorithm8 Optimization – what is that? Do all problems have an optimal solution?

Optimization Example An optimization problem Find the closest point to the origin satisfying the C. Some solutions and f value Optimal solution

11 November, 2002The Simplex Algorithm10 Content Optimization – what is that? The Simplex Algorithm – background Simplex form Basic feasible solved form / basic feasible solution The algorithm Initial basic feasible solved form

11 November, 2002The Simplex Algorithm11 Background George Dantzig born , Portland invented "Simplex Method of Optimisation" in 1947 this grew out of his work with the USAF

11 November, 2002The Simplex Algorithm12 Background originates from planning tasks: –plans or schedules for training –logistical supply –deployment of men has in practice usually polynomial cost

11 November, 2002The Simplex Algorithm13 Quotes Eugene Lawler (1980): [Linear programming] is used to allocate resources, plan production, schedule workers, plan investment portfolios and formulate marketing (and military) strategies. The versatility and economic impact of linear programming in today's industrial world is truly awesome.

11 November, 2002The Simplex Algorithm14 Quotes Dantzig I: The tremendous power of the simplex method is a constant surprise to me. Dantzig II:... it is interesting to note that the original problem that started my research is still outstanding - namely the problem of planning or scheduling dynamically over time, particularly planning dynamically under uncertainty. If such a problem could be successfully solved it could eventually through better planning contribute to the well- being and stability of the world.

11 November, 2002The Simplex Algorithm15 Content Optimization – what is that? The Simplex Algorithm – background Simplex form Basic feasible solved form / basic feasible solution The algorithm Initial basic feasible solved form

The example An optimization problem showing contours of the objective function

11 November, 2002The Simplex Algorithm17 (C,f) is in simplex form, if C has the form C E is a conjunction of linear arithmetic equations C I is a term that constrains all variables in C to be  0 Simplex form

11 November, 2002The Simplex Algorithm18 Simplex form allowed conversions to get simplex form: –X not constrained to be non-negative: –inequality e  r (e=expression and r=number)

The example An optimization problem showing contours of the objective function An equivalent simplex form is:

11 November, 2002The Simplex Algorithm20 Content Optimization – what is that? The Simplex Algorithm – background Simplex form Basic feasible solved form / basic feasible solution The algorithm Initial basic feasible solved form

11 November, 2002The Simplex Algorithm21 Basic feasible solved form feasible = practicable, able to be carried out (durchführbar, anwendbar) a simplex form optimization problem is in basic feasible solved form, if all equations in C E (of the simplex form) have the form:

11 November, 2002The Simplex Algorithm22 Basic feasible solved form X 0 is called basic variable, does not occur anywhere else (neither in objective function) X 1...n are parameters b, a 1...n are constants b  0

11 November, 2002The Simplex Algorithm23 Basic feasible solution corresponding basic feasible solution to a basic feasible solved form: –setting each X 1...n = 0

The example An optimization problem showing contours of the objective function An equivalent simplex form is: Basic feasible solved form:

11 November, 2002The Simplex Algorithm25 Content Optimization – what is that? The Simplex Algorithm – background Simplex form Basic feasible solved form / basic feasible solution The algorithm Initial basic feasible solved form

11 November, 2002The Simplex Algorithm26 The algorithm idea: optimal solution has to be in one of the vertices so: go from one vertex to the preferred next vertex end: if there is no preferred vertex, the actual has to be the optimal solution

11 November, 2002The Simplex Algorithm27 The algorithm in other words: –take a basic feasible solved form –look for an "adjacent" basic feasible solved form whose basic feasible solution decreases the value of the objective function –if there is no such adjacent basic feasible solved form, then the optimum has been found

11 November, 2002The Simplex Algorithm28 The algorithm adjacent  just one single pivot pivoting  move one variable out of basic variables (  exit variable) and another in (  entry variable)

11 November, 2002The Simplex Algorithm29 Entering Variable: – choose one Y J with d J <0  pivoting on this Y J can only decrease f (see next slide) – no such Y J  optimum has been found The algorithm Problem : Which variables should be exiting resp. entering?

11 November, 2002The Simplex Algorithm30 Why pivoting on a Y j with d j <0 decreases objective function f looking at the basic feasible solution (bfs) every parametric variable (Y j ) is set to 0 pivoting on such a variable (var. becomes basic) leads to an increase of this variable in the bfs: Y j ≥0  a Y j with negative d j decreases f

11 November, 2002The Simplex Algorithm31 The algorithm Exiting variable: –we have to maintain basic feasible solved form  all b i 's have to be  0  choose a X i so that –b I /a IJ is a minimum of: –M={Ø}  optimization problem unbounded

Simplex Example Choose variable Y, the first eqn is only one with neg. coeff Choose variable Z, the 2nd eqn is only one with neg. coeff No variable can be chosen, optimal value 2 is found

11 November, 2002The Simplex Algorithm33 The algorithm starting from a problem in bfs form repeat Choose a variable y with negative coefficient in the obj. func. Find the equation x = b + cy +... where c<0 and -b/c is minimal Rewrite this equation with y the subject y = -b/c + 1/c x +... Substitute -b/c + 1/c x +... for y in all other eqns and obj. func. until no such variable y exists or no such equation exists if no such y exists optimum is found else there is no optimal solution

The example Basic feasible solution form: circle Choose S3, replace using 2nd eq Optimal solution: box

11 November, 2002The Simplex Algorithm35 Content Optimization – what is that? The Simplex Algorithm – background Simplex form Basic feasible solved form / basic feasible solution The algorithm Initial basic feasible solved form

11 November, 2002The Simplex Algorithm36 Initial basic feasible solved form idea: –solve a different optimization problem this optimization problem should have an initial basic feasible solved form, which: –can be found trivially –has an optimal solution that leads to an initial basic feasible solved form of the original problem

11 November, 2002The Simplex Algorithm37 Initial basic feasible solved form add artificial variables and minimize on them:

11 November, 2002The Simplex Algorithm38 Initial basic feasible solved form to get basic feasible solved form:  solve this problem

11 November, 2002The Simplex Algorithm39 Initial basic feasible solved form possible outcomes: –(f > 0)  original problem unsatisfiable –(f = 0)  (z i...n parametric)  got a basic feasible solved form for original problem –(f = 0)   (z i...n parametric)  z i must occur in such an equation:

11 November, 2002The Simplex Algorithm40 Such an equation is no problem, because if all a’ j = 0 → equation is redundant if one a’ j ≠ 0 → use according x j for pivoting z out of basic variables (this maintains basic feasible solved form since z = 0 +…)  all z become parametric

The example An optimization problem showing contours of the objective function An equivalent simplex form is:

The example With artificial vars in bfs form: Objective function: minimize Original simplex form equations

The example Problem after minimization of objective function Removing the artificial variables, the original problem

11 November, 2002The Simplex Algorithm44 Simplex solver finding a basic feasible solution is exactly a constraint satisfaction problem  efficient constraint solver for linear inequalities

11 November, 2002The Simplex Algorithm45 Cycling Problem: –if for one of the basic variables is valid: X i = 0 + …, a pivot could be performed which does not change the corresponding basic feasible solution  danger of pivoting back Solution: –use e.g. Bland’s anti-cycling rule (always select candidate with smallest index: x 2 instead of x 4 )

11 November, 2002The Simplex Algorithm46 Summary We have seen that optimisations of linear real arithmetic constraints play an important role in many applications. The Simplex Method which was introduced here provides a very efficient algorithm to determine whether there exists an optimal solution to linear real arithmetic constraints and if there exists one, to compute it.

11 November, 2002The Simplex Algorithm47 Literature books: George B. Dantzig, Mukund N. Thapa "Linear Programming I: Introduction" Springer Verlag Kim Marriott & Peter J. Stuckey "Programming with Constraints: An Introduction" MIT Press

11 November, 2002The Simplex Algorithm48 Literature examples are taken from a presentation of Marriott & Stuckey and could be accessed via internet: this presentation in the net: