question

Zenix avatar image
0 Likes"
Zenix asked Zenix commented

AGV Queue Logic Help

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

FlexSim 25.0.4
agv
1744695235441.png (180.4 KiB)
queue-test.fsm (46.4 KiB)
queue-test.fsm (46.4 KiB)
queue-test.fsm (46.4 KiB)
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

1 Answer

Felix Möhlmann avatar image
0 Likes"
Felix Möhlmann answered Zenix commented

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


queue-test-1.fsm (43.7 KiB)
· 3
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.