Reputation: 7
I am trying to simulate the Mt/M/c queueing model in Anylogic. I want the Source to generate agent by a Non Homogenous Poisson Process, which requires the arrival rate function to be like, for example, a+b*sin(t). However, I found that the source can only generate by fixed rate or rate schedule.
I am wondering if there is some way to generate agents by the rate function given in Anylogic.
Upvotes: 0
Views: 95
Reputation: 12795
Sure, set the Source to "create agents by call of inject()" method:
Then, create a DynamicEvent with the action code as below. This will inject 1 agent at the specified interval from your equation:
Last, you need to "seed" this setup by calling create_MyDynamicEvent(0, SECOND)
once on startup of Main (to make the dynamic event re-call itself from then onwards)
Upvotes: 1