Simulation of an Inventory System
By twintowers
@twintowers (1)
Philippines
November 29, 2006 11:16pm CST
A company that sells a single product would like to decide how many items it should have in inventory for each of the next n months (n is a foxed input parameter). The times between demands are independent and identically distributed (IID) exponential random variables with a mean of 0.1 month. The sizes of the demands, D, are IID random variables (independent of when the demands occur), with
D =
1 w.p. 1/6
2 w.p. 1/3
3 w.p. 1/3
4 w.p. 1/6
where w.p. is read “with probability.”
At the beginning of each month, the company reviews the inventory level and decides how many items to order from its supplier. If the company orders Z items, it incurs a cost of K + iZ, where K = $32 is the setup cost and i = $3 is the incremental cost per item ordered. (If Z = 0, no cost is incurred.) When an order is placed, the time required for it to arrive (called delivery lag or lead time) is a random variable that is distributed uniformly between 0.5 and 1 month.
The company uses the a stationary (s, S) policy to decide how much to order, i.e.,
Z =
S - I if I s
where I is the inventory level at the beginning of the month.
When a demand occurs, it is satisfied immediately if the inventory level is at least as large as the demand. If the demand exceeds the inventory level, the excess of demand over supply is backlogged and satisfied by future deliveries. (In this case, the new inventory level is equal to the old inventory level minus the demand size, resulting in a negative inventory level.) When an order arrives, it is first used to eliminate as much of the backlog (if any) as possible; the remainder of the order (if any) is added to the inventory.
So far, we have discussed only one type of cost incurred by the inventory system, the ordering cost. However, most real inventory systems also have two additional types of costs, holding and shortage cost, which will be tackled after some additional notation. Let I(t) be the inventory level at time t [note that I(t) could be positive, negative, or zero]; let I+(t) = max{I(t), 0} be the number of items physically on hand in the inventory at time t [I+(t) 0]; and let I-(t) = max{-I(t), 0} be the backlog at time t [I-(t) as well]. The time points at which I(t) decreases are the ones at which demands occur.
For our model, we shall assume that the company incurs a holding cost of h = $1 per item per month held in (positive) inventory. The holding cost includes such costs as warehouse rental, insurance, taxes, and maintenance, as well as the opportunity cost of having capital tied up in inventory rather than invested elsewhere. We have ignored in our formulation the fact that some holding costs are still incurred when I+(t) = 0. However, since our goal is to compare ordering policies, ignoring this factor, which after all is independent of the policy used, will not affect our assessment of which policy is best. Now, since I+(t) is the number of items held in inventory at time t, the time-average (per month) number of items held in inventory for the n-month period is
I+ = n
I+(t) dt
0
Thus, the average holding cost per month is hI+.
Similarly, suppose the company incurs a backlog cost of ? = $5 per item per month in backlog; this accounts for the cost of extra record keeping when a backlog exists, as well as loss of customer’s goodwill. The time-average number of items in backlog is
I- = n
I-(t) dt
0
So the average backlog cost per month is ?I-.
Assume that the initial inventory level is I(0) = 60 and that no other order is outstanding. We simulate the inventory system for n = 120 months and use the average total cost per month (which is the sum of the average ordering cost per month, the average holding cost per month, and the average shortage cost per month) to compare the following nine inventory policies:
s 20 20 20 20 40 40 40 60 60
S 40 60 80 100 60 80 100 80 100
The state variables for a simulation model of this inventory system are the inventory level I(t), the amount of an outstanding order from the company to the supplier, and the time of the last event [which is needed to compute the areas under the I+(t) and I-(t) functions].
Requirements:
For this problem, pass the following:
a) event graph, inventory model
b) flowchart for the order-arrival routine, inventory model
c) flowchart for demand routine, inventory model
d) flowchart for inventory-evaluation routine, inventory model
e) flowchart for routine to update the continuous-time statistical accumulators, inventory model
f) program code for the external definitions, inventory model
g) program code for the main function, inventory model
h) program code for the initialize function
i) program code for the order_arrival function
j) program code for the demand function
k) program code for the evaluate function
l) program code for the report function
m) program code for the update¬_time_average_statistics function
n) program code for the random_integer function
o) output of the running program
p) analysis based on the given output
No responses
