In my Anylogic model I let agents (trucks) enter the process blocks of a terminal. I want to plot this "arrival rate" per each hour of the day (e.g., 100 trucks between 12:00-13:00 arrived at this terminal), for all hours of the day (24). How can I do this the simplest way?
myDS
that does not update itself. Make sure to untick "use time as horizontal value" (we will use the time but in hour time units)counter
In the event code, write:
myDS.add(time(HOUR), counter); // stores number of arrivals in the past hour, stored at the current model time
counter = 0; // reset for next interval
In the enter
block's "on enter" code, update the counter every time an agent arrives, using counter++;
Now you have a DS that stores how many agents arrived each hour. Plot that in a time plot and you are good to go.