AnyLogic
Expand
Font size

“Pull” vs. “Push” agent flow protocol

AnyLogic supports two alternative agent flow protocols for Process Modeling Library flowcharts.

  • The “pull” way of ejecting agents. The agent passing protocol is roughly as follows: the sending block notifies the receiving block that there is an agent ready to exit. If the receiving block can accept the agent, it will request it from the sending block, and, if the agent is still available, it will be passed over.
    The “pull” protocol is used in the blocks that can wait for the receiving block to be ready to accept the agent. Flowchart blocks will stop and wait until the next blocks are ready.
  • The “push” way of ejecting agents. The block simply pushes the agent out and does not wait for the receiving blocks. If the agent is unable to leave a “push” port in zero model time, a runtime error is generated. Therefore, AnyLogic does not allow implicit (hidden) buffering or blocking, and you will always be notified of an overflow situation and will be able to locate the bottleneck. The port implementing the “push” protocol can therefore hold a number of agents, but only for zero time. This buffering is necessary to allow truly asynchronous execution of concurrent events between agent generation and consumption.

The following blocks support the “pull” protocol and also provide the “push” protocol as an option: Source, Enter, Delay, Pickup, Dropoff, Seize, Batch, Unbatch, Combine. Select the advanced Forced pushing option to enable the “push” protocol for the block:

How can we improve this article?