You are on page 1of 24

ADM 2302 [Q]

Business Analytics
DGD9: Binary Integer Programming
Sicen Li
sli302@uottawa.ca
For today…

7.11 | 7.7 | 7.3 | 7.17 | A2


7.11
Sunny Skies Unlimited.
Binary Programming

7.11 – Problem Description


More Americans are moving to a warmer climate when they retire. To take advantage of this trend, Sunny Skies Unlimited is
undertaking a major real-estate development project by developing a completely new retirement community (to be called Pilgrim
Haven) that will cover several square miles. One of the decisions to be made is where to locate the two paramedic stations that
have been allocated to the community to respond to medical emergencies. For planning purposes, Pilgrim Haven has been divided
into five tracts, with no more than one paramedic station to be located in any given tract. Each station is to respond to all the
medical emergencies that occur in the tract in which it is located as well as in the other tracts that are assigned to this station .
Thus, the decisions to be made consist of (1) the tracts to receive a paramedic station and (2) the assignment of each of the other
tracts to one of the paramedic stations. The goal is to minimize the overall average of the response times to medical emergencies.

The table on the right gives the average


response time to a medical emergency in
each tract (the rows) if that tract is served
by a station in a given tract (the columns).
The last column gives the forecasted
average number of medical emergencies
that will occur in each of the tracts per day.
Tract 2
Tract 5

Tract 1

Tract 3

Tract 4
Tract 2
Tract 5

Tract 1 5 12

15 30

Tract 3
20

Tract 4
Tract 2
Tract 5

Tract 1 5 12

Tract 3
12
6

Tract 4
15
Binary Programming

7.11 – If we look at this visually…


1. Two paramedic stations available
2. Five tracts in total: 1, 2, 3, 4, 5. One tract can have a maximum one paramedic station
3. Each station is to respond to all the medical emergencies that occur in the tract in which it is located
and in the other tracts that are assigned to this station

Decision: 1) Which tract to receive a paramedic station


2) The assignment of each of the other tracts to one of the paramedic stations

The goal is to minimize the overall average of the response times to medical emergencies
Binary Programming

7.11 - Algebraic Form


Let yi = 1 if tract i receive a fire station, and yi = 0 otherwise
Let Xij = 1 if tract i is assigned to a station located in tract j, and Xij = 0 otherwise

