AGV Queue Logic Help

AGV Queue Logic Help

LHJ
Not applicable
229 Views
4 Replies
Message 1 of 5

AGV Queue Logic Help

LHJ
Not applicable

[ FlexSim 25.0.4 ]

Subject: Help with Sequential Queue Loading and Automatic Backfilling Using AGVs in FlexSim

Dear Support or FlexSim Expert,

I hope this message finds you well.

I am currently working on a FlexSim model where I would like to implement the following logic using AGVs and multiple queues. I would greatly appreciate your insight or advice on whether my current logic is appropriate, and how I might implement the desired functionality more effectively.

1744695235441.png


What I am trying to do

  1. Initial Item Loading:

    • When an item enters Queue1, I want an AGV to transport it sequentially into the next available queue, starting from Queue5, then Queue4, and so on.

    • For example: First item → Queue5, second → Queue4, third → Queue3…

  2. Current Problem:

    • The first token executes correctly, and the item is placed in Queue5 using the AGV.

    • However, the second token does not proceed, and the simulation stalls after the first transport.

    • I suspect the issue might be in the Decide logic or the flow control.


What I want to implement next

  1. Automatic Backfilling:

    • I plan to add a second AGV.

    • When an item in Queue5 is sent to the Sink, I want the AGV to:

      • Move the item from Queue4 → Queue5,

      • Queue3 → Queue4, and so on,

      • Essentially "pulling forward" each item one step to fill any empty space.


My Request

  • Could you please confirm whether my Decide logic is correctly implemented for the sequential queue loading?

  • Also, what would be a good approach to implement the automatic backfilling logic (when items leave Queue5)?

I appreciate your time and any guidance you can offer!


Queue_Test.fsm

0 Likes
Accepted solutions (1)
230 Views
4 Replies
Replies (4)
Message 2 of 5

moehlmann_fe
Advocate
Advocate
Accepted solution

The Decide works, the process stalls because you don't release the acquired resource.

To build logic like this I would recommend to use lists. In the attached example, the token first gets the farthest queue that is currently empty (the queues are the initial content of the global list and are also pushed to the list in their On Exit trigger, when they become empty). It then pulls the closest item in a previous queue and moves it.

This sort of combines what both your AGVs should be doing. To split the tasks, all you would need to do is adjust the query in the "Pull closest item" activity. If the first AGV should only load from Queue1 then the query would be "WHERE QueuePos == 1". If the second should only move the items forward by one it should be "WHERE QueuePos == puller.Queue.Position - 1".

queue-test_1.fsm

0 Likes
Message 3 of 5

LHJ
Not applicable

Thank you very much for your previous response — it was extremely helpful and clarified a lot of things for me.

1744761654862.png

Additionally, I have two more questions related to the attached model:

  1. I’ve created separate Process Flows to control the two AGVs.
    Is there a more flexible or efficient way to manage both AGVs in a unified or modular fashion?
    I’d like to ensure that both AGVs work together smoothly, without conflicts or duplicated logic.

  2. For TaskExecuter1, I want it to return to the initial control point and begin recharging if it becomes idle and there are no new items arriving for the next 200 seconds.
    Could you advise me on a good approach to implement this logic?

Thank you again for your time and support!

queue-test-1_1.fsm

0 Likes
Message 4 of 5

moehlmann_fe
Advocate
Advocate

To implement behaviour when a TE becomes idle, it's easier to use a slightly different method of how the tasks are distributed. In the previous model, the AGV first pulls a destination and then an item, so whether it's idle or not depends on two things. Checking both simultaneously is and aborting the pull of both when one is not available is possible but a little complex.

It's easier to reverse the logic and have items/queues that need transportation pull an AGV. That way, if the AGV is not immediately pulled, you can send the token to a second connector and have it move to a park position. I didn't implement the check for when the next item arrives in the example model. To do that, you would edit the interarrival time code of the source to first generate a value, write that value to a label, so you can always check when the next item is due and then return the value.

queue-test-1-2.fsm

0 Likes
Message 5 of 5

LHJ
Not applicable

Thank you very much for your answer. It was really helpful.

0 Likes