question

Dylan R2 avatar image
0 Likes"
Dylan R2 asked Sam Stubbs commented

Is it possible to reorganize a queue each time a new item enters?

I'm new to flexsim and I would like to minimize setup times, which occur when an item type that is different from the previous item type is processed. i.e. there are 3 item types, so if item type 3 was the last to run, I want to check the queue to see if there are any item 3s to run before pulling the next item from the queue. Then when there are none, pull the next available item type, and search the queue for any more of that type as well, etc.

queuequeue strategyprocess flow pull from listqueue and codebased on the next item type
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

Sam Stubbs avatar image
1 Like"
Sam Stubbs answered Sam Stubbs commented

In the OnEntry trigger of the queue, you can use the action of "Sorting by Expression." Which can sort the rank of items in the queue, by whatever value you want (usually a label on the items).

Here's an example:

sorting.fsm

You may also want to check out this previous Answer on the forums:

https://answers.flexsim.com/questions/51031/flowitem-sort-in-onentry-and-onexit-triggers.html

Additionally you could utilize lists in a Push/Pull kind of system in order to enforce sorting as well.


sorting.fsm (148.2 KiB)
· 2
5 |100000

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