anylogicbatching

Batching agents based on arrivalnode


In my Anylogic model, my source block generates agents on different nodes based on a database values defining which node the agent has to arrive.

The orders at the same location arrive at the same time (so for example at 7:30, 3 agent orders arrive at node1 and 4 agent order arrive at node2).

Now what I want to do is that the orders at node1 make a batch of 1x2 and 1x1 and I want that the orders at node2 to form a batch 2. These agents than will seize a transporter which transports these batches to the same location and than unbatch.

So my question is how will I create batches based on the arrivallocation loaded from the database.

Thanks.


Solution

  • Create a variable in the agents myNode of type RectangularNode. Store the node the agents are being positioned at in the Source block.

    Use a SelectOutput block downstream of the `SourceĀ“ block that splits the agents by their current node.

    Then, use batch objects as usual as the arriving agents are now split by their node location.