1 Linear Programming Jose Rolim University of Geneva.

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.
Standard Minimization Problems with the Dual
Linear Programming (LP) (Chap.29)
SIMPLEX METHOD FOR LP LP Model.
Introduction to Algorithms
The Simplex Method The geometric method of solving linear programming problems presented before. The graphical method is useful only for problems involving.
UMass Lowell Computer Science Analysis of Algorithms Prof. Karen Daniels Fall, 2002 Lecture 8 Tuesday, 11/19/02 Linear Programming.
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
Computational Methods for Management and Economics Carla Gomes Module 6a Introduction to Simplex (Textbook – Hillier and Lieberman)
Optimization of thermal processes2007/2008 Optimization of thermal processes Maciej Marek Czestochowa University of Technology Institute of Thermal Machinery.
The Simplex Method: Standard Maximization Problems
Operation Research Chapter 3 Simplex Method.
Linear Programming.
UMass Lowell Computer Science Analysis of Algorithms Prof. Karen Daniels Fall, 2006 Lecture 9 Wednesday, 11/15/06 Linear Programming.
Q 2-31 Min 3A + 4B s.t. 1A + 3B ≧ 6 B = - 1/3A + 2 1A + 1B ≧ 4
Design and Analysis of Algorithms
Fall 2006, Sep. 5 and 7 ELEC / Lecture 4 1 ELEC / (Fall 2006) Low-Power Design of Electronic Circuits (Formerly ELEC / )
UMass Lowell Computer Science Analysis of Algorithms Prof. Karen Daniels Spring, 2003 Review Lecture Tuesday, 5/6/03.
Spring 08, Feb 14 ELEC 7770: Advanced VLSI Design (Agrawal) 1 ELEC 7770 Advanced VLSI Design Spring 2008 Linear Programming – A Mathematical Optimization.
Solving Linear Programs: The Simplex Method
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.
Copyright Agrawal, 2007 ELEC6270 Fall 07, Lecture 8 1 ELEC 5270/6270 Fall 2007 Low-Power Design of Electronic Circuits Linear Programming – A Mathematical.
Chapter 4 The Simplex Method
MIT and James Orlin © Chapter 3. The simplex algorithm Putting Linear Programs into standard form Introduction to Simplex Algorithm.
Spring 07, Mar 13, 15 ELEC 7770: Advanced VLSI Design (Agrawal) 1 ELEC 7770 Advanced VLSI Design Spring 2007 Linear Programming – A Mathematical Optimization.
UMass Lowell Computer Science Analysis of Algorithms Prof. Karen Daniels Fall, 2008 Lecture 9 Tuesday, 11/18/08 Linear Programming.
LINEAR PROGRAMMING SIMPLEX METHOD.
Chapter 3 Linear Programming Methods 高等作業研究 高等作業研究 ( 一 ) Chapter 3 Linear Programming Methods (II)
1 Linear Programming:Duality theory. Duality Theory The theory of duality is a very elegant and important concept within the field of operations research.
Duality Theory 對偶理論.
Simplex method (algebraic interpretation)
Duality Theory LI Xiaolei.
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.
1 1 © 2003 Thomson  /South-Western Slide Slides Prepared by JOHN S. LOUCKS St. Edward’s University.
Chapter 6 Linear Programming: The Simplex Method Section R Review.
Linear Programming McGraw-Hill/Irwin Copyright © 2012 by The McGraw-Hill Companies, Inc. All rights reserved.
Duality Theory  Every LP problem (called the ‘Primal’) has associated with another problem called the ‘Dual’.  The ‘Dual’ problem is an LP defined directly.
Linear Programming Revised Simplex Method, Duality of LP problems and Sensitivity analysis D Nagesh Kumar, IISc Optimization Methods: M3L5.
Chapter 4 Linear Programming: The Simplex Method
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.
OR Chapter 7. The Revised Simplex Method  Recall Theorem 3.1, same basis  same dictionary Entire dictionary can be constructed as long as we.
McGraw-Hill/Irwin Copyright © 2009 by The McGraw-Hill Companies, Inc. All Rights Reserved. Supplement 6 Linear Programming.
1 Introduction to Linear Programming. 2 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. X1X2X3X4X1X2X3X4.
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.
Kerimcan OzcanMNGT 379 Operations Research1 Linear Programming Chapter 2.
LINEAR PROGRAMMING 3.4 Learning goals represent constraints by equations or inequalities, and by systems of equations and/or inequalities, and interpret.
TU/e Algorithms (2IL15) – Lecture 12 1 Linear Programming.
Copyright © 2006 Brooks/Cole, a division of Thomson Learning, Inc. Linear Programming: An Algebraic Approach 4 The Simplex Method with Standard Maximization.
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.
GOOD MORNING CLASS! In Operation Research Class, WE MEET AGAIN WITH A TOPIC OF :
TU/e Algorithms (2IL15) – Lecture 12 1 Linear Programming.
Chapter 4 The Simplex Algorithm and Goal Programming
Introduction to Linear Programming Romil Jain. The Nutrition Problem Each fruit contains different nutrients Each fruit has different cost An apple a.
UMass Lowell Computer Science Analysis of Algorithms Prof. Karen Daniels Spring, 2010 Lecture 9 Tuesday, 4/20/10 Linear Programming 1.
Linear Programming Many problems take the form of maximizing or minimizing an objective, given limited resources and competing constraints. specify the.
Solving Linear Program by Simplex Method The Concept
Chap 10. Sensitivity Analysis
Linear Programming (LP) (Chap.29)
Linear Programming.
Chap 9. General LP problems: Duality and Infeasibility
The Simplex Method: Standard Minimization Problems
Solving Linear Programming Problems: Asst. Prof. Dr. Nergiz Kasımbeyli
The Simplex Method The geometric method of solving linear programming problems presented before. The graphical method is useful only for problems involving.
Simplex method (algebraic interpretation)
Chapter 10: Iterative Improvement
Presentation transcript:

