QBUS 6820代写、代做Python编程设计
Prescriptive Analytics: From Data to Decision – QBUS 6820
Semester 1, 2025
Assignment 2
Issued: 2 May 2025
Submit date: Monday 19 May 2025 at 11:59pm
All problems to be submitted for assessment (20%)
Assignments must be typed. Handwritten assignments will not be accepted.
Submission of assignments is strictly through Canvas
For all the questions you are required to provide your Python Code (this can be done in
an appendix).
Question 1 (7 marks):
The owner of a commercial building has decided to renovate her facility. She has identified
the following activities that must be performed before she can reopen for business:
Activity Description Duration (in days) Predecessor activities
A New Plumbing 13
--
B Order/Rec Furniture 23
--
C Order/Rec Flooring 18
--
D Construct Partitions 8
--
E Paint & Wallpaper 8
A, D
F Install Furniture 6
E, B
G Install Flooring 7
E, C
H Move Inventory & Rec's 4
F, G
I Clean Old Shop 4
H
a. Draw the activity network for this problem (AON).
b. Provide the earliest and latest start and finish times, the slack for each activity, and identify
the critical activities (either on the network or in a table).
c. What is the duration of the project? Provide the critical paths(s).
d. Suppose that the owner has a binding contract stating that she must complete the
renovation within 32 days. The normal and crash times and costs for each activity are
summarized in the table below. Is it possible for her to complete the project within 20
days? If it is possible, at what cost? If it is not possible, what is the earliest time she can
complete the project and at what cost?
Activity
Normal Crash
Time (days) Cost (dollars) Time (days) Cost (dollars)
A 13
11,000 10 15,000
B 23
5,000 21 6,000
C 18
3,000 15 3,500
D 8
1,500 6 2,000
E 8
750 5 1,200
F 6
600 4 1,200
G 7
1,000 5 1,500
H 4
250 3 450
I 4 200 2 300
Question 2 (6 marks)
You are in charge of loading Cargo ships in Newcastle port. An agricultural commodities
dealer wants to transport the following products aboard a ship:
Commodity Amount available
(tons)
Volume per ton
(cubic feet)
Profits per ton ($)
1 48 4 7
2 30 2.5 5
3 15 3 6
4 18 4.5 8
You can select to load any and/or all of the available commodities. However, the ship has
three cargo holds with the following capacity restrictions:
Cargo hold Weigh capacity (tons) Volume capacity
(cubic feet)
Forward 32 180
Center 58 210
Rear 40 160
Only one type of commodity can be placed in any cargo hold (note that you can load the
same commodity in different cargos). However, because of balance considerations, the
weight in the forward cargo hold must be within 10% of the weight in the rear cargo hold
(this means that if the weight in the rear cargo is 10 tons, then that of the front cargo has
to be between 9 and 11 tons). In addition, the center cargo hold must be between 40% and
60% of the total weight on board.
Formulate an ILP model for the problem and solve it using Python.
Question 1 (7 marks):
A company needs to supply customers in 3 cities from its 3 warehouses.
The supplies,
demands and shipping costs (in dollars per unit) are shown below.
Destination
Warehouse 1 2 3 Supply
1 34 60 36 400
2 70 40 50 300
3 56 40 32 200
Demand 500 300 200
The company has identified the following goals:
Goal 1: The company would like to come as close as possible to satisfying its
customers demand. It would also like to come as close as possible to using the
warehouses supply.
Goal 2: It would like to ensure that the cost is approximately $60,000.
a. Formulate a goal programming model of this problem. Assume that your goal is to
minimize the sum of percentage deviations from your goals. You should assume that
warehouses hold 50 units of safety stock each (this means that they can use reserves
to increase their supply by 50 units. For example, Warehouse 1 would ideally supply
400 units, but can supply anywhere between 0 and 450 units).
b. Solve the problem using Python. Provide the Python code and clearly state your
solution.
c. How would your answer change if Goal 2 changes to $30,000? No need to
supply an addition Python code.