Professional Documents
Culture Documents
Decision Analytics Case Study
Decision Analytics Case Study
11
Miller suggests that advertising in magazines The executive action team has assembled to reconsider
such as PC World and Home Office will increase the plans for the adapters for the coming year. Garcia, who
consumer awareness of both the company and developed the LP model, concludes his presentation by
adapters. The next day, Williams has a meeting with saying,“As everyone can see, the model gives the optimal
several staff members of a San Francisco advertising solution that maximizes profits. Since I have incorporated
agency. They show her recommendations for two the estimates and assumptions that all of you made,
types of ads (one for the IBM adapters and one for clearly it is the best solution. No other alternative can give
the Macintosh adapters), give her cost information, a higher profit.” Even Williams, who initially was skeptical
and the estimated effectiveness of an advertising of using quantitative models for making executive-level
campaign. Armed with this information and some decisions, is impressed and indicates that she will go along
data from Lu, Williams prepares a brief report for with the results.
Miller setting out her reasons for thinking that each Miller says,“Good work, Carlos! This is a complex
$10 spent on advertising will sell an additional IBM problem but your presentation made it all seem so simple.
adapter; the same relationship holds true for the However, remember that those figures you used were
Macintosh adapter. based on estimates made by all of us. Some were little bet-
Based on an analysis of 1995 sales and accounts ter than guesses. What happens if they are wrong? In
receivable, the accounting department determines that other words, your presentation has helped me get a handle
collection experience is as shown in Table 4.18. For on the problem we are facing, and I know that models are
example, 75% of the IBM adapters sold in a quarter useful where hard, accurate, data exist. However, with all
are paid for during the quarter, 20% are paid for dur- the uncertainty in our situation and the many rough esti-
ing the following quarter, and 3% are paid for during mates made, it seems to me that I will still have to make a
Question 1
Assumptions
1. American Office Systems, Inc. runs 2 work shifts of 8 hours every day.
2. The IBM and Macintosh adapters sell for $175 and $200 respectively
3. The IBM and Macintosh adapters cost $100 and $110 respectively
Decision Variables
1. P
A
i
= IBM adapters [in units] produced in quarter i, i = 1, 2, 3, 4
2. P
B
i
= Macintosh adaptors [in units] produced in quarter i, i = 1, 2, 3, 4
3. M
i
A
= IBM adapters marketing expense [in $] in quarter i, i = 1, 2, 3, 4
4. M
i
B
= Macintosh adapters marketing expense [in $] in quarter i, i = 1, 2, 3, 4
Parameters
1. Q
A
i
= IBM adapters [in units] sold in quarter i, i = 1, 2, 3, 4
2. Q
B
i
= Macintosh adapters [in units] sold in quarter i, i = 1, 2, 3, 4
3. I
A
i
= IBM adapters inventory [in units] at the end of quarter i, i = 1, 2, 3, 4
4. I
B
i
= Macintosh adapters inventory [in units] at the end of quarter i, i = 1, 2, 3, 4
Objective Function
A B
max (200 ∗ Q ) + (175 ∗ Q ) − Costs
i i
A B ∑ ( )
Q ,Q
i∈{1,2,3,4}
Constraints
Production Constraints:
1. Pi
A
≤ 28800 maximum IBM adapters [in units] produced in quarter i, i = 1, 2, 3
2. P
A
4
≤ 31680 maximum IBM adapters [in units] produced in the fourth quarter
3. P
B
i
≤ 9600 maximum Macintosh adapters [in units] produced in quarter i, i = 1, 2, 3
4. P
B
4
≤ 10560 maximum Macintosh adapters [in units] produced in the fourth quarter
Invenotry Constraints
1. P
A
i
+ I iA ≥ (QA
j
)*1.1 necessary IBM adapters production for quarter i, i = 1, 2, 3 , where j = i + 1
2. P
A
4
+ I4A
≥ (Q4 )*2 necessary IBM adapters production for fourth quarter
A
3. P
B
i
+ I iB ≥ (Q )*1.1 necessary Macintosh adapters production for quarter i, i
B
j
= 1, 2, 3 , where
j = i + 1
4. P
B
4
+ I 4B ≥ (QB4
)*2 necessary Macintosh adapters production for fourth quarter
5. I
A
i
= I k + Pi - QA
A A
i
ending inventory for IBM adapters [in units] for quarter i, i = 2, 3, 4 , where
k = i − 1
6. I
A
1
= 10000 + PA 1
- QA
1
ending inventory for IBM adapters [in units] for the first quarter
7. I
B
i
= I k + Pi - Qi ending inventory for Macintosh adapters [in units] for quarter i, i =
B B B
2, 3, 4 , where
k = i − 1
8. I
B
1
= 5000 + PB
1
- QB
1
ending inventory for Macintosh adapters [in units] for the first quarter
1. Q
A
i
= NiA + MiA /10 IBM adapter sold [in units] for quarter i, i = 1, 2, 3, 4
2. Q
B
i
= NiB + MiB /10 IBM adapter sold [in units] for quarter i, i = 1, 2, 3, 4
Budget Constraints:
1. P
A
i
*100 + MiA + PB
i
*110 + MiB ≤ 750000 for quarter i, i = 1, 2, 3, 4
##For Macintosh
for i in np.arange(4):
con_production[i+4]=model.addConstr(P_b[i]<=prod_capacity_b[i])
con_inventory[i]=model.addConstr(I_a[i]==I_a[i-1]+P_a[i]-Q_a[i])##Quat
er 4 for IBM
con_inventory[i+4]=model.addConstr(I_b[i]==I_b[i-1]+P_b[i]-Q_b[i])##Qu
arter 4 for MAC
con_inventory[i+8]=model.addConstr(I_a[i]+P_a[i]>=2*Q_a[i])
con_inventory[i+12]=model.addConstr(I_b[i]+P_b[i]>=2*Q_b[i])
con_negative={}
for i in np.arange(4):
con_negative[i]=model.addConstr(P_a[i]>=0)
con_negative[i+4]=model.addConstr(P_b[i]>=0)
con_negative[i+8]=model.addConstr(M_a[i]>=0)
con_negative[i+12]=model.addConstr(M_b[i]>=0)
con_negative[i+16]=model.addConstr(B[i]>=0)
model.optimize()
In [9]: ##Results
inv_table_a=Table().with_columns('Quarters',[1,2,3,4],'Beginnig Inventory',[10
000,I_a[0].x,I_a[1].x,I_a[2].x]
,'Production IBM',[P_a[0].x,P_a[1].x,P_a[2].x,P_a[3].x]
,'Quantity Sold',[Q_a[0].x,Q_a[1].x,Q_a[2].x,Q_a[3].x]
,'Ending Inventory',[I_a[0].x,I_a[1].x,I_a[2].x,I_a[3].x])
inv_table_a
Out[9]: Quarters Beginnig Inventory Production IBM Quantity Sold Ending Inventory
Out[10]: Quarters Beginnig Inventory Production MAC Quantity Sold Ending Inventory
Question 2
In [11]: Solution = Table().with_columns([
'Quarters',[1,2,3,4],
'IBM Production',[P_a[0].x,P_a[1].x,P_a[2].x,P_a[3].x],
'Macintosh Production',[P_b[0].x,P_b[1].x,P_b[2].x,P_b[3].x],
'Marketing Expense IBM',[M_a[0].x,M_a[1].x,M_a[2].x,M_a[3].x],
'Marketing Expense Mac',[M_b[0].x,M_b[1].x,M_b[2].x,M_b[3].x]
])
Solution ## Multiply productions by 100 and 110.
Other Questions
In [ ]: ##We need to answer Questions 3,4,6,7,10 and 2 original sensitivity analysis
Question 3
Selling Price Sensitivity
##For Macintosh
for i in np.arange(4):
con_production[i+4]=model.addConstr(P_b[i]<=prod_capacity_b[i])
con_inventory[i+12]=model.addConstr(I_b[i]+P_b[i]>=1.1*Q_b[i+1])
else:
con_inventory[i]=model.addConstr(I_a[i]==I_a[i-1]+P_a[i]-Q_a[i])##
Quater 4 for IBM
con_inventory[i+4]=model.addConstr(I_b[i]==I_b[i-1]+P_b[i]-Q_b[i])
##Quarter 4 for MAC
con_inventory[i+8]=model.addConstr(I_a[i]+P_a[i]>=2*Q_a[i])
con_inventory[i+12]=model.addConstr(I_b[i]+P_b[i]>=2*Q_b[i])
if C[i]>=0:
con_excess_cash[i]=model.addConstr(X[i]==C[i])
else: con_excess_cash[i]=model.addConstr(X[i]==0)
con_negative={}
for i in np.arange(4):
con_negative[i]=model.addConstr(P_a[i]>=0)
con_negative[i+4]=model.addConstr(P_b[i]>=0)
con_negative[i+8]=model.addConstr(M_a[i]>=0)
con_negative[i+12]=model.addConstr(M_b[i]>=0)
con_negative[i+16]=model.addConstr(B[i]>=0)
obj = C[0]+C[1]+C[2]+C[3]+(X[0]*0.045+X[1]*0.03+X[2]*0.015)-(B[3]*1.04/1.0
6**(1/4))+(price_IBM*0.2*Q_a[3] + price_IBM*0.03*Q_a[2] + price_IBM*0.02*0.5*Q
_b[2])/(1.06**(1/4))+(price_IBM*0.03*Q_a[3] + price_IBM*0.02*0.5*Q_b[3])/(1.06
**(2/4))+ (price_MAC*0.11*Q_b[3] + price_MAC*0.05*Q_b[2] + price_MAC*0.04*0.5*
Q_b[2])/(1.06**(1/4))+ (200*0.05*Q_b[3] + 200*0.04*0.5*Q_b[3])/(1.06**(2/4))
model.setObjective(obj, GRB.MAXIMIZE)
model.optimize()
return model.objVal
The price for adapters decreases to $173 for IBM and to $198 for Macintosh
In [15]: profit_sensitivity_1=sensitivity_price(173,198)
profit_sensitivity_1;
In [17]: x=[175,173,172,180]
y=[200,198,197,205]
z=[950,930,925,975]
In [279]: ax = plt.axes(projection='3d')
ax.scatter3D(x, y, z, c="red");
The price for adapters decreases to $172 for IBM and to $197 for Macintosh
In [239]: sensitivity_price(172,197)
The price for adapters increasesto $180 for IBM and to $205 for Macintosh
In [240]: sensitivity_price(180,205)
Question 4
Prodcution Cost Sensitivity
##For Macintosh
for i in np.arange(4):
con_production[i+4]=model.addConstr(P_b[i]<=prod_capacity_b[i])
con_inventory[i+12]=model.addConstr(I_b[i]+P_b[i]>=1.1*Q_b[i+1])
else:
con_inventory[i]=model.addConstr(I_a[i]==I_a[i-1]+P_a[i]-Q_a[i])##
Quater 4 for IBM
con_inventory[i+4]=model.addConstr(I_b[i]==I_b[i-1]+P_b[i]-Q_b[i])
##Quarter 4 for MAC
con_inventory[i+8]=model.addConstr(I_a[i]+P_a[i]>=2*Q_a[i])
con_inventory[i+12]=model.addConstr(I_b[i]+P_b[i]>=2*Q_b[i])
if C[i]>=0:
con_excess_cash[i]=model.addConstr(X[i]==C[i])
else: con_excess_cash[i]=model.addConstr(X[i]==0)
con_negative={}
for i in np.arange(4):
con_negative[i]=model.addConstr(P_a[i]>=0)
con_negative[i+4]=model.addConstr(P_b[i]>=0)
con_negative[i+8]=model.addConstr(M_a[i]>=0)
con_negative[i+12]=model.addConstr(M_b[i]>=0)
con_negative[i+16]=model.addConstr(B[i]>=0)
obj = C[0]+C[1]+C[2]+C[3]+(X[0]*0.045+X[1]*0.03+X[2]*0.015)-(B[3]*1.04/1.0
6**(1/4))+(175*0.2*Q_a[3] + 175*0.03*Q_a[2] + 175*0.02*0.5*Q_b[2])/(1.06**(1/4
))+(175*0.03*Q_a[3] + 175*0.02*0.5*Q_b[3])/(1.06**(2/4))+ (200*0.11*Q_b[3] + 2
00*0.05*Q_b[2] + 200*0.04*0.5*Q_b[2])/(1.06**(1/4))+ (200*0.05*Q_b[3] + 200*0.
04*0.5*Q_b[3])/(1.06**(2/4))
model.setObjective(obj, GRB.MAXIMIZE)
model.optimize()
return model.objVal
The production cost increase to $102 for IBM and $112 for Macintosh
In [220]: sensitivity_vc(102,112)
The production cost increases to $105 for IBM and $115 for Maintosh
In [221]: sensitivity_vc(105,115)
Question 6
Advertising Effectiveness Sensitivity
##For Macintosh
for i in np.arange(4):
con_production[i+4]=model.addConstr(P_b[i]<=prod_capacity_b[i])
con_inventory[i+12]=model.addConstr(I_b[i]+P_b[i]>=1.1*Q_b[i+1])
else:
con_inventory[i]=model.addConstr(I_a[i]==I_a[i-1]+P_a[i]-Q_a[i])##
Quater 4 for IBM
con_inventory[i+4]=model.addConstr(I_b[i]==I_b[i-1]+P_b[i]-Q_b[i])
##Quarter 4 for MAC
con_inventory[i+8]=model.addConstr(I_a[i]+P_a[i]>=2*Q_a[i])
con_inventory[i+12]=model.addConstr(I_b[i]+P_b[i]>=2*Q_b[i])
if C[i]>=0:
con_excess_cash[i]=model.addConstr(X[i]==C[i])
else: con_excess_cash[i]=model.addConstr(X[i]==0)
con_negative={}
for i in np.arange(4):
con_negative[i]=model.addConstr(P_a[i]>=0)
con_negative[i+4]=model.addConstr(P_b[i]>=0)
con_negative[i+8]=model.addConstr(M_a[i]>=0)
con_negative[i+12]=model.addConstr(M_b[i]>=0)
con_negative[i+16]=model.addConstr(B[i]>=0)
obj = C[0]+C[1]+C[2]+C[3]+(X[0]*0.045+X[1]*0.03+X[2]*0.015)-(B[3]*1.04/1.0
6**(1/4))+(175*0.2*Q_a[3] + 175*0.03*Q_a[2] + 175*0.02*0.5*Q_b[2])/(1.06**(1/4
))+(175*0.03*Q_a[3] + 175*0.02*0.5*Q_b[3])/(1.06**(2/4))+ (200*0.11*Q_b[3] + 2
00*0.05*Q_b[2] + 200*0.04*0.5*Q_b[2])/(1.06**(1/4))+ (200*0.05*Q_b[3] + 200*0.
04*0.5*Q_b[3])/(1.06**(2/4))
model.setObjective(obj, GRB.MAXIMIZE)
model.optimize()
return model.objVal
The advertising effectiveness decreases to $100, where $100 can increase the demand by one unit
In [226]: sensitivity_marketing(100)
The advertising effectiveness decreases to $12.5, where $12.5 can increase the demand by one unit
In [228]: sensitivity_marketing(12.5)
Question 7
Credit Line Interest Sensitivity
##For Macintosh
for i in np.arange(4):
con_production[i+4]=model.addConstr(P_b[i]<=prod_capacity_b[i])
con_inventory[i+12]=model.addConstr(I_b[i]+P_b[i]>=1.1*Q_b[i+1])
else:
con_inventory[i]=model.addConstr(I_a[i]==I_a[i-1]+P_a[i]-Q_a[i])##
Quater 4 for IBM
con_inventory[i+4]=model.addConstr(I_b[i]==I_b[i-1]+P_b[i]-Q_b[i])
##Quarter 4 for MAC
con_inventory[i+8]=model.addConstr(I_a[i]+P_a[i]>=2*Q_a[i])
con_inventory[i+12]=model.addConstr(I_b[i]+P_b[i]>=2*Q_b[i])
if C[i]>=0:
con_excess_cash[i]=model.addConstr(X[i]==C[i])
else: con_excess_cash[i]=model.addConstr(X[i]==0)
con_negative={}
for i in np.arange(4):
con_negative[i]=model.addConstr(P_a[i]>=0)
con_negative[i+4]=model.addConstr(P_b[i]>=0)
con_negative[i+8]=model.addConstr(M_a[i]>=0)
con_negative[i+12]=model.addConstr(M_b[i]>=0)
con_negative[i+16]=model.addConstr(B[i]>=0)
obj = C[0]+C[1]+C[2]+C[3]+(X[0]*0.045+X[1]*0.03+X[2]*0.015)-(B[3]*(1+inter
est)/1.06**(1/4))+(175*0.2*Q_a[3] + 175*0.03*Q_a[2] + 175*0.02*0.5*Q_b[2])/(1.
06**(1/4))+(175*0.03*Q_a[3] + 175*0.02*0.5*Q_b[3])/(1.06**(2/4))+ (200*0.11*Q_
b[3] + 200*0.05*Q_b[2] + 200*0.04*0.5*Q_b[2])/(1.06**(1/4))+ (200*0.05*Q_b[3]
+ 200*0.04*0.5*Q_b[3])/(1.06**(2/4))
model.setObjective(obj, GRB.MAXIMIZE)
model.optimize()
return model.objVal
Question 10
Minimum Expected Sales Sensitivity
base_sales_a = [9000-error_IBM,10000-error_IBM,11000-error_IBM,12000-error
_IBM]
base_sales_b = [1800-error_MAC,2000-error_MAC,2200-error_MAC,2400-error_MA
C]
##For Macintosh
for i in np.arange(4):
con_production[i+4]=model.addConstr(P_b[i]<=prod_capacity_b[i])
con_inventory[i]=model.addConstr(I_a[i]==I_a[i-1]+P_a[i]-Q_a[i])##
Quater 2-3 for IBM
con_inventory[i+4]=model.addConstr(I_b[i]==I_b[i-1]+P_b[i]-Q_b[i])
##Quarter 2-3 for MAC
con_inventory[i+8]=model.addConstr(I_a[i]+P_a[i]>=1.1*Q_a[i+1])
con_inventory[i+12]=model.addConstr(I_b[i]+P_b[i]>=1.1*Q_b[i+1])
else:
con_inventory[i]=model.addConstr(I_a[i]==I_a[i-1]+P_a[i]-Q_a[i])##
Quater 4 for IBM
con_inventory[i+4]=model.addConstr(I_b[i]==I_b[i-1]+P_b[i]-Q_b[i])
##Quarter 4 for MAC
con_inventory[i+8]=model.addConstr(I_a[i]+P_a[i]>=2*Q_a[i])
con_inventory[i+12]=model.addConstr(I_b[i]+P_b[i]>=2*Q_b[i])
con_negative={}
for i in np.arange(4):
con_negative[i]=model.addConstr(P_a[i]>=0)
con_negative[i+4]=model.addConstr(P_b[i]>=0)
con_negative[i+8]=model.addConstr(M_a[i]>=0)
con_negative[i+12]=model.addConstr(M_b[i]>=0)
con_negative[i+16]=model.addConstr(B[i]>=0)
obj = C[0]+C[1]+C[2]+C[3]+(X[0]*0.045+X[1]*0.03+X[2]*0.015)-(B[3]*1.04/1.0
6**(1/4))+(175*0.2*Q_a[3] + 175*0.03*Q_a[2] + 175*0.02*0.5*Q_b[2])/(1.06**(1/4
))+(175*0.03*Q_a[3] + 175*0.02*0.5*Q_b[3])/(1.06**(2/4))+ (200*0.11*Q_b[3] + 2
00*0.05*Q_b[2] + 200*0.04*0.5*Q_b[2])/(1.06**(1/4))+ (200*0.05*Q_b[3] + 200*0.
04*0.5*Q_b[3])/(1.06**(2/4))
model.setObjective(obj, GRB.MAXIMIZE)
model.optimize()
return model.objVal
In [236]: sensitivity_base_sales(1000,200)