Download presentation
Presentation is loading. Please wait.
1
Integer linear programming
When all of the decision variables in an LP must take only integer values, the resulting model is referred to as integer linear programming (ILP) model. When the model requires both continuous and integer decision variables, it is called mixed integer linear programming (MILP) model. When the LP model includes binary decision variables, it is called binary… (BILP) Real-world problems often require integer variables. Many examples…assignment, scheduling (people, machines, airplanes, crews, classes, fabric-rolls, probation officers, locating ambulances, …)
2
Formulating IPL, MILP, BILP problems
Integer variables (a.k.a. general integer variables) without any other restrictions can take the values of 0, 1, 2, 3, … Binary integer variables (a.k.a binary variables) can only be 0 or 1. Typically, stating that some or all variables must be integer or binary is rather easy. MAX: 350X X2 S.T.: 1X1 + 1X2 <= 200 9X1 + 6X2 <= 1566 12X1 + 16X2 <= 2880 X1, X2>= 0 and must be integer But, solving an ILP can be very time consuming.
3
Solving ILPs With ILPs there are no more corners to jump to, in search of the best (optimum) corner! Rounding or truncating the optimal solution does not guarantee optimality and feasibility. Branch & bound based algorithms are widely used. Consider: Max 5x1 + 8x2 st x1 + x2 <= 6 5x1 + 9x2 <= 45 x1, x2 >= 0 and integer
4
o.f.v.= x1 = x2 =
5
X1 <= 1 X1 >=2 X2 >=4 X2 <=3 B & B Example 1 2 3 4 5 6 7 8
1 2 3 4 5 6 7 8 9 10 X1 X2 X1 <= 1 X1 >=2 X2 >=4 X2 <=3
6
An Employee Scheduling Problem: Air-Express
Air- Express is an express shipping service that guarantees overnight delivery of packages anywhere in the continental United States. The company has various operations centers, called hubs, at airports in major cities across the country. Packages are received at hubs from other locations and then shipped to intermediate hubs or to their final destinations. The manager of the Air- Express hub in Baltimore, Maryland, is concerned about labor costs at the hub and is interested in determining the most effective way to schedule workers. The hub operates seven days a week, and the number of packages it handles each day varies from one day to the next. Using historical data on the average number of packages received each day, the manager estimates the number of workers needed to handle the packages as: Day of Week Workers Needed Sunday 18 Monday 27 Tuesday 22 Wednesday 26 Thursday 25 Friday 21 Saturday 19
7
Air-Express Cont’d The package handlers working for Air- Express are unionized and are guaranteed a five- day work week with two consecutive days off. The base wage for the handlers is $ 655 per week. Because most workers prefer to have Saturday or Sunday off, the union has negotiated bonuses of $ 25 per day for its members who work on these days. The possible shifts and salaries for package handlers are: The manager wants to keep the total wage expense for the hub as low as possible. With this in mind, how many package handlers should be assigned to each shift if the manager wants to have a sufficient number of workers available each day? Objective? Decision variables? Model, setup in Excel, solve via solver. 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
8
An Employee Scheduling Problem: Air-Express - Summary Facts
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 Decision variables? Define…
9
Formulation Xi = the number of workers assigned to shift i, i=1 ,7
Min 680X1 +705X2 +705X3 +705X4 +705X5 +680X6 +655X7 ST X2+ X3+ X4+ X5+ X6 >= 18 } Sunday X3+ X4+ X5+ X6+ X7 >= 27 } Monday X X4+ X5+ X6+ X7 >= 22 }Tuesday X1+ X X5+ X6+ X7 >= 26 } Wednesday X1+ X2+ X X6+ X7 >= 25 } Thursday X1+ X2+ X3+ X X7 >= 21 } Friday X1+ X2+ X3+ X4+ X >= 19 } Saturday Xi >= 0 and integer for all i
10
Binary integer variables
Example 6.11 Capital Budgeting Problem Expected NPV Capital in ($000s) Required in 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 The company currently 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. Decision variables? Define…
11
Formulation Let Xi = 1 if project i selected, 0 otherwise
max ROI as measured by NPV Max X X2 + … + 127X6 ST YEAR 1) 75X1 + 90X2 + … + 50X6 <= 250 YEAR 2) 25X1 + … X6 <= 75 … YEAR 5) 10X1 + … X6 <= 50 Note that for only BINARY dec. var. we do not have to indicate that they are >= 0
12
Binary Variables & Logical Conditions
Binary variables are also useful in modeling a number of logical conditions. For example: 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
13
Health Care Systems of Florida
Health Care Systems of Florida ( HCSF) is planning to build a number of new emergency- care clinics in central Florida. HCSF management has divided a map of the area into seven regions. They want to locate the emergency centers so that all seven regions will be conveniently served by at least one facility. Five possible sites are available for constructing the new facilities. The regions that can be served conveniently by each site are indicated by X in the following table: Formulate as an ILP. Implement the formulation on Excel to solve using solver.
14
The Fixed-Charge Problem
Remington Manufacturing Formulate it as a linear model Operation Prod. 1 Prod. 2 Prod. 3 Hours Available Machining Grinding Assembly Unit Profit $48 $55 $50 Setup Cost $1000 $800 $900 Xi = the amount of product i to be produced, i = 1, 2, 3
15
Potential Pitfall Do not use IF( ) functions to model the relationship between the Xi and Yi. Suppose cell A5 represents X Suppose cell A6 represents Y You’ll want to let A6 = IF(A5>0,,0) This will make the model nonlinear and may not work with Standard Solver. However, ASPE will attempt to linearize the model if it can it will then use a simplex (like) algorithm to solve it (much faster and optimality guaranteed as long as a solution exists). It is best to treat the Yi variables just like any other variable. Make them changing cells. Use the linking constraints to enforce the proper relationship between the Xi and Yi
16
Rem. Man. Formulation Max 48x1 + 55x2 +50x3 –1000y1 – 800y2 – 900y3 ST
!x1 <= My (“M” a large number, e.g., 999) x2 <= 999y2 x3 <= 999y3 xi >= 0 (and integer, if desired/needed) How large (or small) should (could) “M” be? Carefully study chap. 6 section: Determining Values for “Big M” And my recorded explanation too.
17
Radford Castings…
18
Useful tricks with binary variables
Either-or-constraints: where a choice can be made between two constraints, so that only one must hold. either 3x1 + 2x2 <= 18 (1) or x1 + 4x2 <= 16 (2) Let y = 0 if constraint (1) must hold, 1 if constraint (2) must hold, re-write the two constraints as: 3x1 + 2x2 <= 18 + (a large number)y x1 + 4x2 <= 16 + (a large number)(1 -y) Generalize above for “K out of N constraints must hold”
19
K out of N constraints must hold
Suppose we have three assembly lines for a product but only one can be used at a given time. 2.2X X X <= 4500 1.9X X X <= 4350 2.1X X X <= 4570 Y1 Y2 Y3 Y1 + Y2 + Y3 = 2 which is (3 – 1) and “yi”s are 0/1
20
Two Formulation Exercises
#23 The Clampett Oil Co. has a tanker truck…. #18 Howie’s Carpet World… Suggested problems from chap 6: 6th ed: # 7, 12, 13, 14, 15, 23, 25, 30 Int’l ed: #19, 11, 7, 18, 16, 32, 38, 23 Group Exercises: The Carolinian Textiles -Part (b) Case 6.2 Power Dispatching
21
The Clampett Oil Co. has a tanker truck…
The Clampett Oil Company has a tanker truck that it uses to deliver fuel to customers. The tanker has five different storage compartments with capacities to hold 2,500, 2,000, 1,500, 1,800 and 2,300 gallons, respectively. The company has an order to deliver 2,700 gallons of diesel fuel; 3,500 gallons of regular unleaded gasoline; and 4,200 gallons of premium unleaded gasoline. If each storage compartment can hold only one type of fuel, how should Clampett Oil load the tanker? If it is impossible to load the truck with the full order, the company wants to minimize the total number of gallons by which the order is short. (Hint: Consider using slack variables to represent shortage amounts.) Formulate an ILP model for this problem. Implement this model in a spreadsheet and solve it. What is the optimal solution?
22
Howie’s Carpet World… Howie’s Carpet World has just received an order for carpets for a new office building. The order is for 4,000 yards of carpet 4 feet wide, 20,000 yards of carpet 9 feet wide, and 9,000 yards of carpet 12 feet wide. Howie can order two kinds of carpet rolls, which he will then have to cut to fill this order. One type of roll is 14 feet wide, 100 yards long, and costs $ 1,000 per roll; the other is 18 feet wide, 100 yards long, and costs $ 1,400 per roll. Howie needs to determine how many of the two types of carpet rolls to order and how they should be cut. He wants to do this in the least costly way possible. Formulate an LP model for this problem. Create a spreadsheet model for this problem and solve it using Solver. What is the optimal solution? Suppose Howie wants to minimize waste. Would the solution change?
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.