Search code examples
anylogic

how to reference an agent in the pickup


I want to move an agent in "queue3" to the position of "container" within a "pickup1" at pickup. What is the best way to do this?

enter image description here


Solution

  • if you want to move the agents to the location of the container, you need:

    • a wait block before queue3 (waitAgent)
    • a wait block before pickup1 (waitContainer)

    When a container arrives to waitContainer, you free the agents from waitAgent and all the agents use a moveTo block to move to the container.

    Once they arrived to the container they will be in queue3

    Once all the agents arrive to queue3, you free the container from waitContainer and it goes to pickup1.

    This is the general way to do it with agents moving towards the container, but you will have to build the logic yourself...

    If you allow the agents teleporting to the container the solution is different... but i assume you want to see them moving