INDU 6121: Assignment 2 Submission Deadline: Friday, November 20th. In this assignment, you need to implement and solve the given models by IBM CPLEX Optimization Studio (OPL). You need to consider a maximum time limit of 30 minutes in solving the given problems. For each problem, some data are given in an Excel file. After solving the problem, you need to report these details:
1- Solution time 2- The obtained objective value 3- The obtained solution
Note that for this assignment, you are not allowed to you the Excel Solver.
You need submit the hard and soft copy including this information:
1- Hard/Soft copy: a. OPL codes for each part of each question separately. On the top of each page, specify
the question and its corresponding part (a, b, c, d, etc). b. The outputs (Solution time, The obtained objective value, The obtained solution)
For the soft copy, you need to submit the original OPL files in addition to the report file. Do not just copy and paste the code in word and make it pdf. The marker will check your code. You can submit only one .rar or .zip file including OPl codes and pdf of your report. The name of this file must Your_Student_ID.rar or Your_Student_ID.zip.
Question 1- This question is about the Factory Planning problem that is explained in the slides of the course. In the general case of this problem, products 𝐼𝐼 = {1, … , |𝐼𝐼|} must be produced using processes 𝐽𝐽 = {1, … , |𝐽𝐽|}. The following parameters and variable are used by an operations research analyst to formulate the problem:
Parameters: 𝑑𝑑𝑖𝑖 : The market limit for product 𝑖𝑖. 𝑝𝑝𝑖𝑖 : The per-unit profit for selling product 𝑖𝑖. 𝑏𝑏𝑗𝑗 : The total available time for process 𝑗𝑗 (in hour) 𝑎𝑎𝑖𝑖𝑗𝑗 : The required time of process 𝑗𝑗 for one unit of product 𝑖𝑖 (in hour)
Variables: 𝑥𝑥𝑖𝑖 : The number of product 𝑖𝑖 produced and sold in the market.
Using this notation, the following model is proposed by the operations research analyst.
𝑚𝑚𝑎𝑎𝑥𝑥 �𝑝𝑝𝑖𝑖𝑥𝑥𝑖𝑖 𝑖𝑖∈𝐼𝐼
(1)
�𝑎𝑎𝑖𝑖𝑗𝑗𝑥𝑥𝑖𝑖 𝑖𝑖∈𝐼𝐼
≤ 𝑏𝑏𝑗𝑗 𝑗𝑗 ∈ 𝐽𝐽 (2)
0 ≤ 𝑥𝑥𝑖𝑖 ≤ 𝑑𝑑𝑖𝑖 𝑖𝑖 ∈ 𝐼𝐼 (3) 𝑥𝑥𝑖𝑖 integer 𝑖𝑖 ∈ 𝐼𝐼 (4)
The data for this problem are given in Factory_Planning.xlsx.
Question 1-Part a) Report the Solution time, the obtained objective value, and the obtained solution.
Question 1-Part b) The business owner has realized that she has two options;
1) pay $10,000 to have 10% more available time for the available time of process 1. 2) Stick the available times for processes as in the previous part of the question and do not pay
anything.
Which option do you recommend to the business owner?
Question 2- This question is about the Production planning problem with setup cost that is already discussed in the slides of the course. In the general case of this problem that we discussed in Quiz 1, different types of products 𝐾𝐾 = {1, … , |𝐾𝐾|} must be produced to cover the demands over a planning horizon 𝑇𝑇 = {1, … , |𝑇𝑇|} . The following parameters and variable are used by an operations research analyst to formulate the problem:
Parameters: 𝑑𝑑𝑘𝑘𝑘𝑘 : The demand of product 𝑘𝑘 in period 𝑡𝑡. 𝑝𝑝𝑘𝑘𝑘𝑘 : The per-unit production cost of product 𝑘𝑘 in period 𝑡𝑡. 𝑞𝑞𝑘𝑘𝑘𝑘 : The setup cost of producing product 𝑘𝑘 in period 𝑡𝑡. ℎ𝑘𝑘𝑘𝑘 : The per-unit holding cost of product 𝑘𝑘 in period 𝑡𝑡. 𝑎𝑎𝑘𝑘 : The initial inventory of product k at the beginning of planning horizon. 𝐶𝐶 : The limited capacity of the warehouse (in terms of m³). 𝑒𝑒𝑘𝑘 : The required space for one unit of product 𝑘𝑘 (in terms of m³).
Variables: 𝑥𝑥𝑘𝑘𝑘𝑘 : The amount of product 𝑘𝑘 to be produced in period 𝑡𝑡. 𝑠𝑠𝑘𝑘𝑘𝑘 : The inventory level of product 𝑘𝑘 at the end of period 𝑡𝑡. 𝑦𝑦𝑘𝑘𝑘𝑘 : 1 if product k is produced in period t, 0 otherwise.
Using this notation, the following model is proposed by the operations research analyst.
𝑚𝑚𝑖𝑖𝑚𝑚��𝑝𝑝𝑘𝑘𝑘𝑘𝑥𝑥𝑘𝑘𝑘𝑘 𝑘𝑘∈𝑇𝑇𝑘𝑘∈𝐾𝐾
+ ��𝑞𝑞𝑘𝑘𝑘𝑘𝑦𝑦𝑘𝑘𝑘𝑘 𝑘𝑘∈𝑇𝑇𝑘𝑘∈𝐾𝐾
+ ��ℎ𝑘𝑘𝑘𝑘𝑠𝑠𝑘𝑘𝑘𝑘 𝑘𝑘∈𝑇𝑇𝑘𝑘∈𝐾𝐾
(1)
𝑠𝑠𝑘𝑘(𝑘𝑘−1) + 𝑥𝑥𝑘𝑘𝑘𝑘 = 𝑑𝑑𝑘𝑘𝑘𝑘 + 𝑠𝑠𝑘𝑘𝑘𝑘 𝑡𝑡 ∈ 𝑇𝑇,𝑘𝑘 ∈ 𝐾𝐾 (2)
𝑠𝑠𝑘𝑘0 = 𝑎𝑎𝑘𝑘 𝑘𝑘 ∈ 𝐾𝐾 (3)
𝑥𝑥𝑘𝑘𝑘𝑘 ≤ 𝑀𝑀𝑘𝑘𝑘𝑘𝑦𝑦𝑘𝑘𝑘𝑘 𝑡𝑡 ∈ 𝑇𝑇,𝑘𝑘 ∈ 𝐾𝐾 (4) �𝑒𝑒𝑘𝑘𝑠𝑠𝑘𝑘𝑘𝑘 𝑘𝑘∈𝐾𝐾
≤ 𝐶𝐶 𝑡𝑡 ∈ 𝑇𝑇 (5)
𝑦𝑦𝑘𝑘𝑘𝑘 ∈ {0,1}
𝑡𝑡 ∈ 𝑇𝑇,𝑘𝑘 ∈ 𝐾𝐾 (6)
𝑥𝑥𝑘𝑘𝑘𝑘 , 𝑠𝑠𝑘𝑘𝑘𝑘 ≥ 0
𝑡𝑡 ∈ 𝑇𝑇,𝑘𝑘 ∈ 𝐾𝐾 (7)
In the above model, 𝑀𝑀𝑘𝑘𝑘𝑘 is the big-M value (9999999999).
The data for this problem are given in Inventory_problem.xlsx.
Question 2-Part a) Considering 𝑀𝑀𝑘𝑘𝑘𝑘 = 9999999999, report the Solution time, the obtained objective value, and the obtained solution.
Question 2-Part b) Considering 𝑀𝑀𝑘𝑘𝑘𝑘 = ∑ 𝑑𝑑𝑘𝑘𝑘𝑘′𝑘𝑘′∈𝑇𝑇:𝑘𝑘′≥𝑘𝑘 , report the Solution time, the obtained objective value, and the obtained solution. Note that 𝑀𝑀𝑘𝑘𝑘𝑘 = ∑ 𝑑𝑑𝑘𝑘𝑘𝑘′𝑘𝑘′∈𝑇𝑇:𝑘𝑘′≥𝑘𝑘 is not a constraint in the model. In fact, here we are tuning the values of 𝑀𝑀𝑘𝑘𝑘𝑘 with the hope that the model finds the solution faster. Question 2-Part c) The business owner has realized that he has two options;
1) pay $100,000 to increase the capacity of the warehouse by 10%. So, if he chooses this option the new capacity will be 1.1𝐶𝐶.
2) Does not pay this extra cost and stick the current warehouse and the obtained solution.
Which option do you recommend to the business owner?
Question 3- This question is about the Capacitated Facility Location Problem that is explained in the slides of the course. In a general case of this problem, different types of products 𝐾𝐾 = {1, … , |𝐾𝐾|} must be produced in facilities 𝐼𝐼 = {1, … , |𝐼𝐼|} and shipped to customers 𝐽𝐽 = {1, … , |𝐽𝐽|}. The following parameters and variable are used by an operations research analyst to formulate the problem:
Parameters: 𝑓𝑓𝑖𝑖 : The fixed cost of opening a facility at location 𝑖𝑖 ∈ 𝐼𝐼. 𝑐𝑐𝑘𝑘𝑖𝑖𝑗𝑗 The per-unit transportation cost of product 𝑘𝑘 from facility 𝑖𝑖 to customer 𝑗𝑗. 𝑑𝑑𝑘𝑘𝑗𝑗 : The demand of product 𝑘𝑘 by customer 𝑗𝑗. 𝑢𝑢𝑖𝑖 : The production capacity of facility 𝑖𝑖. 𝑎𝑎𝑘𝑘𝑖𝑖 : Amount of production capacity usage for one unit of product k in facility 𝑖𝑖.
Variables: 𝑧𝑧𝑖𝑖 : 1 if a facility is open at location 𝑖𝑖, 0 otherwise. 𝑥𝑥𝑘𝑘𝑖𝑖𝑗𝑗 : The amount of product 𝑘𝑘 shipped from facility 𝑖𝑖 to customer 𝑗𝑗.
Using this notation, the following model is proposed by the operations research analyst.
𝑚𝑚𝑖𝑖𝑚𝑚���𝑐𝑐𝑖𝑖𝑗𝑗𝑘𝑘𝑥𝑥𝑘𝑘𝑖𝑖𝑗𝑗 𝑗𝑗∈𝐽𝐽𝑖𝑖∈𝐼𝐼𝑘𝑘∈𝐾𝐾
+ �𝑓𝑓𝑖𝑖𝑧𝑧𝑖𝑖 𝑖𝑖∈𝐼𝐼
(1)
�𝑥𝑥𝑘𝑘𝑖𝑖𝑗𝑗 𝑖𝑖∈𝐼𝐼
= 𝑑𝑑𝑘𝑘𝑗𝑗 𝑗𝑗 ∈ 𝐽𝐽,𝑘𝑘 ∈ 𝐾𝐾
(2)
��𝑎𝑎𝑘𝑘𝑖𝑖𝑥𝑥𝑘𝑘𝑖𝑖𝑗𝑗 𝑗𝑗∈𝐽𝐽𝑘𝑘∈𝐾𝐾
≤ 𝑢𝑢𝑖𝑖 𝑖𝑖 ∈ 𝐼𝐼 (3)
𝑥𝑥𝑘𝑘𝑖𝑖𝑗𝑗 ≤ 𝑀𝑀𝑘𝑘𝑖𝑖𝑗𝑗𝑧𝑧𝑖𝑖 𝑡𝑡 ∈ 𝑇𝑇,𝑘𝑘 ∈ 𝐾𝐾 (4) 0 ≤ 𝑥𝑥𝑘𝑘𝑖𝑖𝑗𝑗 ≤ 𝑑𝑑𝑘𝑘𝑗𝑗 𝑘𝑘 ∈ 𝐾𝐾, 𝑖𝑖 ∈ 𝐼𝐼, 𝑗𝑗 ∈ 𝐽𝐽 (5) 𝑧𝑧𝑖𝑖 ∈ {0,1}
𝑡𝑡 ∈ 𝑇𝑇,𝑘𝑘 ∈ 𝐾𝐾 (6)
In (1), the objective function minimizes the total transportation of products plus the opening cost of facilities. Constraint (2) implies that demand of customer 𝑖𝑖 for product 𝑘𝑘 must be satisfied by the shipments from different facilities. Constraint (3) implies that the total production capacity in each facility is limited. Constraint (4) ensures that we can have production in a facility if that facility is open.
In the above model, 𝑀𝑀𝑘𝑘𝑖𝑖𝑗𝑗 is the big-M value (9999999999).
The data for this problem are given in Extended_CFLP.xlsx.
Question 3-Part a) Considering 𝑀𝑀𝑘𝑘𝑖𝑖𝑗𝑗 = 9999999999, report the Solution time, the obtained objective value, and the obtained solution.
Question 3-Part b) Considering 𝑀𝑀𝑘𝑘𝑖𝑖𝑗𝑗 = min ( 𝑢𝑢𝑖𝑖 𝑎𝑎𝑘𝑘𝑖𝑖
,𝑑𝑑𝑘𝑘𝑗𝑗), report the Solution time, the obtained objective
value, and the obtained solution. Note that 𝑀𝑀𝑘𝑘𝑖𝑖𝑗𝑗 = min ( 𝑢𝑢𝑖𝑖 𝑎𝑎𝑘𝑘𝑖𝑖
,𝑑𝑑𝑘𝑘𝑗𝑗) is not a constraint in the model. In
fact, here we are tuning the values of 𝑀𝑀𝑘𝑘𝑖𝑖𝑗𝑗 hoping that the model finds the solution faster.
Question 3-Part c) The business owner has realized that he has two options;
1) pay $300,000 to another company to satisfy the demands of all customers for product type 5. In this case, the business owner is not responsible to the transportation cost of that product, but must still minimize the total transportation cost of other products and also the opening of the facilities.
2) Does not pay this extra cost and stick the current plan and the obtained solution.
Which option do you recommend to the business owner?
Question 4- This question is about the Budgeted maximum coverage problem that is already explained in the slides of the course. The following parameters and variable are used by an operations research analyst to formulate the problem:
Sets: 𝐽𝐽 : The set of fire stations. 𝐼𝐼 : The set of communities.
Parameters: 𝑐𝑐𝑗𝑗 : The cost of opening fire station 𝑗𝑗.
𝐵𝐵 : The total available budget for opening fire stations. 𝑎𝑎𝑖𝑖𝑗𝑗 : 1 if fire station 𝑗𝑗 covers community 𝑖𝑖.
Variables: 𝑥𝑥𝑗𝑗 : 1 if fire station 𝑗𝑗 is opened; 0 otherwise. 𝑦𝑦𝑖𝑖 : 1 if community 𝑖𝑖 is covered, 0 otherwise.
Using this notation, the following model is proposed by the operations research analyst.
𝑚𝑚𝑎𝑎𝑥𝑥�𝑦𝑦𝑖𝑖 𝑖𝑖∈𝐼𝐼
(1)
�𝑐𝑐𝑗𝑗𝑥𝑥𝑗𝑗 𝑗𝑗∈𝐽𝐽
≤ 𝐵𝐵 (2)
𝑦𝑦𝑖𝑖 ≤�𝑎𝑎𝑖𝑖𝑗𝑗𝑥𝑥𝑗𝑗 𝑗𝑗∈𝐽𝐽
𝑖𝑖 ∈ 𝐼𝐼
(3)
𝑥𝑥𝑗𝑗 ∈ {0,1} 𝑗𝑗 ∈ 𝐽𝐽 (4) 𝑦𝑦𝑖𝑖 ∈ {0,1} 𝑖𝑖 ∈ 𝐼𝐼 (5)
The data for this problem are given in Budgeted_maximum_coverage_problem.xlsx.
What are the optimal solution and the optimal objective value?