question

Ankith T avatar image
0 Likes"
Ankith T asked Regan Blackett commented

How to change the order of sorting in a Queue

I would like to stack the boxes on a queue vertically. But when ever a new box enters the queue, the box should go to bottom on the list. In another words, boxes should be stacked in a sequence how they entered.


traditionally when ever a new box enter the queue and if the queue is stacking vertically, the top box will be the latest box that entered as shown in the figure below.

1688145945353.png


But in my case i would to reverse the order as shown below. when second box enters the queue, it has to go below the 1st box, when 3 enters the queue, it has to be below the 2nd entered box and so on.

1688145982342.png

is there a way that we can sort the items entering in Queue in this way, or is there any other object like rack or anything can make this happen?

FlexSim 21.0.10
queuerackcranessort
1688145945353.png (51.4 KiB)
1688145982342.png (51.3 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

Regan Blackett avatar image
2 Likes"
Regan Blackett answered Regan Blackett commented

The Queue object can handle this, you just need a label on the Flowitems that has a rank for a value, then in the OnEntry trigger of the Queue you can use a drop down menu option that lets you sort the Queue using the Flowitem's label. The items' rank could be assigned by using the preceding object's output statistic with the expression:

current.stats.output.value

Edit to upload a sample model:SortExample.fsm


sortexample.fsm (28.3 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.

Ankith T avatar image Ankith T commented ·
i am using 21.1.5 version flexsim, can you upload the flexsim file which is accessible for my version
0 Likes 0 ·
Regan Blackett avatar image Regan Blackett ♦ Ankith T commented ·
0 Likes 0 ·
sortexample21.fsm (26.1 KiB)