Topic 5 Chap06 Integer LP
Topic 5 Chap06 Integer LP
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?
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
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
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
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
1, if X i 0
Yi i = 1, 2, 3
0, if X i 0
Defining the Objective Function
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:
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
125X14
105X24
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
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: