I'm simulating a model on Anylogic, in which Agents flow from a Queue block to a Service block. I need to define the time spent by the angents in the service with a probability distribution like this:
-the 70% of them spent in the service a lapse of time between 15 and 30 minutes (it should be an uniform distribution like: uniform( 15, 30 ))
-the 20% of them between 30 and 45 minutes
-the 10% of them between 45 and 60 minutes
I've already associated to the agents a parameter called "timeInService", I think I should work with it and maybe the Dalay time of the service but I dont'k know how.
Thank you so much!
on the delay of the service block you can put this code:
This will give you what you want.
Another alternative is on the block before entering the service block you do this on the "on exit":
And in the service delay you put
agent.timeInService
Those are two possible options.