question

Glenson G avatar image
0 Likes"
Glenson G asked Glenson G commented

Priority of AGVs loading from queues

Hi @Felix Möhlmann ,

My apologies for the multiple questions. I really appreciate your time and guidance to answer these questions. I did try to browse through a few other similar questions but I could not seem to find one that can work for my model.

I noticed that at >10000s, where the Linen queues start to be populated and to be sent to the wards' queues, the AGVs will only try to finish transporting all the trolleys in the Linen queue before proceeding to the others. Before it can even finish, the KitchenCollect is populated with trolleys already. May I ask if it is possible to set a priority, where if there are trolleys in the KitchenCollect queue, it must be transported to the wards first? Whereas there will be a few AGVs that will still be working on the other non-priority queues.

Thank you very much!

liftusage-221110-4.fsm

FlexSim 18.2.3
agv
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 Glenson G commented

You can use the query field in the "Pull from List" activity to influence the order in which values are pulled. Most often this is done by ordering them by label that is present on the list values.

You could add the priority value to the origin table as a new column and assign this to the job tokens.

1668079900852.png

1668079915611.png

Values/Labels that are to be used in the query have to be added to the list as "fields".

1668079961732.pngYou can now pull the values as mandated by the priority value (DESC = descending order, ASC for ascending).

1668079864505.png


To keep some AGV working on tasks of a lower priority you could assign preferred priority values to the individual AGVs. So that tasks with that exact priority value will be done first, even if there are jobs with a higher priority available.

1668083108054.png

1668080339243.png

1668080735834.png

The ORDER BY statements are evaluated from left to right. So first expression "puller.agv == Priority" becomes 1 (true) if the Priority value matches the AGV's label. So the jobs are essentially split into to groups: matching priorities and non-matching priorities. These groups are then again sorted by the second expression, which just orders them by their priority value. In effect, AGVs will always choose a job with a matching priority value if available.

Note how the "Puller" was changed to "token.agv", so the label "PreferredPrio" can be accessed in the query through the "puller" reference.

liftusage-221110-6.fsm


· 5
5 |100000

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

Glenson G avatar image Glenson G commented ·
Thank you for the succinct explanation and reply Felix! Let me take some time to digest hahah.

But with this, there is actually a deadlock at the Linen/MMD queues at the top after certain timing as compared to the liftusage-221110-5 version. Why is that so?
Thank you very much Felix!

0 Likes 0 ·
Felix Möhlmann avatar image Felix Möhlmann Glenson G commented ·

The deadlock happens due to the circular nature of the paths in that section. Take this simplified example:

1668151734008.png

Each AGV occupies one of the available control points. So none of them can allocated the next point to start their travel.

To prevent deadlocks, their always has to be at least one more control than AGVs in a closed loop (possibly more depending on the deallocation timing).

In your case, you can't really fit 20+ control points into the loop at the Linen/MMD queues, so you have to limit the number of AGVs that are allowed to enter it at the same time.

You can use a Control Area for this.

1668151932549.png

1668151944399.png

0 Likes 0 ·
1668151734008.png (72.7 KiB)
1668151932549.png (72.5 KiB)
1668151944399.png (1.3 KiB)
Glenson G avatar image Glenson G Felix Möhlmann commented ·

Hi @Felix Möhlmann ,


Thank you very much for your explanation. I have actually tried the control area method on models with and without the priority, but it doesn't seem to work. May I ask what could be wrong?

Thank you!

liftusage-221114-deadlock.fsm

0 Likes 0 ·
Show more comments