I am working on a problem where I have to spawn X agents between some start and end time.
For example I'd like to spawn 300 agents in total between 9AM and 3PM based on Poisson distribution. (See the amazing graph -> Example of customers spawning) The goal here is that most customers would arrive at the start of day and then the amount would slowly add up to 300 towards the end of day.
I've tried to implement this using events and schedules. Nothing has worked the way I want it to work. The event docs even mention that it can be used as a way to spawn in customers based on Poisson distribution but I haven't been able to come up with a real solution. Maybe I'm just trying to over engineer something that is already available to me.
Any suggestions? Thanks!
You could use a separate variable durationToNextCustomer
that you set to a small value initially.
Each arriving customer then adds to it according to a Poisson distribution. In addition, you use a DynamicEvent and the updated durationToNextCustomer
to spawn the next customer in a slightly longer time each time