question

Niket M avatar image
0 Likes"
Niket M asked Niket M commented

Creating a pick list by appending two arrays

Hi fellow users,

I am working on a warehouse model. For picking, an operator gets a pre-loaded cart with orders and then they begin the pick path. I am trying to create the same logic by using process flows, I've used some ideas from the "warehouse model", however, I am not able to figure out how to assign the pick locations for each line to the same array so that I can start the pick sequence.

In this model, I tried batching the tokens for the orders but when I append the arrays from the tokens, it makes a new array with nested values which is not what I want.

Any help will be appreciated, thank you.

pick_list_question.fsm

FlexSim 22.2.2
warehouse
5 |100000

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

Jason Lightfoot avatar image
0 Likes"
Jason Lightfoot answered Niket M commented

I would push both arrays to a list and then pull all the values ordering by bay, aisle etc so that you have the correct sequence.

Appending array a1 to a2 can be this:

while(a1.length)
    a2.push(a1.pop());

which will reverse a1 while appending, or simply:

a2.append(a1);


· 9
5 |100000

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

Niket M avatar image Niket M commented ·
Thank you Jason. I will give this a shot. However, I am wondering how to query based on the bay, aisle, level order because the array values written in the list are string. Do I need to write aisle, bay, level all the values separately in the list while pushing the tokens?
0 Likes 0 ·
Joerg Vogel avatar image Joerg Vogel Niket M commented ·
@Niket M , perhaps you can evaluate the slot value in Warehouse system to get a desired order for picking.
0 Likes 0 ·
Jason Lightfoot avatar image Jason Lightfoot ♦♦ Niket M commented ·
If you had an array of items or slot items then you can add labels to them or use an expression for those and the ORDER BY AisleID, BayID, SlotID in the pull.
0 Likes 0 ·
Niket M avatar image Niket M commented ·

@Jason Lightfoot or @Joerg Vogel - Logic of pushing the token.Items (array containing slot location) is working and it's pushing a slot string to the list. Do I need to parse the bay and level numbers from this string to pull using ORDER BY query? I am assuming there's some Flexscript to do this faster than writing a code to read string and strip from it. Here is what I was trying but it's not working.1670880274885.png
If I write an expression to save bay and level info in the list, I think the logic will work. However, I was also thinking that if I use A* as my network, this "pull" logic will over-ride any distance optimization it can do, because, now I am evaluating the next pick by purely using a pull query. Is that correct?

0 Likes 0 ·
1670880274885.png (5.8 KiB)
Jason Lightfoot avatar image Jason Lightfoot ♦♦ Niket M commented ·

Push the actual slot/slot item pointer and then you can use expressions like:

value.as(Storage.Slot).BayID

Here's an example:

slotItemsArrayToListForSort_jl.fsm

1 Like 1 ·
Niket M avatar image Niket M Jason Lightfoot ♦♦ commented ·

@Jason Lightfoot - I think I got it but just to make sure I am doing correctly. Can you attach the model in 22.1 version? I am on the older one so cannot open your attachment.

0 Likes 0 ·
Show more comments
Joerg Vogel avatar image
0 Likes"
Joerg Vogel answered Niket M commented

You can try method concat of Flexscript API.

Edit: Example shows concatenation of an explicit literal array. This works with a reference by array variable, too.

· 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.

Joerg Vogel avatar image Joerg Vogel commented ·
@Niket M , please take a look at querying an array to order filter it.

By Query clause ARRAY_AGG(row attribute) you can get an ordered or filtered array as a result for cell [1][1].

0 Likes 0 ·
Niket M avatar image Niket M Joerg Vogel commented ·
I wasn't aware that I could directly query an array. This is very helpful to know. Thank you @Joerg Vogel
0 Likes 0 ·