[Solved]General Instructions Write Program Use Queues Simulate Theme Park Waiting Line N Number Ri Q37291098
General Instructions:
Write a program that will use queues to simulate a Theme ParkWaiting Line for n number of rides. Guests wil arrive at the ThemePark at an average rate (probability). Each ride will take acertain amount of time, according to a random distribution. As eachguest arrives, they will decide which ride to go on (including fastpass access). A newly arriving guess will randomly pick a ride togo on. The object then is to find a most popular ride before theTheme Park closes. Since probability is a factor, we will assumethat “one hour” of operation to analyze our objective.
Specific Instructions:
The theme park will have of total 10 rides. The dynamicimplementation of the queue ADT is recommended. In fact, the linesat each ride themselves are ADT. Calculate the lines at each rideto find statistics such as -arrival rate, duration of service, etc.The program will have a global “clock” which will be initialized tozero and increment by one for each simulated minute. For eachminute, there will be a user-entered probability of an arrival.That is, there is a probability, say 0.20 (between 0 and 1.0) of aguest arrives at the theme park. So for each clock “tick”, a randomnumber will be generated. See below for details on arrivals andtimes of each ride.
Riders arrival:
50% no arrival
40% 1 arrival
10% 2 arrivals
Time on Rides: Minimum 1 minutes, Maximum 5 minutes
Note: You will interactively enter your own choices
Riders arrival:
0.0 <= random number < 0.50 (assign to Fast Pass Line)
0.7 <= random number < 0.90 (assign to Regular Line)
Number of Rides: Randomly generated
The program then involves the following:
1. Initialize the clock, the queue, and the queue statistics
2. Repeat
A) Advance the clock
B) Continue to service current guest(s)
C) Check for new arrival: if arrival then set all parameters andenqueue at any minimum length queue
D) Until stability of number of queues hold for an “hour”
Hand in several different runs, each with different statistics.When a run completes, output the statistics i.e. probability of anarrival, the required number of queues, average waiting time, andthe amount of time (in “hours and minutes”) to settle. Be sure toperform three or more runs with the same statistics.
Sample Simulations:

^Fig 1: Simulation @ Time 3

^Fig 2: Simulation @ Time 9

^Fig 3 @ Time 23

^Fig 4: Simulation @ Time 46

