Download presentation
Presentation is loading. Please wait.
1
Integer Linear Programming
Chapter 6 Integer Linear Programming
2
Introduction ILPs occur frequently…
When one or more variables in an LP problem must assume an integer value we have an Integer Linear Programming (ILP) problem. ILPs occur frequently… Scheduling workers Manufacturing airplanes Integer variables also allow us to build more accurate models for a number of common business problems.
3
Integrality Conditions
MAX: 350X X2 } profit S.T.: 1X1 + 1X2 <= 200 } pumps 9X1 + 6X2 <= 1566 } labor 12X1 + 16X2 <= 2880 } tubing X1, X2>= 0 } nonnegativity X1, X2 must be integers } integrality Integrality conditions are easy to state but make the problem much more difficult (and sometimes impossible) to solve.
4
Relaxation Original ILP LP Relaxation MAX: 2X1 + 3X2
S.T.: X1 + 3X2 <= 8.25 2.5X1 + X2 <= 8.75 X1, X2 >= 0 X1, X2 must be integers LP Relaxation
5
Integer Feasible vs. LP Feasible Region
X1 X2 Integer Feasible Solutions 1 2 3 4
6
Solving ILP Problems When solving an LP relaxation, sometimes you “get lucky” and obtain an integer feasible solution. This was the case in the original Blue Ridge Hot Tubs problem in earlier chapters. But what if we reduce the amount of labor available to 1520 hours and the amount of tubing to 2650 feet? See file Fig6-2.xls
7
Bounds The optimal solution to an LP relaxation of an ILP problem gives us a bound on the optimal objective function value. For maximization problems, the optimal relaxed objective function values is an upper bound on the optimal integer value. For minimization problems, the optimal relaxed objective function values is a lower bound on the optimal integer value.
8
Rounding It is tempting to simply round a fractional solution to the closest integer solution. In general, this does not work reliably: The rounded solution may be infeasible. The rounded solution may be suboptimal.
9
How Rounding Down Can Result in an Infeasible Solution
X1 X2 1 2 3 4 optimal relaxed solution infeasible solution obtained by rounding down
10
Branch-and-Bound The Branch-and-Bound (B&B) algorithm can be used to solve ILP problems. Requires the solution of a series of LP problems termed “candidate problems”. Theoretically, this can solve any ILP. Practically, it often takes LOTS of computational effort (and time).
11
Stopping Rules Because B&B can take so long, most ILP packages allow you to specify a suboptimality tolerance factor. This allows you to stop once an integer solution is found that is within some % of the global optimal solution. Bounds obtained from LP relaxations are helpful here. Example LP relaxation has an optimal obj. value of $64,306. 95% of $64,306 is $61,090. Thus, an integer solution with obj. value of $61,090 or better must be within 5% of the optimal solution.
12
Using Solver Let’s see how to specify integrality conditions and suboptimality tolerances using Solver… See file Fig6-8.xls
13
An Employee Scheduling Problem: Air-Express
Day of Week Workers Needed Sunday 18 Monday 27 Tuesday 22 Wednesday 26 Thursday 25 Friday 21 Saturday 19 Shift Days Off Wage 1 Sun & Mon $680 2 Mon & Tue $705 3 Tue & Wed $705 4 Wed & Thr $705 5 Thr & Fri $705 6 Fri & Sat $680 7 Sat & Sun $655
14
Defining the Decision Variables
X1 = the number of workers assigned to shift 1 X2 = the number of workers assigned to shift 2 X3 = the number of workers assigned to shift 3 X4 = the number of workers assigned to shift 4 X5 = the number of workers assigned to shift 5 X6 = the number of workers assigned to shift 6 X7 = the number of workers assigned to shift 7
15
Defining the Objective Function
Minimize the total wage expense. MIN: 680X1 +705X2 +705X3 +705X4 +705X5 +680X6 +655X7
16
Defining the Constraints
Workers required each day 0X1+ 1X2+ 1X3+ 1X4+ 1X5+ 1X6+ 0X7 >= 18 } Sunday 0X1+ 0X2+ 1X3+ 1X4+ 1X5+ 1X6+ 1X7 >= 27 } Monday 1X1+ 0X2+ 0X3+ 1X4+ 1X5+ 1X6+ 1X7 >= 22 }Tuesday 1X1+ 1X2+ 0X3+ 0X4+ 1X5+ 1X6+ 1X7 >= 26 } Wednesday 1X1+ 1X2+ 1X3+ 0X4+ 0X5+ 1X6+ 1X7 >= 25 } Thursday 1X1+ 1X2+ 1X3+ 1X4+ 0X5+ 0X6+ 1X7 >= 21 } Friday 1X1+ 1X2+ 1X3+ 1X4+ 1X5+ 0X6+ 0X7 >= 19 } Saturday Nonnegativity & integrality conditions Xi >= 0 and integer for all i
17
Implementing the Model
See file Fig6-14.xls
18
Binary Variables Binary variables are integer variables that can assume only two values: 0 or 1. These variables can be useful in a number of practical modeling situations….
19
A Capital Budgeting Problem: CRT Technologies
Expected NPV Project (in $000s) Year 1 Year 2 Year 3 Year 4 Year 5 1 $141 $75 $25 $20 $15 $10 2 $187 $90 $35 $0 $0 $30 3 $121 $60 $15 $15 $15 $15 4 $83 $30 $20 $10 $5 $5 5 $265 $100 $25 $20 $20 $20 6 $127 $50 $20 $10 $30 $40 Capital (in $000s) Required in The company has $250,000 available to invest in new projects. It has budgeted $75,000 for continued support for these projects in year 2 and $50,000 per year for years 3, 4, and 5. Unused funds in any year cannot be carried over.
20
Defining the Decision Variables
21
Defining the Objective Function
Maximize the total NPV of selected projects. MAX: 141X X X3 + 83X X X6
22
Defining the Constraints
Capital Constraints 75X1 + 90X2 + 60X3 + 30X X5 + 50X6 <= } year 1 25X1 + 35X2 +15X3 + 20X X5 + 20X6 <= } year 2 20X1 + 0X X3 + 10X4 + 20X5 + 10X6 <= } year 3 15X1 + 0X X3 + 5X X5 + 30X6 <= } year 4 10X1 +30X2 +15X X X5 + 40X6 <= } year 5 Binary Constraints All Xi must be binary
23
Implementing the Model
See file Fig6-17.xls
24
Binary Variables & Logical Conditions
Binary variables are also useful in modeling a number of logical conditions. Of projects 1, 3 & 6, no more than one may be selected X1 + X3 + X6 <= 1 Of projects 1, 3 & 6, exactly one must be selected X1 + X3 + X6 = 1 Project 4 cannot be selected unless project 5 is also selected X4 – X5 <= 0
25
The Fixed-Charge Problem
Many decisions result in a fixed or lump-sum cost being incurred: The cost to lease, rent, or purchase a piece of equipment or a vehicle that will be required if a particular action is taken. The setup cost required to prepare a machine or to produce a different type of product. The cost to construct a new production line that will be required if a particular decision is made. The cost of hiring additional personnel that will be required if a particular decision is made.
26
Example Fixed-Charge Problem: Remington Manufacturing
Hours Required By: Operation Prod. 1 Prod. 2 Prod. 3 Hours Available Machining Grinding Assembly Unit Profit $48 $55 $50 Setup Cost $1000 $800 $900
27
Defining the Objective Function
Maximize total profit. MAX: 48X1 + 55X2 + 50X3 – 1000Y1 – 800Y2 – 900Y3
28
Defining the Decision Variables
Xi = the amount of product i to be produced, i = 1, 2, 3
29
Defining the Constraints
Resource Constraints 2X1 + 3X2 + 6X3 <= 600 } machining 6X1 + 3X2 + 4X3 <= 300 } grinding 5X1 + 6X2 + 2X3 <= 400 } assembly Binary Constraints All Yi must be binary Nonnegativity conditions Xi >= 0, i = 1, 2, ..., 6 Is there a missing link?
30
Defining the Constraints (cont’d)
Linking Constraints (with “Big M”) X1 <= M1Y1 or X1 - M1Y1 <= 0 X2 <= M2Y2 or X2 - M2Y2 <= 0 X3 <= M3Y3 or X3 - M3Y3 <= 0 If Xi > 0 these constraints force the associated Yi to equal 1. If Xi = 0 these constraints allow Yi to equal 0 or 1, but the objective will cause Solver to choose 0. Note that Mi imposes an upper bounds on Xi. It helps to find reasonable values for the Mi.
31
Finding Reasonable Values for M1
Consider the resource constraints 2X1 + 3X2 + 6X3 <= 600 } machining 6X1 + 3X2 + 4X3 <= 300 } grinding 5X1 + 6X2 + 2X3 <= 400 } assembly What is the maximum value X1 can assume? Let X2 = X3 = 0 X1 = MIN(600/2, 300/6, 400/5) = MIN(300, 50, 80) = 50 Maximum values for X2 & X3 can be found similarly.
32
Summary of the Model MAX: 48X1 + 55X2 + 50X3 - 1000Y1 - 800Y2 - 900Y3
S.T.: 2X1 + 3X2 + 6X3 <= 600 } machining 6X1 + 3X2 + 4X3 <= 300 } grinding 5X1 + 6X2 + 2X3 <= 400 } assembly X1 - 50Y1 <= 0 X2 - 67Y2 <= 0 linking constraints X3 - 75Y3 <= 0 All Yi must be binary Xi >= 0, i = 1, 2, 3
33
Potential Pitfall Do not use IF( ) functions to model the relationship between the Xi and Yi. Suppose cell A5 represents X1 Suppose cell A6 represents Y1 You’ll want to let A6 = IF(A5>0,1,0) This will not work with Solver! Treat the Yi just like any other variable. Make them changing cells. Use the linking constraints to enforce the proper relationship between the Xi and Yi.
34
Implementing the Model
See file Fig6-21.xls
35
End of Chapter 6
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.