Is it possible to calculate waiting times for all arrivals (finished = true and finished = false)?

29 views
Skip to first unread message

Mick Kam

unread,
Oct 4, 2023, 12:29:39 AM10/4/23
to simmer-devel
Hi,
I am learning how to use simmer and would like to calculate waiting times for all arrivals. Is this possible? 

I want to simulate a program where service tokens are released weekly and customers join the queue every business day. This means that if say on average 30 customers join daily for 5 days in week 1, there will be 150 customers who have joined the queue. If 100 service tokens are made available on day 1, and tokens issued on first come first served basis, the first 100 customers will be served and 50 will remain on the queue. so at end of week 1, the maximum waiting time would be 3 days. The table below assumes 30 arrivals every business day for week 1 and 40 arrivals every business day for week 2. 100  and 150 service tokens are released on days 1 and 8 respectively.  I want to simulate for a full year, two week example provided below. Assuming the average number of days to use up the service token is 10 days

I have attempted to use simmer, with get_mon_arrivals(ongoing = TRUE) but since there are no activity times for those not served (finished == FALSE), it's not possible to calculate waiting times and number of clients on queue (unserved) for all arrivals. I am just learning simmer and not sure if there's a way to achieve this yet.  Any help or pointers will be most appreciated. thanks!


image.PNG

Iñaki Ucar

unread,
Oct 5, 2023, 5:01:34 AM10/5/23
to simmer...@googlegroups.com
On Wed, 4 Oct 2023 at 06:58, Mick Kam <kn4...@gmail.com> wrote:
Hi,
I am learning how to use simmer and would like to calculate waiting times for all arrivals. Is this possible?

Sure. waiting_time = end_time - start_time - activity_time
 
I want to simulate a program where service tokens are released weekly and customers join the queue every business day. This means that if say on average 30 customers join daily for 5 days in week 1, there will be 150 customers who have joined the queue. If 100 service tokens are made available on day 1, and tokens issued on first come first served basis, the first 100 customers will be served and 50 will remain on the queue. so at end of week 1, the maximum waiting time would be 3 days. The table below assumes 30 arrivals every business day for week 1 and 40 arrivals every business day for week 2. 100  and 150 service tokens are released on days 1 and 8 respectively.  I want to simulate for a full year, two week example provided below. Assuming the average number of days to use up the service token is 10 days

I have attempted to use simmer, with get_mon_arrivals(ongoing = TRUE) but since there are no activity times for those not served (finished == FALSE), it's not possible to calculate waiting times and number of clients on queue (unserved) for all arrivals. I am just learning simmer and not sure if there's a way to achieve this yet.  Any help or pointers will be most appreciated. thanks!

The best way to proceed is to run the simulation for a time long enough so that a sufficiently large number of arrivals have finished their trajectories, so that you have all the information required at the output.

If your simulation is instead set up so that arrivals don't necessarily finish the entire trajectory, but they keep looping around, then get_mon_arrivals(per_resource = TRUE, ongoing = TRUE) is what you are looking for, because this reports timings per resource. Therefore, even if a particular arrival is still ongoing, this will report timings for the already visited resources.

Best,
Iñaki
 


image.PNG

--
You received this message because you are subscribed to the Google Groups "simmer-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to simmer-devel...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/simmer-devel/d5b5af50-1d7f-420c-b201-a764aacd9a30n%40googlegroups.com.


--
Iñaki Úcar
Reply all
Reply to author
Forward
0 new messages