1 Linear Programming Jose Rolim University of Geneva

L.P.Jose Rolim2 What is Linear Programming?  Linear programming (LP) is a mathematical method for selecting the best solution from the available solutions of a problem.  Method: State the problem and define variables whose values will be determined. Develop a linear programming model:  Write the problem as an optimization formula (a linear expression to be minimized or maximized)  Write a set of linear constraints An available LP solver (computer program) gives the values of variables.

L.P.Jose Rolim3 Types of LP  LP – all variables are real.  ILP – all variables are integers.  MILP – some variables are integers, others are real.

L.P.Jose Rolim4 A single variable problem  Consider variable x  Problem: find the maximum value of x subject to constraint, 0 ≤ x ≤ 15.  Solution: x = 15.

L.P.Jose Rolim5 Single Variable Problem (Cont.)  Consider more complex constraints:  Maximize x, subject to following constraints x ≥ 0(1) 5x ≤ 75(2) 6x ≤ 30(3) x ≤ 10(4) x (1) (2) (3) (4) All constraints satisfied Solution, x = 5

L.P.Jose Rolim6 A Two-Variable Problem  Manufacture of x 1 chairs and x 2 tables:  Maximize profit, P = 45x x 2 dollars  Subject to resource constraints: 400 boards of wood,5x x 2 ≤ 400(1) 450 man-hours of labor,10x x 2 ≤ 450(2) x 1 ≥ 0(3) x 2 ≥ 0 (4)

L.P.Jose Rolim7 Solution: Two-Variable Problem Chairs, x 1 Tables, x 2 (1) (2) (24, 14) Profit increasing decresing P = 2200 P = 0 Best solution: 24 chairs, 14 tables Profit = 45× ×14 = 2200 dollars

L.P.Jose Rolim8 Change Chair Profit, $64/Unit  Manufacture of x 1 chairs and x 2 tables:  Maximize profit, P = 64x x 2 dollars  Subject to resource constraints: 400 boards of wood,5x x 2 ≤ 400(1) 450 man-hours of labor,10x x 2 ≤ 450(2) x 1 ≥ 0(3) x 2 ≥ 0 (4)

L.P.Jose Rolim9 Solution: $64 Profit/Chair Chairs, x 1 Tables, x 2 (1) (2) Profit increasing decresing P = 2880 P = 0 Best solution: 45 chairs, 0 tables Profit = 64× ×0 = 2880 dollars (24, 14)

L.P.Jose Rolim10 Motivation: A Political Problem Goal: Win election by winning majority of votes in each region. Subgoal: Win majority of votes in each region while minimizing advertising cost. 100,000 voters 200,000 voters 50,000 voters Thousands of voters who could be won with $1,000 of ads

L.P.Jose Rolim11 Motivation: A Political Problem (continued) Thousands of voters representing majority. urban suburban rural

L.P.Jose Rolim12 General Linear Programs real numbers variables Linear function Linear inequalities Linear constraints

L.P.Jose Rolim13 Overview of Linear Programming Convex feasible region Objective function Objective value

L.P.Jose Rolim14 Standard Form objective function constraints.

L.P.Jose Rolim15 Standard Form (compact) mxn matrix m-dimensional vector n-dimensional vectors Can specify linear program in standard form by (A,b,c).

