question

Devdatta D avatar image
0 Likes"
Devdatta D asked Joerg Vogel answered

Sort Array

How to sort an array using code/process flow?

FlexSim 22.1.1
array
· 4
5 |100000

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

Jeanette F avatar image Jeanette F ♦♦ commented ·
What is in the Array? Numbers, Strings, pointers? How are you trying to sort? Is there a number in the string or pointer and do you want is smallest to largest by that number?
0 Likes 0 ·
Devdatta D avatar image Devdatta D Jeanette F ♦♦ commented ·
An array of items stored in racks. I want to sort the array based on location in racks. For ex. I might have items stored in Rack 1, Rack 2 etc. and in Bay 1 , Bay 2 etc. I want to sort the items so that you items in Rack 1 and Bay 1 then Rack 1 Bay 2 , then Rack 2 Bay 1 and so on.
0 Likes 0 ·
Jason Lightfoot avatar image Jason Lightfoot ♦ Devdatta D commented ·
Push and pull them off a list ordering by baynumber
0 Likes 0 ·
Jeanette F avatar image Jeanette F ♦♦ commented ·

Hi @Devdatta D, was Jason Lightfoot's answer helpful? If so, please click the "Accept" button at the bottom of their answer. Or if you still have questions, add a comment and we'll continue the conversation.

If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always unaccept and comment back to reopen your question.

0 Likes 0 ·
Jason Lightfoot avatar image
0 Likes"
Jason Lightfoot answered

Here's a link to a previous answer which has the items for picking arranged by aisle and bay.

You could push and pull the items from a list as I think I did in that example.

Alternatively you could put all the items in a table on token and sort by aisle and bay - functionality you get by not using arrays.

5 |100000

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

Joerg Vogel avatar image
0 Likes"
Joerg Vogel answered

You can query an array and ORDER it BY clauses of a SQL.

https://answers.flexsim.com/answers/52265/view.html

5 |100000

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

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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