1 / 37

Presentation by H. Sarper

CHAPTER 9: INTEGER PROGRAMMING to accompany Introduction to Mathematical Programming: Operations Research, Volume 1 4th edition, by Wayne L. Winston and Munirpallam Venkataramanan. Presentation by H. Sarper. Integer Programming definition:

sharla
Download Presentation

Presentation by H. Sarper

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CHAPTER 9:INTEGER PROGRAMMINGto accompanyIntroduction to Mathematical Programming: Operations Research, Volume 14th edition, by Wayne L. Winston and Munirpallam Venkataramanan Presentation by H. Sarper

  2. Integer Programming definition: Simply stated, an Integer Programming problem (IP) is a Linear Programming (LP) in which some or all the variables are required to be nonnegative integers. An integer programming problem in which all variables are required to be integer is called a pure integer programming problem. If some variables are restricted to be integer and some are not then the problem is a mixed integer programming problem. The case where the integer variables are restricted to be 0 or 1 comes up surprisingly often. Such problems are called pure (mixed) 0-1 programming problems or pure (mixed) binary integer programming problems. Integer programming problems (IPs) are usually much harder to solve than linear programming problems.

  3. Types of Integer Programming Models The LP obtained by omitting all integer or 0-1 constraints on variables is called LP relaxation of the IP

  4. Mixed-Integer Programming (MIP) Problems Binary integer variables can be used to model yes/no decisions, such as whether to build a plant or buy a piece of equipment.   Integer variables make an optimization problem far more difficult tosolve.  Memory and solution time may rise exponentially as you add more integer variables.  Even with highly sophisticated algorithms and modern supercomputers, there are models of just a few hundred integer variables that have never been solved to optimality. This is because many combinations of specific integer values for the variables must be tested, and each combination requires the solution of a "normal" linear or nonlinear optimization problem.  The number of combinations can rise exponentially with the size of the problem.

  5. Integer Programming Formulations Fixed-Charge Problems

  6. Integer Programming Formulations (Cont) Either-Or Constraint

  7. Integer Programming Formulations (Cont) Either-Or Constraint Example: suppose that the problem is either to satisfy 5x + 2y  10 OR 3x - 4y  24 – Let z = 0 if the first constraint is to hold and z = 1 if the second one is to hold – Let M be a large enough number that any likely combination of x and y would satisfy 5x + 2y  M and 3x - 4y  M Add constraints: 5x + 2y  10 + Mz 3x - 4y  24 + M(1-z)

  8. Integer Programming Formulations (Cont) If-Then Constraints

  9. How to Model a Piecewise Linear Function f (x) with 0-1 Variables

  10. 1 accept Project i 0 reject Project i Formulation with 0/1 (Binary) Variables PROJi = Indicator for “Project” i = 1. Mutually Exclusive Constraints Example: Can’t select both Project 1 and Project 3 2. Co requisite Projects Constraint Example: Project 1 and Project 2 have to be selected together 3. Prerequisite Projects Constraint Example: Project 4 cannot be done unless Project 2 is done 4. K out of N Projects Constraint Example: Must Choose at least one of Projects 5, 6, 7 PROJ1 + PROJ3 = 1 PROJ1 = PROJ2 or PROJ1 - PROJ2 = 0 PROJ2 PROJ4 or PROJ2 - PROJ4  0 PROJ5 + PROJ6 + PROJ7  1

  11. Capital Budgeting Example: Suppose we have 6 projects. Let Yi be binary variables set to 1 if project i is invested in, and the interactions are as follows: • Project 3 can only be done if project 2 is also done • We must invest in at least one of the first three projects • Only one of projects 2, 4 and 6 can be done • Exactly two of the last four projects must be invested in, but we do not care which ones

  12. Capital Budgeting (Cont) Project 3 can only be done if 2 is also done – Add constraint: y3 < y2 We must invest in at least one of the first three projects – Add constraint: y1 + y2 + y3 > 1 Only one of projects 2, 4 and 6 can be done – Add constraint: y2 + y4 + y6 < 1 Exactly two of the last four projects must be invested in, but we do not care which ones – Add constraint: y3 + y4 + y5 + y6 = 2

  13. Possible Solution Methods • Branch and Bound • Will yield the optimal solution • More efficient than enumeration • Enumeration • Will yield the optimal solution • Time consuming

  14. Branch-and-Bound Method Usually, IPs are solved by some versions of the branch-and-bound procedure. Branch-and-bound methods implicitly enumerate all possible solutions to an IP. By solving a single subproblem, many possible solutions may be eliminated from consideration.  

  15. Branch-and-Bound for Pure IPs

  16. Branch-and-Bound for Pure IPs (Cont) If it is unnecessary to branch on a subproblem, we say that it is fathomed. The following three situations (for a max problem) result in a subproblem being fathomed (1) The subproblem is infeasible, thus it cannot yield the optimal solution to the IP. (2) The subproblem yield an optimal solution in which all variables have integer values. If this optimal solution has a better z-value than any previously obtained solution that is feasible in the IP, than it becomes a candidate solution, and its z-value becomes the current lower bound (LB) on the optimal z-value for the IP. (3) The optimal z-value for the subproblem does not exceed (in a max problem) the current LB, so it may be eliminated from consideration.

  17. Branch and BoundExample X2 X1

  18. Branch and BoundExample • Bounding: solve linear programming relaxation: • Branching: divide into 2 subproblems: X2 upper = 59/7 lower = X1

  19. Branch and BoundExample • Node selection: select left node • Bounding: solve linear programming relaxation: • Branching: divide into 2 subproblems: X2 upper = 59/7 upper = 15/2 X1

  20. Branch and BoundExample • Node selection: select (highest) right node • Bounding: solve linear programming relaxation: infeasible • Node is thus pruned by infeasibility X2 upper = 59/7 infeasible upper = 15/2 X1

  21. Branch and BoundExample • Node selection: select (lowest) right node • Bounding: solve linear programming relaxation: • Node is thus pruned by optimality X2 upper = 59/7 infeasible upper = 15/2 Upper = lower = 7 X1

  22. Branch and BoundExample • Node selection: select (lowest) left node • Bounding: solve linear programming relaxation: • Solution is 6, because 6<7 node is pruned by bound X2 upper = 59/7 infeasible upper = 15/2 Upper = lower = 7 upper = 6 X1

  23. An All-Integer Programming Problem Boxcar Burger Restaurant $2.7 million available expansion. Currently employs 19 managers to run the restaurants. Determine how many restaurants XX Burger should open in suburban and downtown locations in order to maximize its total weekly net profit. Formulate the problem.

  24. LP Optimal x1 = 5 7/16 x2 = 2 11/16 Solving Integer Programming Problem LP relaxation, then round off…? Max 1200 x1 + 2000 x2 ST: 2x1 + 6 x2 27 x2 2 3x1 + x2 19 x1 , x2  0 and Integer

  25. Round off? x1 = 5 x2 = 3 Round up? x1 = 6 x2 = 3 Round down? x1 = 5 x2 = 2 LP Optimal x1 = 5 7/16 x2 = 2 11/16 Solving Integer Programming Problem LP relaxation, then round off ? Max 1200 x1 + 2000 x2 ST: 2x1 + 6 x2 27 x2 2 3x1 + x2 19 x1 , x2  0 and Integer

  26. IP Optimal x1 = 4 x2 = 3 Solving Integer Programming Problem LP relaxation gives an upper bound for Maximization Problem

  27. Solving Integer Programming Problems in Excel 1. Add integer constraints. 2. Set 0 for Tolerance in Solver Parameters dialog box. 3. Solver does not provide Sensitivity Report. 4. To answer sensitivity questions, re-run computer program using updated information.

  28. Solving Boxcar Burger Problem in Excel Cell Formula Copy To D4 SUMPRODUCT(B4:C4, $B$10:$C$10) D5:D6 A13 SUMPRODUCT(B8:C8, B10:C10)

  29. Branch-and-Bound for Traveling Salesperson Problem: Subproblems are assignment problems. If the optional solution to a subproblem contains no subtours, it is a feasible solution to the traveling salesperson problem. Create new subproblems by branching to exclude a subtour. Eliminate a subproblem if its optimal z-value is inferior to the best previously found feasible solution.

  30. Graph for Traveling Salesperson The goal • visit each city once • find the shortest path from A back to A (A) 7 13 6 10 (A B) (A C) (A D) (A E) 5 (A C D) 6 (A C D E) 10 (A C D E B) 7 Travel cost = 6 + 5 + 6 + 10 + 7 = 34 (A C D E B A)

  31. Heuristics for the TSP To apply the nearest-neighbor heuristic (NNH), we begin at any city and then “visit” the nearest city. Then we go to the unvisited city closest to the city we have most recently visited. We continue in this fashion until a tour is obtained. After applying this procedure beginning at each city, we take the best tour found. In the cheapest-insertion heuristic (CIH), we begin at any city and find its closest neighbor. Then we create a subtour joining those two cities. Next, we replace an arc in the subtour (say, arc (i,j) by the combinations of two arcs---(i, k) and (k, j), where k is not in the current subtour---that will increase the length of the subtour by the smallest (or cheapest) amount. We continue with this procedure until a tour is obtained. After applying this procedure beginning with each city, we take the best tour found.

  32. An Integer Programming Formulation of the TSP • cij = distance from city i to city j • xij = 1 if tour visits i then j, and 0 otherwise (binary) • ti = arbitrary real numbers we need to solve for

  33. Cutting Plane Algorithm Step 1 Find the optional tableau for the IP’s programming relaxation. If all variables in the optimal solution assume integer values, we have found an optimal solution to the IP; otherwise, proceed to step2. Step 2 Pick a constraint in the LP relaxation optimal tableau whose right-hand side has the fractional part closest to 1/2. This constraint will be used to generate a cut. Step 2a For the constraint identified in step 2, write its right-hand side and each variable’s coefficient in the form [x]+ f, where 0 <= f < 1.

  34. Cutting Plane Algorithm (Cont)  Step 2b Rewrite the constraint used to generate the cut as All terms with integer coefficients = all terms with fractional coefficients  Then the cut is All terms with fractional coefficients <= 0 Step 3 Use the simplex to find the optimal solution to the LP relaxation, with the cut as an additional constraint. If all variables assume integer values in the optimal solution, we have found an optimal solution to the IP. Otherwise, pick the constraint with the most fractional right-hand side and use it to generate another cut, which is added to the tableau. We continue this process until we obtain a solution in which all variables are integers. This will be an optimal solution to the IP.

  35. Cutting plane methods LPR: min IP: min s. to s. to integer Generic algorithm: 1. Solve the LP relaxation. Let x* be an optimal solution. 2. If x* is integer, stop; x* is an optimal solution to the IP. 3. If not, add a linear inequality constraint to the LP relaxation that all integer solutions to the IP satisfy, but x* does not.

  36. Cutting Plane z feasible New plane • Note that we are removing a corner, and no integer solutions are being excluded.

  37. Implicit Enumeration In a 0-1 IP, implicit enumeration may be used to find an optional solution. When branching at a node, create two new subproblems by (for some free variable x) adding constraints x = 0 and x= 1. If the best completion of a node is feasible, then we need not branch on the node. If the best completion is feasible and better than the current candidate solution, the current node yields a new LB (in a max problem) and may be optional. If the best completion feasible and is not better than the current candidate solution, the current node may be eliminated from consideration. If at a given node, there is at least one constraint that is not satisfied by any completion of the node, then the none cannot yield a feasible solution nor an optional solution to the IP.

More Related