Font size

“Pull” vs. “Push” agent flow protocol

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

  • “Pull” way of ejecting agents. The agent passing protocol roughly is the following: 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 become ready to accept the agent. Flowchart blocks will stop and wait until the next blocks are ready.
  • “Push” way of ejecting agents. The block will just push the agent out and will 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 about an overflow situation and will be able to locate the bottleneck. The port implementing the “push” protocol therefore may hold a number of agents, but only for a zero time — this buffering is needed to enable truly asynchronous execution of simultaneous events between agent generation and consumption.
All Process Modeling Library blocks support “Pull” protocol and by default use it. The following blocks support “Pull” protocol and also provide “Push” protocol as an option: Source, Enter, Delay, Pickup, Dropoff, Seize, Batch, Unbatch, Combine, Wait.

Selecting the Forced pushing option in the Advanced section of the properties, you turn the “Push” protocol on for the block:

How can we improve this article?