Min z =
[2(5X11 + 20X12 + 15X13 + 25X14 + 10X15) +
1(12X21 + 4X22 + 20X23 + 15X24 + 25X25) +
3(30X31 + 15X32 + 6X33 + 25X34 + 15X35) +
1(20X41 + 10X42 + 15X43 + 4X44 + 12X45) +
3(15X51 + 25X52 + 12X53 + 10X54 + 5X55)] / (2 + 1 + 3 + 1 + 3)
Subject to
X11 + X12 + X13 + X14 + X15 = 1 (Each tract can only be assigned to one station)
X21 + X22 + X23 + X24 + X25 = 1
X31 + X32 + X33 + X34 + X35 = 1
X41 + X42 + X43 + X44 + X45 = 1
X51 + X52 + X53 + X54 + X55 = 1
Y1 + Y2 + Y3 + Y4 + Y5 = 2 (Total # of station is 2)
Binary Programming

7.11 - Algebraic Form (cont.)


Let yi = 1 if tract i receive a fire station, and yi = 0 otherwise
Let Xij = 1 if tract i is assigned to a station located in tract j, and Xij = 0 otherwise

Subject to (cont.)
X11 = Y1 , X21 <= Y1 , X31 <= Y1, , X41 <= Y1, , X51 <= Y1
X22 = Y2 , X12 <= Y2 , X32 <= Y2, , X42 <= Y2, , X52 <= Y2
X33 = Y3 , X13 <= Y3 , X23 <= Y3, , X43 <= Y3, , X53 <= Y3
X44 = Y4 , X14 <= Y4 , X24<= Y4, , X34 <= Y4, , X54 <= Y4
X55 = Y5 , X15 <= Y5 , X25<= Y5, , X35 <= Y5, , X45 <= Y5
yi = 0,1, where i = 1,2,3,4,5
Xij = 0,1, where i = 1,2,3,4,5 and j = 1,2,3,4,5
Binary Programming

7.11 – BIP Model on Excel Spreadsheet


7.7
The Fly-Right Airplane Company
The relevant data are given in the table below. The first row
Binary Programming
gives the start-up cost required to initiate the production of
7.7 – Problem Description the airplanes for each customer. Once production is under

The Fly-Right Airplane Company builds small jet air-planes way, the marginal net revenue (which is the purchase price

to sell to corporations for use by their executives. To meet minus the marginal production cost) from each airplane

the needs of these executives, the company’s customers produced is shown in the second row. The third row gives

sometimes order a custom design of the airplanes being the percentage of the available production capacity that

purchased. When this occurs, a substantial start-up cost is would be used for each airplane produced. The last row

incurred to initiate the production of these airplanes. indicates the maximum number of airplanes requested by
each customer (but less will be accepted).
Fly-Right has recently received purchase requests from
three customers with short deadlines. However, because
the company’s production facilities already are almost
completely tied up filling previous orders, it will not be able
to accept all three orders. Therefore, a decision now needs
to be made on the number of airplanes the company will
agree to produce (if any) for each of the three customers.

Fly-Right wants to decide how many airplanes to produce for each customer to maximize the company’s total profit (total net
revenue minus start-up costs). Formulate and solve a spreadsheet model with both integer variables and binary variables.
Binary Programming

7.7 – BIP Model on Excel Spreadsheet


7.3
Young Couple Diving Chores
Binary Programming

7.3 – Problem Description

A young couple, Eve and Steven, want to divide their main household chores (marketing, cooking,
dishwashing, and laundering) between them so that each has two tasks but the total time they
spend on household duties is kept to a minimum. Their efficiencies on these tasks differ, where the
time each would need to perform the task is given by the following table.

a. Formulate a BIP model in algebraic form for this problem.


b. Formulate and solve this model on a spreadsheet.
Binary Programming

7.3 – BIP Model in Algebraic Form

Decision Variables Constraints


EM = 1 if Eve does the marketing; 0 otherwise EM + EC + ED + EL = 2 (each person does 2 tasks)
EC = 1 if Eve does the cooking; 0 otherwise SM + SC + SD + SL = 2
ED = 1 if Eve does the dishwashing; 0 otherwise EM + SM = 1 (each task is done by 1 person)
EL = 1 if Eve does the laundry; 0 otherwise EC + SC = 1
SM = 1 if Steven does the marketing; 0 otherwise ED + SD = 1
SC = 1 if Steven does the cooking; 0 otherwise EL + SL = 1
SD = 1 if Steven does the dishwashing; 0 otherwise
SL = 1 if Steven does the laundry; 0 otherwise EM, EC, ED, EL, SM, SC, SD, SL are binary variables

Objective Function
Minimize Time (hours) = 4.5EM + 7.8EC + 3.6ED + 2.9EL + 4.9SM + 7.2SC + 4.3SD + 3.1SL
Binary Programming

7.3 – BIP Model on Excel Spreadsheet


7.17
Bellevue School District
Binary Programming

7.17 – Problem Description

The school board for the Bellevue School District has made the decision to purchase 1,350 additional Macintosh
computers for computer laboratories in all its schools. Based on past experience, the school board also has
directed that these computers should be purchased from some combination of three companies—Educomp,
Macwin, and McElectronics. In all three cases, the companies charge a discounted variable cost per computer
and a fixed delivery and installation cost for these large sales to school districts. The next table shows these
charges as well as the capacity (the maximum number of computers that can be sold from the limited inventory)
for each of the companies.

The school board wants to determine the minimum-cost plan for meeting its computer needs.
a. Formulate a BIP model in algebraic form for this problem
b. Formulate and solve this model on a spreadsheet.
Binary Programming

7.17 – BIP Model in Algebraic Form

Decision Variables
Let xj = number of computers purchased from vendor j (for j = Educomp, Macwin, McElectronics).
Let yj = 1 if any computers are delivered from vendor j; 0 otherwise (for j = Educomp, Macwin, McElectronics).

Objective Function
Minimize Cost = $750xEducomp + $775xMacwin + $700xMcElectronics + $45,000yEducomp + $35,000yMacwin + $50,000yMcElectronics

Constraints
xEducomp ≤ 700yEducomp
xMacwin ≤ 700yMacwin
xMcElectronics ≤ 1,000yMcElectronics
xEducomp + xMacwin + xMcElectronics ≤ 1350

and xj ≥ 0, yj are binary (for j = Educomp, Macwin, McElectronics).


Binary Programming

7.17 – BIP Model on Excel Spreadsheet


questions?
Assignment 2
Thanks!
Let me know if you have any questions...

You might also like