0% found this document useful (0 votes)
31 views

Topic 5 Chap06 Integer LP

Uploaded by

syuazusa
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
31 views

Topic 5 Chap06 Integer LP

Uploaded by

syuazusa
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 50

Topic 5 (Ch6)

Integer Linear Programming


Introduction
 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
 This chapter discusses how to solve ILP
problems in which certain decision variables
must be assumed as integer values
The Blue Ridge Hot Tubs Example
Blue Ridge Hot Tubs produces two types of hot tubs:
Aqua-Spas & Hydro-Luxes.

Aqua-Spa Hydro-Lux
Pumps 1 1
Labor 9 hours 6 hours
Tubing 12 feet 16 feet
Unit Profit $350 $300

There are 200 pumps, 1566 hours of labor, and 2880 feet
of tubing available.
3
Integrality Conditions
MAX: 350X1 + 300X2 } profit
S.T.: 1X1 + 1X2 <= 200 } pumps
9X1 + 6X2 <= 1566 } labor
12X1 + 16X2 <= 2880 } tubing
X1, X2>= 0 }
nonnegativity
X1, X2 must be integers }
We have integer variables in a problem (see
integrality
above).
In contrast, variables that are not required to be
integer values are referred to as continuous
variables.
Relaxation
 Original ILP
MAX: 2X1 + 3X2
S.T.: X1 + 3X2 <= 8.25
2.5X1 + X2 <=
8.75
X1, X2 >= 0
X1, X2 must be
integers
 LP Relaxation
MAX: 2X1 + 3X2
S.T.: X1 + 3X2 <= 8.25
2.5X1 + X2 <=
Integer Feasible vs.
X2 LP Feasible Region
Integer Feasible Solutions
3

0
0 1 2 3 4 X1
Solving ILP Problems
 When solving an LP relaxation, sometimes
you “get lucky” and obtain an integer feasible
solution. See file Fig3-1.xlsm
MAX: 350X1 + 300X2 } profit
S.T.: 1X1 + 1X2 <= 200 } pumps
9X1 + 6X2 <= 1566 } labor
12X1 + 16X2 <= 2880 } tubing
X1, X2>= 0 }
nonnegativity
X1, X2 must be integers }
Solving ILP Problems
 How about reducing the amount of labor
available to 1520 hours and the amount of
tubing to 2650 feet?

MAX: 350X1 + 300X2 } profit


S.T.: 1X1 + 1X2 <= 200 } pumps
9X1 + 6X2 <= 1520 } labor
12X1 + 16X2 <= 2650 } tubing
X1, X2>= 0 }
nonnegativity
X1, X2 must be integers } 8
Rounding
 To round a fractional solution to the closest
integer solution.
– Rounding up? 117 & 78?
– Rounding down? 116 & 77?
– Or …??
X2 Rounding
– The rounded solution may be infeasible.
3
– The rounded solution may be suboptimal.

2
optimal relaxed solution
infeasible solution obtained
by rounding down
1

0
0 1 2 3 4 X1

10
Stopping Rules
 To specify a suboptimality tolerance: XX%
 This allows you to stop once an integer solution is
found that is within some % of the global optimal
solution.

– 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.
90% of $64,306 is $57,875.4; i.e. 10%
Using Solver
Please revise the file Fig3-1.xlsm

MAX: 350X1 + 300X2 } profit


S.T.: 1X1 + 1X2 <= 200 } pumps
9X1 + 6X2 <= 1520 } labor
12X1 + 16X2 <= 2650 } tubing
X1, X2>= 0 }
nonnegativity
X1, X2 must be integers }
integrality
Optimal Solution
 117 & 78?
 116 & 77?
 Or …???

 Integer Tolerance  “0”

13
2. Employee Scheduling Problem

14
2. Employee Scheduling Problem

15
2. Employee Scheduling Problem
Day of Week Workers Needed Shift Days Off Wage
Sunday 18 1 Sun & Mon $680
Monday 27 2 Mon & Tue $705
Tuesday 22 3 Tue & Wed $705
Wednesday 26 4 Wed & Thr $705
Thursday 25 5 Thr & Fri $705
Friday 21 6 Fri & Sat $680
Saturday 19 7 Sat & Sun $655

If you are a staff, which will be


selected?
CEO: Minimize the total wage
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
Defining the Objective Function

Minimize the total wage expense.


MIN: 680X1 +705X2 +705X3 +705X4 +705X5 +680X6
+655X7
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
Implementing the Model
See file Fig6-13.xlsm
3. Capital Budgeting Problem:

21
3. Capital Budgeting Problem:
Capital (in $000s)
Expected NPV
Project RequiredYear
(in $000s) in 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 has $250,000 available to invest in year
1.
 It has budgeted $75,000 in year 2
 $50,000 per year for years 3, 4, and 5.
 Unused funds in any year cannot be carried over.
Defining the Decision Variables

1, if project i is selected


X  i 1,2,...,6
i  0, otherwise

 Binary variables are integer variables


that can assume only two values: 0 or 1.
Defining the Objective Function

Maximize the total NPV of selected projects.

MAX: 141X1 + 187X2 + 121X3


+ 83X4 + 265X5 + 127X6
Defining the Constraints
 Capital Constraints
75X1 + 90X2 + 60X3 + 30X4 + 100X5 + 50X6 <= 250 } year 1
25X1 + 35X2 +15X3 + 20X4 + 25X5 + 20X6 <= 75 } year 2
20X1 + 0X2 + 15X3 + 10X4 + 20X5 + 10X6 <= 50 } year 3
15X1 + 0X2 + 15X3 + 5X4 + 20X5 + 30X6 <= 50 } year 4
10X1 +30X2 +15X3 + 5X4 + 20X5 + 40X6 <= 50 } year 5
 Binary Constraints
All Xi must be binary
Implementing the Model
See file Fig6-16.xlsm
4. The Fixed-Charge Problem

27
4. 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.
4. Fixed-Charge Problem

Hours Required By:


Operation Prod. 1 Prod. 2 Prod. 3
Hours Available
Machining 2 3 6 600
Grinding 6 3 4 300
Assembly 5 6 2 400
Unit Profit $48 $55 $50
Setup Cost $1000 $800 $900
Defining the Decision Variables
Xi = the amount of product i to be produced, i = 1, 2, 3

1, if X i  0

Yi  i = 1, 2, 3
0, if X i 0

Defining the Objective Function

Maximize total profit.

MAX: 48X1 + 55X2 + 50X3 – 1000Y1 – 800Y2 – 900Y3


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?
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
 Mi imposes an upper bounds on Xi.
 What is the maximum value X1 can assume?
Let X2 = X3 = 0
X1 = MIN(600/2, 300/6, 400/5) = 50 (M1)
 Maximum values for X2 & X3 can be found
similarly. 67 (M2); 75 (M3).
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
Implementing the Model
See file Fig6-28.xlsm
Use if IF( ) functions (p.284)
 Formula for cell F8: = SUMPRODUCT(B7:D7,B5:D5) -
IF(B5>0,B8,0) - IF(C5>0,C8,0) - IF(D5>0,D8,0)

36
On the use if IF( ) functions
 Avoid the 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 leads to local optimal solutions with
Excel’s 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.
37
5. Contract Award Problem
(optional)
 B&G Construction has 4 building projects and
can purchase cement from 3 companies for the
following costs:

Cost per Delivered Ton of Cement Max.


Project 1 Project 2Project 3 Project 4 Supply
Co. 1 $120 $115 $130 $125 525
Co. 2 $100 $150 $110 $105 450
Co. 3 $140 $95 $145 $165 550
Needs 450 275 300 350
(tons)
A Contract Award Problem

 Side constraints:
– Co. 1 will not supply orders of less than
150 tons for any project
– Co. 2 can supply more than 200 tons to no
more than one of the projects
– Co. 3 will accept only orders that total 200,
400, or 550 tons
Defining the Decision Variables

Xij = tons of cement purchased


from company i for project j
Defining the Objective Function

Minimize total cost

MIN: 120X11 + 115X12 + 130X13 +

125X14

+ 100X21 + 150X22 + 110X23 +

105X24

+ 140X31 + 95X32 + 145X33 +


Defining the Constraints
 Supply Constraints
X11 + X12 + X13 + X14 <= 525 } company 1
X21 + X22 + X23 + X24 <= 450 } company 2
X31 + X32 + X33 + X34 <= 550 } company 3
 Demand Constraints
X11 + X21 + X31 = 450 } project 1
X12 + X22 + X32 = 275 } project 2
X13 + X23 + X33 = 300 } project 3
X14 + X24 + X34 = 350 } project 4
Defining the Constraints-I
 Company 1 Side
Constraints
X11<=525Y11 Co. 1 will not supply
orders of less than 150
X12<=525Y12 tons for any project…

X13<=525Y13
X14<=525Y14
X11>=150Y11
X12>=150Y12
X13>=150Y13
X14>=150Y14
Yij binary
Defining the Constraints-II
 Company 2 Side Constraints
X21<=200+250Y21 Co. 2 can supply more
than 200 tons to no
X22<=200+250Y22 more than one of the
projects
X23<=200+250Y23
X24<=200+250Y24
Y21 + Y22 + Y23 + Y24 <= 1

Yij binary
Defining the Constraints-III

 Company 3 Side Constraints


X31 + X32 + X33 + X34 = 200Y31 + 400Y32 + 550Y33

Co. 3 will accept only


Y31 + Y32 + Y33 <= 1 orders that total 200,
400, or 550 tons
Implementing the Side Constraints
See file Fig6-32.xlsm
Follow-up questions
Question #1 (p302.3)
 Consider the following optimization problem:

 a. What is the optimal solution to the problem?


 b. Now suppose that X1 and X2 must be
integers. What is the optimal solution?

48
Question #2 (p303.9)
 Eric Brown is responsible for upgrading the wireless network for his
employer. He has identified seven possible locations to install new
nodes for the network. Each node can provide service to different
regions within his employer’s corporate campus. The cost of
installing each node and the regions that can be served by each
node are summarized below.
– Node 1: Regions 1, 2, 5; Cost: $700
– Node 2: Regions 3, 6, 7; Cost $600
– Node 3: Regions 2, 3, 7, 9; Cost $900
– Node 4: Regions 1, 3, 6, 10; Cost $1,250
– Node 5: Regions 2, 4, 6, 8; Cost $850
– Node 6: Regions 4, 5, 8, 10; Cost $1,000
– Node 7: Regions 1, 5, 7, 8, 9; Cost $100
 a. Formulate an ILP for this problem.
 b. Implement your model in a spreadsheet and solve it.
 c. What is the optimal solution?

49
Question #3 (p303.10)
 Garden City Beach is a popular summer vacation destination for
thousands of people. Each summer, the city hires temporary
lifeguards to ensure the safety of the vacationing public. Garden
City’s lifeguards are assigned to work five consecutive days each
week and then have two days off. However, the city’s insurance
company requires them to have at least the following number of
lifeguards on duty each day of the week:

 The city manager would like to determine the minimum number of


lifeguards that will have to be hired.
 a. Formulate an ILP for this problem.
 b. Implement your model in a spreadsheet and solve it.
 c. What is the optimal solution?
50

You might also like