^Fig 5: Simulation @ Time 60
Thank you for your help! <3
Tine:3 Nusber of Rides: 4 Statistics Average Waiting Tine Number of Happy Riders Average Tine Spent 1e Maximun Waiting Tine 15 Rides In Session Waiting Lines Ride 1-1 nin(s) 3 riders Fast Pass Regular Ride 2-1 min(s)3 riders Ride 3 3 min(s) 1 riders Ride 4 3 min(s) 1 riders Fast Pass Regular Fast Pass Regular Fast Pass Repular My Theme Park Time: 9 Number of Rides: 4 Statistics Average Waiting Tine Average Time Spent 19 Maximun Waiting Time 15 Number of Happy Riders Rides In Session RENE(7 F) on ride 3 Waiting Lines Ride 2-1 sin(s) [1 riders Ride 3-3 min(s) 1 riders Rİde 4-3 “in(s) [ 1 riaers ] Ride 1 1 min(s) 3 riders ] Fast Pass Regular Fast Pass Repular Fast Pass Regular Fast Pass Regular Time: 23 Number of Rides: 4 Statistics Average Waiting Time Maximun Waiting Tine 15 Number of Happy Riders Average Time Spent 19 Rides In Session OULIETTE(17-F) on ride Waiting Lines Ride 4-3 min(s) 1 riders Ride 1 1 min(s) 3 riders Fast Pass Regular Ride 2 1 min(s) 1 riders Ride 3- 3 mins) 1 riders 1 Fast Pass Regular BASILIA(20 F) Fast Pass Regular Fast Pass Regular BRYNN(22-R) My Theme Park Tine: 46 Nunber of Rides: 4 Statistics Average Waiting Tine Average Tine Spent 10 Maxinum Waiting Time 15 Number of Happy Riders 19 Rides In Session ANGELO(48 F) on ride 2 Naiting Lines Ride 3 3 ins) 1 riders Ride 1 1 min(s) 3 riders ] Fast Pass Regular Ride 2 1 min(s) 1 riders ] Ride 4 3 min(s) t 1 riders 1 Fast Pass Regular Fast Pass Regular Fast Pass Regular KA(44 F) GISELLE (45 -R) Tine: 68 Number of Rides: 4 statistics Average Waiting Tise Number of Happy Riders 25 Maximum Waiting Time 15 Average Time Spent 10 Rides In Session VERENA(58 F) on ride 1 ONITA56-F) on ride3 Waiting Lines ide 2-1 sin(s) riders Ride 3-3 mins) riders Rise 4 . 3 “in(s) [ 1 riders Ride 1 1 min(s) 3 riders Fast Pass Regular Fast Pass Regular Fast Pass Regular Fast Pass Regular Show transcribed image text Tine:3 Nusber of Rides: 4 Statistics Average Waiting Tine Number of Happy Riders Average Tine Spent 1e Maximun Waiting Tine 15 Rides In Session Waiting Lines Ride 1-1 nin(s) 3 riders Fast Pass Regular Ride 2-1 min(s)3 riders Ride 3 3 min(s) 1 riders Ride 4 3 min(s) 1 riders Fast Pass Regular Fast Pass Regular Fast Pass Repular
My Theme Park Time: 9 Number of Rides: 4 Statistics Average Waiting Tine Average Time Spent 19 Maximun Waiting Time 15 Number of Happy Riders Rides In Session RENE(7 F) on ride 3 Waiting Lines Ride 2-1 sin(s) [1 riders Ride 3-3 min(s) 1 riders Rİde 4-3 “in(s) [ 1 riaers ] Ride 1 1 min(s) 3 riders ] Fast Pass Regular Fast Pass Repular Fast Pass Regular Fast Pass Regular
Time: 23 Number of Rides: 4 Statistics Average Waiting Time Maximun Waiting Tine 15 Number of Happy Riders Average Time Spent 19 Rides In Session OULIETTE(17-F) on ride Waiting Lines Ride 4-3 min(s) 1 riders Ride 1 1 min(s) 3 riders Fast Pass Regular Ride 2 1 min(s) 1 riders Ride 3- 3 mins) 1 riders 1 Fast Pass Regular BASILIA(20 F) Fast Pass Regular Fast Pass Regular BRYNN(22-R)
My Theme Park Tine: 46 Nunber of Rides: 4 Statistics Average Waiting Tine Average Tine Spent 10 Maxinum Waiting Time 15 Number of Happy Riders 19 Rides In Session ANGELO(48 F) on ride 2 Naiting Lines Ride 3 3 ins) 1 riders Ride 1 1 min(s) 3 riders ] Fast Pass Regular Ride 2 1 min(s) 1 riders ] Ride 4 3 min(s) t 1 riders 1 Fast Pass Regular Fast Pass Regular Fast Pass Regular KA(44 F) GISELLE (45 -R)
Tine: 68 Number of Rides: 4 statistics Average Waiting Tise Number of Happy Riders 25 Maximum Waiting Time 15 Average Time Spent 10 Rides In Session VERENA(58 F) on ride 1 ONITA56-F) on ride3 Waiting Lines ide 2-1 sin(s) riders Ride 3-3 mins) riders Rise 4 . 3 “in(s) [ 1 riders Ride 1 1 min(s) 3 riders Fast Pass Regular Fast Pass Regular Fast Pass Regular Fast Pass Regular
Expert Answer
Answer to General Instructions: Write a program that will use queues to simulate a Theme Park Waiting Line for n number of rides. … . . .
OR

