List sorting with value

List sorting with value

matspohle
Observer Observer
123 Views
3 Replies
Message 1 of 4

List sorting with value

matspohle
Observer
Observer

Hi everyone, I'm currently working on a Picking Process Simulation. I do have a problem with the sorting of the List. I'm currently pulling random articles from a List with all Articles. Now I want to sort them after Location, that the operator is not runing randomly but first to Bin A1 to Bin A2 Bin B.... and so on.

Could anyone help me out with that?

For more infos I'm here 🙂

0 Likes
124 Views
3 Replies
Replies (3)
Message 2 of 4

moehlmann_fe
Enthusiast
Enthusiast

You need something to order the items by. The name of the rack they are in can work in this case, though I would generally recommend to use numeric labels on the racks or the adressing scheme. You then create a list field that holds the value you want to sort by, so you can easily access it in the query.

 

0 Likes
Message 3 of 4

matspohle
Observer
Observer

Thank you so much first of all for your help. Your solution is going in the correct direction, but its not quite it. In your solution the picker is now going only to the station A1 till its empty. But actually I'm trying to pull random objects. Lets say one of D1 one out of A2 one out of S and one from C1. The pulled items are forming an Array e.g.: 
SH_Einzelteil[1] /Bin S/Box1~19
SH_Einzelteil[2] /Bin D1/Box1~7
SH_Einzelteil[3] /Bin C1/Box1~3
SH_Einzelteil[4] /Bin A2/Box1~12

Now I want the picker to go first to A2 then C1 then D1 and latest to S
I think we can solve it with programming a code, but I just cant get it done to code in Flexsim or with saving in a temporery list as far as I know

I appreciate your help and looking forward to your next hint 🙂

0 Likes
Message 4 of 4

moehlmann_fe
Enthusiast
Enthusiast

As you say, you could do this by implementing a sorting algorithm (for small arrays like this, something simple like Bubblesort would be fine).

https://en.wikipedia.org/wiki/Bubble_sort

 

Or you push the pulled values back to the list and pull them again, this time ordering by the name. You can use a partition, so you don't have to worry avout pulling the correct values again.

 

0 Likes