solve this file
INDU6121: 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?