L.P.Jose Rolim16 Converting to Standard Form

L.P.Jose Rolim17 Converting to Standard Form (continued) Negate coefficients Transforming minimization to maximization

L.P.Jose Rolim18 Converting to Standard Form (continued) If x j has no non-negativity constraint, replace each occurrence of x j with x j ’ – x j ”. Giving each variable a non-negativity constraint New non-negativity constraints

L.P.Jose Rolim19 Converting to Standard Form (continued) Transforming equality constraints to inequality constraints

L.P.Jose Rolim20 Converting to Standard Form (continued). Changing sense of an inequality constraint Rationale:

L.P.Jose Rolim21 Converting Linear Programs into Slack Form for algorithmic ease, transform all constraints except non-negativity ones into equalities for inequality constraint: define slack slack variable instead of s basic variables non-basic variables

L.P.Jose Rolim22 Converting Linear Programs into Slack Form (continued) objective function

L.P.Jose Rolim23 Converting Linear Programs into Slack Form (continued) Compact Form: (N, B, A, b, c, v) set of indices of non-basic variables set of indices of basic variables Slack Form Example Compact Form negative of slack form coefficients

L.P.Jose Rolim24 Shortest Paths. Single-pair shortest path: minimize “distance” from source s to sink t. Can we replace maximize with minimize here? Why or why not?

L.P.Jose Rolim25 Maximum Flow.

L.P.Jose Rolim26 Minimum Cost Flow.

L.P.Jose Rolim27 Multicommodity Flow. should be s i

L.P.Jose Rolim28 Solving a Linear Program  Simplex algorithm  Geometric interpretation Visit vertices on the boundary of the simplex representing the convex feasible region  Transforms set of inequalities using process similar to Gaussian elimination  Run-time not polynomial in worst-case often very fast in practice  Ellipsoid method  Run-time polynomial slow in practice  Interior-Point methods  Run-time polynomial for large inputs, performance can be competitive with simplex method  Moves through interior of feasible region

L.P.Jose Rolim29 Simplex Algorithm: Example Basic Solution Standard Form Slack Form Basic Solution: set each nonbasic variable to 0. Basic Solution:

L.P.Jose Rolim30 Simplex Algorithm: Example Reformulating the LP Model Main Idea: In each iteration, reformulate the LP model so basic solution has larger objective value Select a nonbasic variable whose objective coefficient is positive: x 1 Increase its value as much as possible. Identify tightest constraint on increase. For basic variable x 6 of that constraint, swap role with x 1. Rewrite other equations with x 6 on RHS. PIVOT leaving variable entering variable new objective value

L.P.Jose Rolim31 Simplex Algorithm: Example Reformulating the LP Model Next Iteration: select x 3 as entering variable. PIVOT leaving variable entering variable New Basic Solution: new objective value

L.P.Jose Rolim32 Simplex Algorithm: Example Reformulating the LP Model. Next Iteration: select x 2 as entering variable. PIVOT leaving variable entering variable New Basic Solution: new objective value

L.P.Jose Rolim33 Simplex Algorithm: Pivoting leaving variable entering variable Rewrite the equation that has x l on LHS to have x e on LHS Update remaining equations by substituting RHS of new equation for each occurrence of x e. Do the same for objective function. Update sets of nonbasic, basic variables.

L.P.Jose Rolim34 Simplex Algorithm: Pseudocode source: textbook Cormen et al. to be defined later (detects infeasibility) initial basic solution optimal solution detects unboundedness

L.P.Jose Rolim35 Finding an Initial Solution source: textbook Cormen et al. An LP model whose initial basic solution is not feasible

L.P.Jose Rolim36 Finding an Initial Solution (continued) Auxiliary LP model L aux :

L.P.Jose Rolim37 Finding an Initial Solution (continued).

L.P.Jose Rolim38 Finding an Initial Solution (continued) Original LP model L aux L aux in slack form

L.P.Jose Rolim39 Finding an Initial Solution (continued) PIVOT

L.P.Jose Rolim40 Finding an Initial Solution (continued)

L.P.Jose Rolim41 Linear Programming Duality max becomes min RHS coefficients swap places with objective function coefficients sense changes x variables go away y variables appear

L.P.Jose Rolim42 Duality Example

L.P.Jose Rolim43 Weak Linear Programming Duality Any feasible solution to primal LP has value no greater than that of any feasible solution to the dual LP.

L.P.Jose Rolim44 Weak Linear Programming Duality (continued)

L.P.Jose Rolim45 Finding a Dual Solution Finding a dual solution whose value is equal to that of an optimal primal solution…

L.P.Jose Rolim46 Optimality.