Question: please show me how to write pseudocode for a program to carry out the simulation specified in the Slides pictures #26-31. The program does not

please show me how to write pseudocode for a program to carry out the simulation specified in the Slides pictures #26-31. The program does not need to generate Table 6.2 and Figure 6.7. Instead in the lab slide pictures, 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.

There is an example pseudocode format in the collage of pictures

please show me how to write pseudocode for a program to carry

Simulation example 26 27 Simulation example (2) People waiting to get water from a pump. Let Simulation example (3) T be the inter-arrival time between the ith An analysis of the situation leads to the customer and the previous one, so following assumptions: Inter-arrival times: every T, has an Exp(0.5) Let W; be the waiting time of the ith customer: Customers arrival: Ty, T,+Ty, T,+To+Ty ... Their service times: $1 52 distribution (minutes) W; = max{Wi 1 + S; 1 - I;, 0}. The pump capacity v is a model parameter to Service requirement: every R; has a U(2, 5) be determined, and S; = R / v for all i, where R distribution (liters) - Wi-1 Si-1 Wi = Wil + Si-1 -ni is the demand of the ith customer. 27 Arrival of Arrival of Departure of customer i - 1 customer : customer i - 1 29 Wi-1 Si-1 - Wi =0 T Simulation example (4) Arrival of Departure of Arrival of customer i - 1 customer i - 1 customer Table 6.2. Results of a short simulation. 28 Input realizations v = 2 v = 3 Arr.time Ri Si i Si Wi 1 0.24 0.24 4.39 2.20 0 1.46 0 1.97 2.21 4.00 2.00 0.23 1.33 0 80 3 1.73 3.94 2.33 1.17 0.50 0.78 0 Simulation example (5) This is what psedocode should look like 4 2.82 6.76 4.03 2.01 0 1.34 0 Example: 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 Ber(p) Average of first n waiting times 2.5 - U = U (0, 1) 2.0 - 31 if ( u

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Mathematics Questions!