12_Sim_Hw6_Sol

12_Sim_Hw6_Sol - IEOR 4404 Simulation Prof Mariana...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: IEOR 4404 Simulation Prof. Mariana Olvera-Cravioto Assignment #6 Solutions February 29, 2012 Page 1 of 1 Assignment #6 Solutions 1. Notice that (t) is upper bounded by 1. Hence, we set = 1 and run the following acceptance rejection algorithm: Let I be the number of events that have occurred by time t, and S(I) be the most recent event. (a) Set t = 0, I = 0. (b) Generate U1 Uniform[0,1]. (c) Set t = t - log (U1 ). If t > 10, stop, else go to the next step. (d) Generate U2 Uniform[0,1] independently from U1 . (e) If U2 (t), set I = I + 1, S(I) = t. (f) Return to (b). 2. See next page. 3. Based on the simulation report, the average waiting time (in minutes) are respectively 2.32, 0.00823, 0.8061; the utilization of each of the three servers are respectively 0.6811, 0.3928, 0.6310. The proportion of parts that pass the inspection is 74.6%. 4. The utilization of the drill press is 0.65. Regarding the waiting time (in mins) in the queue, the min value is 0, the max value is 15.6 and the average is 3.01. For the average sojourn time (in mins), the blue part is 6.83; the green part is 7.12; the red part is 5.76. 5. The average total time patient spend in the system is 104.33 mins. 6. For any time t 0, Prob(M (t) = m, W (t) = w) = P (M (t) = m, W (t) = w|M (t) + W (t) = m + w) P (M (t) + W (t) = m + w) e-t (t)m+w m+w = pm (1 - p)w m (m + w)! = e-tp (tp)m e-t(1-p) (t(1 - p))w m! w! The answer means both the processes of male arrival M (t) and female arrival W (t) are independent Poisson processes with rate p and (1 - p) respectively. 3. The variables needed are: (1) the entering time of each customer, denoted by E(i) for the ith customer. (2) the tolerance time length of each customer, denoted by R(i) for the ith customer. (3) the leaving time of each customer, denoted by L(i) for the ith customer. Some other variables could be (1) time t. (2) service time S. The events are: (1) new customer joins this system. (2) customer exits the system since the tolerance time is exceeded. (3) the server finishes the service for one customer. The updating procedures are: (1) when new customer joins this system, the number of customers increases by 1. (2) when the smallest tolerance length is less than the current service length, some customer exits the system and the number of customers decreases by 1. (3) when the tolerance length of the next customer is larger than the current service length, the server finishes the service for the current customer and the number of customers in the system decreases by 1. Since we are interested in estimating the average number of customers by time T , we record the time that each customer spends in the system. Remark: It is possible to understand this question as (a) the average number of customers that have been served by time T , or (b) the average number of customers staying in the system during the interval [0, T ]. Here we deduce the algorithm for (b), while the algorithm for (a) can be obtained by simplifying several steps in the algorithm for (b). Step 1: I = 0, t = 0, the value of T . Step 2: According to the arrival process, generate the nonhomogeneous Poisson process. The procedure is like that in Problem 2. Now we have the total number of customers N that could be possibly involved before time T , and the entering time of each customer E(i), for i = 1, . . . , N . Step 3: According to distribution F , generate the tolerance time of each customer, R(i), for i = 1, . . . , N . Step 4: Initialize the leaving time of each customer in the case of not being served, L(i) = min(E(i) + R(i), T ), for i = 1, . . . , N . Once some customer is served, L() will be updated. Step 5: Record the arrival time set E = {E(i), for i = 1, . . . , N }. service starting time as S = min E. Step 6: According to G, generate the service time S. This service starts at S , the person served corresponds to min E, and service ends at S + S. If S + S > T , let L(arg min E) = T stop; else, Set L(arg min E) = S + S, go to step 7. Step 7: Update the waiting list E = E\{min E}, and also the customers whose tolerance time is exceeded, E = E\{e : e E and e < S + S}. If E = , stop; else go to step 8. Step 8: Set the next service time at S = max{S + S, min E}. Go to step 6. The average number of customers by time T is the average of N i=1 [L(i) - E(i)] T ...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online