B. Maddah ENMG 622 Simulation 11/04/08 Discrete Event and Process Oriented Simulation (2) Discrete event hand simulation of an (s, S) periodic review inventory system Consider a retailer who sells a commodity having a random weekly demand D. At the beginning every week, the retailer reviews the inventory level of the commodity, and computes the inventory position. The inventory position is defined as the inventory on-hand plus on-order minus backlogged demand. If the inventory position is less or equal than the reorder point s, an order is placed to raise the inventory to the order-up-to level S. An order has a fixed cost of K dollars and a variable cost of c $/unit. Note that since all demand is going to be met, we will ignore the variable ordering cost. An order has a lead time of L weeks, and is assumed to be delivered at the beginning of the week. Demand is assumed to occur at the end of the week. If demand in a week exceeds the on-hand inventory at the beginning of the week, then excess demand is backlogged. 1
When an order arrives (at the beginning of a week), it is immediately used to meet backlogged demand (if any). Backlogged demand at the beginning of a week has a penalty cost of p $/unit/week. On-hand inventory at the beginning of a week incurs a holding cost of h $/unit/week. In a discrete-event simulation of this system, the events are 1. Start of the simulation. 2. Arrival of an order at the beginning of a week. 3. Placing an order at the beginning of a week 4. Demand for the product at the end of a week. 5. End of the simulation after n weeks. Inventory Level S s Net Inventory L L Time Inventory Position 2
In the following, we will do a simple hand simulation in tabular form assuming that random demands have been generated for the n weeks. The objective of the simulation is determining the optimal (s, S) policy that minimizes weekly cost. Let o I t = the net inventory (inventory on hand or amount backordered), at the beginning of week t ; o D t = Demand at the end of week t ; o O t = Amount ordered at the beginning of week t. Then, It+ 1 = It + Ot L Dt, t = 2,3, K We will set I 1 = S, assuming that the system starts fully stocked. Note that I t may be < 0, in the event of a backlog. For example, Suppose S = 69, s = 45, demand is Poisson (λ = 18), h = 1, p = 9, K = 32, L = 2 periods and n = 15. First, we generate demand for 15 weeks based on the Poisson distribution (see below). Let H t, P t, and OC t be the holding, penalty, and ordering cost incurred in a week, and let IP t be the inventory position at the beginning of week t. 3
Then, the hand simulation is as follows. S s L K h p 69 15 2 32 1 9 Week, t I t IP t D t O t H t P t OC t 1 69 69 18 0 69 0 0 2 51 51 23 0 51 0 0 3 28 28 10 0 28 0 0 4 18 18 12 0 18 0 0 5 6 6 13 63 6 0 32 6-7 56 14 0 0 63 0 7 42 42 15 0 42 0 0 8 27 27 20 0 27 0 0 9 7 7 8 62 7 0 32 10-1 61 16 0 0 9 0 11 45 45 17 0 45 0 0 12 28 28 22 0 28 0 0 13 6 6 16 63 6 0 32 14-10 53 19 0 0 90 0 15 34 34 20 0 34 0 0 Σ 361 162 96 Mean weekly cost $41.3 Arena (process oriented) simulation of serial and parallel processing (Section 3.5 KSS). Applications arrive to a loan application office according to a Poisson process with rate λ = 1/1.25 applications/hour. The processing of each application requires four steps: Credit check, preparing covenant, pricing, and fund disbursement. 4
The office has four employees (Alfie, Betty, Chuck and Doris, if you care). Each employee can handle any of the four loan processing steps in an exponentially distributed time with mean 1 hour. The main question here is how to assign employees to tasks. Should employees be allocated in series with each employee handling one step of the loan processing? λ = 0.8 μ = 1, C S 2 = 1 μ = 1, C S 2 = 1 μ = 1, C S 2 = 1 μ = 1, C S 2 = 1 Or, should all employees work together in parallel with an employee handling an application from A to Z? μ = 1/4, C S 2 = 1/4 λ = 0.8 5
Parallel system seems to be better because (i) employees will have less idle times; and (ii) service time variability is less (as measured by C 2 S, the coefficient of variation). Series system could have some advantage such as improving the efficiency of dedicated employees due to learning. But learning is not considered here. The simulation of both systems in Arena for 16,000 hours to confirm these claims. The total waiting time in queue (delay) is 17.28 hours in the series system and 2.12 hours in the parallel system, indicating that the parallel system is much more efficient. Validation of the series vs. parallel problem If you still don t believe that parallel is better in this case, we ll do an analytical validation/verification of the simulation results. The mean delay in the series system is computed from an exact analytical expression by utilizing the following fact. Fact 1. The departure process from an M/M/c queue with arrival rate λ is a Poisson process with rate λ. Each station of the series system can be seen as a M/M/1. 6
The mean delay in the series is therefore, 1/1.25 0.8 W (series) = q 4 Wq( M / M /1) = ρ 4 4 4 16 hrs. μ λ = 1 1/1.25 = 0.2 = The mean delay in the parallel (M/GI/4) system is computed approximately using the following facts. Fact 2. The sum of k independent exponential random variables with mean 1/μ is an Erlang random variable with mean k/μ and variance k/μ 2. Fact 3. The mean delay in an M/M/c queue is c a Wq ( M / M / c) = 2 p0, c!( cμ) (1 ρ) where a = λ/μ and c 1 n c a a p0 = P{0 customers in system} = +. n= 0 n! c!(1 ρ) Fact 4 (QNA approximation). (i) The mean delay in a GI/GI/c queue can be approximated by 2 2 CA + C S Wq( GI / GI / c) Wq( M / M / c), 2 where C 2 A and C 2 S are the coefficients of variation of interarrival and service times, and W q (M/M/c) is the mean delay in an M/M/c with the same mean inter-arrival and service times. 1 7
2 (ii) The approximation in (i) is valid for small values of C A and C 2 S. (For M/M/c, C 2 A = C 2 S = 1. Values in the ball park of 1 are ok.) In the case of our parallel system, C 2 A = 1, and C 2 S = 1/4 (by Fact 2), and the QNA approximation is likely to be valid. Then, the mean delay in the system can be approximated by 1+ 1/4 Wq(parallel) Wq( M / M / 4), 2 where, with λ = 0.8, μ = 1/4, a = λ/μ = 3.2 and ρ = a/c = 0.8, by Fact 3, 4 3 4 1 c 2 3.2 3.2 3.2 Wq ( M / M / c) = 2 + 4[4(1/ 4)](1 0.8) n= 0 n! 4!(1 0.8) = 2.98 hrs. Then, W q (parallel) = 1.86 hrs. 8