Answered step by step
Verified Expert Solution
Question
1 Approved Answer
in R code There are no people in the queue at time t = 1, The number of customers joining the queue at each time
in R code
There are no people in the queue at time t = 1, The number of customers joining the queue at each time point follows a Poisson distribu- tion with rate X = 2, A fixed number of customers p1 = 20 leave the queue at times t = 10,20,30,40,50,...(i.e. every ten minutes), (Hint: use the modulo operator %%) When departures do occur, they happen after the arrivals which also occur at the same t, The bar stops serving alcohol when the size of the queue reaches the bar's capacity of 50 people; otherwise, the bar stays open 'forever'. (a) [12 marks] Write a while loop which determines the time t when the bar shuts down and the number of customers N, who were actually in the queue at this exact time. Do so by filling in the blanks in the code chunk below: > N join while (BLANK) { NStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started