The University of Edinburgh
First Semester, 2018-19
SCIENTIFIC COMPUTING
Homework Assignment
Total Marks: 100
Instructions
1. The strict deadline for submitting the assignment on Learn is 17:00 on 3 December, 2018.
Upload the pdf file of your report under “Homework Assignment - Report”.
Upload a zip file containing all files that you wrote, including again the pdf file of your report,
under “Homework Assignment - Files”.
Each file name must start with your UUN, e.g., s1234567_report.tex.
2. This is an individual assignment and not a group assignment.
3. You should attempt all questions.
4. Apart from writing code in Matlab, you have to write a report of your work using LATEX.
Add a title page to your report, including your full name, UUN, and the date of submission.
Choose an appropriate title.
Use the same numbering for your answers as for the questions and add a table of contents.
For each question, explain in the report what your are doing in a concise but reproducible
way. Write full sentences!
5. If requested, use LATEX’s verbatim environment to include the Matlab codes in your document.
The codes must be included under the respective questions.
6. Add comments to your Matlab code and try to write your programs as simple and efficient
as possible. Marks will be deducted if comments are missing or functions and algorithms are
unnecessarily complicated.
All submissions will be processed by Turnitin to check for plagiarism.
CONTINUED
– 2 –
Inventory Management
You have just been contacted by an old friend who manages the warehouse of the B2B wholesaler
WeHaveItAll. Among the many tasks your friend has to deal with, one of the most important
ones, probably even THE most important one, is to decide which products to store and in which
quantities. Properly planning the product portfolio on stock and managing the stored quantities is
crucial for the economic success of the wholesaler, as it has a massive impact on the level of service
WeHaveItAll can provide to their business customers and their willingness to keep ordering with
WeHaveItAll in the future.
The warehouse that is managed by your friend keeps a wide range products on stock. The
wholesaler buys the products from external suppliers and sells them exclusively to companies, i.e.,
it’s a pure B2B – business-to-business – wholesaler. For a given product, the number of units of
the product that are currently on stock is called the inventory level of the product. Typically,
WeHaveItAll’s customers submit orders by email or through telephone. An order comprises one or
more products and for each product one or more units are requested. If the desired quantity of all
requested products is on stock, then your friend can directly tell the customer that he can expect
the delivery of the order on the next working day. Such a speedy delivery makes customers very
happy. If, on the other hand, the inventory level of at least one of the products included in the
order is below the requested quantity, then your friend has to tell the customer that he has to wait
a few days until the delivery arrives. Such a situation is called a stock out. To replenish the stock
for the missing product(s), your friend has to place an order with the respective supplier(s). The
number of days it takes for the delivery of the supplier to arrive at WeHaveItAll warehouse is called
the lead time. Once the delivery has arrived, your friend can then process the order of the customer
and send it out. An order that cannot be delivered immediately to a customer is called a backlogged
order or simply a backlog. Placing an order with a supplier incurs a cost for your friend. This
cost, called ordering cost or setup cost consists of direct costs, like shipping fees, as well as indirect
costs, for example, the time your friend spends on placing the order and checking its delivery. Not
unsurprisingly, having to wait for the delivery makes customers unhappy. However, WeHaveItAll’s
customers are usually willing to wait, provided that these stock-outs do not happen too often. To
make up for the waiting time, WeHaveItAll offers a fixed compensation for each backlogged order.
This compensation is called the shortage cost.
It should be clear that your friend wants to make customers as happy as possible. As demand
is uncertain, she is aware that it will not be possible to rule out stock-outs completely, or only at
great expense. To reduce likelihood of stock-outs, she submits a new order to a supplier well before
the inventory level of a product hits zero, and, thus, a stock-out is very likely. The inventory level
at which a new order is triggered with a supplier is called the reorder level or reorder point and the
amount of the product being order is called the order quantity. Finally, every unit of product that
is on stock at the end of a day also incurs a cost, the so-called (inventory) holding cost. This cost
comprises direct costs, like insurance fees or spoilage costs, but also indirect costs, for example,
capital costs.
Your friend now needs help with deciding for each product where to set the reorder point and
how much to order every time, so that the total setup, shortage, and holding costs are minimal. A
solution for this problem is also called an inventory policy.
Can you help her?
CONTINUED
– 3 –
Your friend has specified the following setting for her problem:
A week consists of five working days and the wholesaler accepts customer orders between 9
am and 5 pm. Any order received within this time will be sent out to the customer on the
same day, provided there is no stock-out, and will typically arrive on the next working day.
You only have to consider a single product.
For this product, the setup cost amounts to £55 per order, the shortage cost is £10 per
backlogged order, and the holding cost per unit of product per day is £0.1.
Currently, she uses a reorder level of 300 units and an order quantity of 1200 units.
Once she has placed an order with her supplier for the product, it takes four working days
for the delivery to arrive at WeHaveItAll’s warehouse, i.e., the lead time is four days. For
example, if your friend orders on Monday, the replenishment arrives on Friday, if she orders
on Wednesday, it arrives on Tuesday the following week.
You can assume that the delivery of the supplier arrives before 9 am, i.e., you have the
products already available for serving customer orders on that day.
In addition, she also immediately places an order if an incoming delivery could not raise the
inventory level up to the reorder level. For example, if the total number of outstanding units
from backlogged orders is 985, then a delivery from the supplier would raise the inventory
level only to 215 units (215 = 1200 ? 985), which is below the reorder level.
An order to the supplier has to consist of at least 500 units, but no more than 2,500 units.
Moreover, she has to order in multiples of 100 units.
She has given you a data sets that comprises orders involving this product from the last 50
weeks, and includes in total 3000 orders. For each order, the data set shows:
– the id or internal number of the order,
– the day on which the customer made this order,
– the time of the day where the order was placed, i.e., a time between 9:00 and 17:00
(times are given as fractional numbers, i.e., 11.5 means 11:30), and
– the number of units ordered.
The data can be found in the CSV file Orders_50_3000.csv on Learn. The first few lines
are:
Id,Day,Time,Quantity
1,1,8.1968,17
2,1,12.08,33
That is, the first order has the id 1, was placed on day 1 at 8.19 ≈ 8:12, and the customer
was requesting 17 units.
You can assume for your analysis that 1,000 units are on stock at the end of day 0, i.e.,
before the data set “kicks off”.
CONTINUED
– 4 –
If not mentioned otherwise, explain in your report what you did for each of the following questions.
Questions
(1) Explain the problem your friend is facing in your own words in the report. [5]
(2) Write a user-defined function that computes the total cost for the current inventory policy used
by your friend, i.e., for a reorder level of 300 and an order quantity of 1,200.
Try to make your function as flexible as possible and add comments.
Test your function with the given data set and include in your report the total costs of this
policy, as well as the individual setup, shortage, and holding costs. [25]
(3) Now that you have a function to compute the cost of a given inventory policy, you can start to
optimise.
Determine a cost minimal reorder level and order quantity for the given data set.
Include in your report the reorder level and order quantity of this policy and its total costs, as
well as the individual setup, shortage, and holding costs. [10]
(4) At the moment, your friend compensates a customer with £10 if his order does not arrive
on the following day. While this is a nice gesture of recompense, it will only do its job if
these stock-out do not happen too often; because if it does, customers will get disgruntled and,
ultimately, decide to look for another wholesaler to serve them.
A very common performance indicator for stock-outs in practice is the so-called service level,
which come in different forms. One of the most common ones computes the percentage of all
orders that can be sent out immediately to customers. For example, if 3 out of 20 orders are
backlogged, the policy has a 85% service level.
(a) Compute the service level for the current policy used by your friend as well as the optimised
policy you derived in Part (3). [2]
(b) Often, companies try to achieve a service level of at least 90%, if not more.
Find an inventory policy that reaches a service level of 90%, i.e., at most 10% of all orders
are delivered late, and has minimal costs.
Include in your report the reorder level and order quantity of this policy and its total costs.
[4]
(c) Talking to your friend, she’s not sure which service level she should aim for, as it is difficult
to determine a service level will make customers happy and at the same time is not too
costly.
Therefore, she has asked you to recommend her a set of 3-4 alternative policies that provide
a good trade-off between costs and service levels.
Include in your report the reorder levels and order quantities of these policies, together
with their service levels and total costs. Explain why you chose exactly those for your
recommendation. [9]
CONTINUED
– 5 –
(5) Coming back to the original setting, i.e., not taking service levels into account anymore, your
friend tells you that the lead time of four days that she mentioned to you is just an average
value. Factually, the lead time has varied between 2 and 6 days in the past year.
On enquiry, she tells you that any number of days within this interval is equally likely. That
is, you can assume that the lead time follows a uniform discrete distribution over [2 : 6].
(a) Adapt the function you wrote in Part (2) to account for random lead times.
Determine a new reorder level and order quantity for the given data set that minimises the
total costs.
Would you still recommend the inventory policy you determined in Part (3)? If not, which
policy would you recommend her?
Justify your recommendation. [13]
(b) Your friend has told you that the supplier has offered her the status of preferred customer.
As a preferred customer, she would receive a delivery within at most 5 working days (and
not 6, as it is the case at the moment). However, this special status does not come for free.
The suppliers would charge your friend £1,500 per year for that.
Would you recommend her to accept the offer of preferred customer status?
Explain why. [2]
(6) We again consider the original setting, i.e., we ignore the previous two questions.
Now that you have found the best policy for the current data set, your friend wants to know
how well this policy will perform in the future.
(a) First, use the concept of training, validation and test sets to determine a policy, and then
asses of how well the selected policy performs for yet unknown order sets.
Explain in your report how you split the set of orders into these sets and for which purpose
you used each set, if at all. Moreover, include the experimental results. [8]
(b) Finally, randomly generate two data sets of orders of similar size and scale.
To that end try to identify key characteristics of the given data set and reflect it in your
generation method.
Explain in your report how you approached this and what findings you made.
Then use the two data sets to assess how well the least-cost policy you derived in Part (3)
performs for yet unknown order sets.
Remark: you only have to check for uniform, normal, or beta distributions. [12]
(c) Based on the results in the previous two questions, recommend a policy to your friend.
Explain to her why you chose it. [5]
The remaining five marks will be awarded based on the layout and style of your pdf and your
proficiency with LATEX. [5]
* * * End * * *
Good luck – Gun t`eid leat!
版权所有:编程辅导网 2021 All Rights Reserved 联系方式:QQ:99515681 微信:codinghelp 电子信箱:99515681@qq.com
免责声明:本站部分内容从网络整理而来,只供参考!如有版权问题可联系本站删除。