Sort flow items in Queue

Sort flow items in Queue

sung_kimT5CKM
Enthusiast Enthusiast
219 Views
4 Replies
Message 1 of 5

Sort flow items in Queue

sung_kimT5CKM
Enthusiast
Enthusiast

I am not sure if FlexSim queue has a built-in function or menu to sort the flowitems as they enter the queue. I couldn't find one, so I made a simple looping script to change the rank of the entering flowitem based on its label value. It does work, and it changes the rank of the flowitem in the subnode tree correctly. But the visual position of the flowitem doesn't change. I tried "updatelocations(item)" cppfunction after the sort, but it doesn't work. I am sure I don't understand what the updatelocations() cppfunction does. Is there a script/function to update the flowitem position in a queue after the rank is changed so that the position of the flowitem is aligned with the rank?

 

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

joerg_vogel_HsH
Mentor
Mentor

New entering items are stacked. Entered items are located but without any recognition of size. FlexSim has not got a physical engine that respects any physical impact of features at all. If you are changing a location, a rotation, a size you are responsible for the result. Any visual order in a queue has not any influence of the order of processing those items in releasing them.

You expects something that you have watched in reality, but this is not how it works in a simulation. 
There are two mechanism present in FlexSim. A 3D logic, which consists of a strict rule set to distribute items, and there is Process Flow that let you define your own mechanism of flow. 

back to stacking of items if they are entering a queue. There is a field on input slate that is called stacking method. Here you can select a procedure how a default routine is processed. If you choose do nothing all items are located in the center. If you use on entry event you can locate an involved item by script code wherever you want.

0 Likes
Message 3 of 5

sung_kimT5CKM
Enthusiast
Enthusiast

Thank you for the clarification.

Although I have somewhat different perspectives in certain respects, your explanation has broadened my understanding and helped me look at it from another angle, and I appreciate that.
Thanks.
0 Likes
Message 4 of 5

SimFlex_support
Advisor
Advisor
Accepted solution

Have you used the option menu of 'sort by Expression' OnEntry trigger?

It's not your meaning?

 

SortByExpression.jpg

Message 5 of 5

sung_kimT5CKM
Enthusiast
Enthusiast

Embarrassed and ashamed... I should have found this earlier... I know there is a way, and I don't understand why I couldn't see it earlier.
Perfect! Yes it is what I was looking for. 
Thank you, Mr. Seo!

0 Likes