Question: we need to use these following chapter slides to complete the question below is the slides (10 pts) In pseudocode, write a program to carry
we need to use these following chapter slides to complete the question below is the slides







(10 pts) In pseudocode, write a program to carry out the simulation specied in the Slides #2429 of the PowerPoint Chapter_05_Simulation.pptx. The program does not need to generate Table 6.2 and Figure 6.7. Instead, the program should use arrays to keep the relevant data and simulate 50 customers according to the given assumptions, so as to estimate the average waiting times corresponding to the two models of pump. Simulation example People waiting to get water from a pump. Let T be the inter-arrival time between the ith customer and the previous one, so Customers arrival: T1, T1+T2, TitT2+T3, ... Their service times: S,, S2, $3, . . . The pump capacity v is a model parameter to be determined, and S; = R; / v for all i, where R; is the demand of the ith customer.Simulation example (2) An analysis of the situation leads to the following assumptions: Inter-arrival times: every T; has an Exp(0.5) distribution (minutes) Service requirement: every R; has a U(2, 5) distribution (liters)Simulation example (3 Let W; be the waiting time of the ith customer: W; = max{Wing +S;, - T;, O}. - Wi-1 - Si-1 Wi = Wi-1+ Si-1 - Ti Ti Wi Arrival of Arrival of Departure of customer i - 1 customer i customer i - 1 Wi-1 Si-1 Wi =0 Ti Arrival of Departure of Arrival of customer i - 1 customer i - 1 customer iSimulation example (4) Table 6.2. Results of a. short simulation. Input realizations v = 2 =3 '1: T3 AI'I' .time R1 Sf, W7, 85, W7, 1 0.24 0.24 4.39 2.20 0 1. 46 0 2 1.97 2.21 4.00 2.00 0.23 1. 33 0 3 1.73 3.94 2.33 1.17 0.50 0.78 0 4 2.82 6.76 4.03 2.01 0 1.34 0 5 1.01 7.77 4.17 2.09 1.00 1.39 0.33 6 1.09 8.86 4.24 2.12 1.99 1.41 0.63 Simulation example (5) Average of first n waiting times 2.5 2.0 1.5 1.0 0.5 0.0 O 10 20 30 40 50 n Fig. 6.7. Averaged waiting times at the well, for pump capacity 2 and 3.Simulation result the average waiting time is around 2.0 (minutes) When the pump capacity is 3 (liters/ minute) the average waiting time is around 0.5 (minutes)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
