question

Zakka Ugih R avatar image
0 Likes"
Zakka Ugih R asked Matthew Gillespie commented

Task Sequence Global List got error: loadToUnloadDistance

Hi, I am facing a problem with one of the features in the task sequence (TS) global list. When I try to use age, distance, both works pretty well but not for LoadToUnloadDistance.

The sample model works quite simple. The item should flow from Queue1 to Rack and from Rack to Queue2, all sent by ASRS. ASRS should choose the task sequence based on the closest distance from both TS. I have put the pusher TS in Queue1 and Rack, and the puller in ASRS on resource available trigger. However, the error shows: time: 3.233844 exception: FlexScript exception: Array index out of bounds at MODEL:/Tools/GlobalLists/TSList1>variables/fields/loadToUnloadDistance/expression.

Note that I do not want to use process flow here for a certain reason, so please give a suggestion without process flow approach. I have attached the figure sample model below. I don't know why I cannot upload the fsm model here, there is an error. Thank you.

1661074582828.png

FlexSim 21.2.4
listwarehouse
1661074582828.png (268.5 KiB)
· 3
5 |100000

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

Zakka Ugih R avatar image Zakka Ugih R commented ·

Additional Information:

1661086894574.png

1661086863714.png

0 Likes 0 ·
1661086863714.png (165.1 KiB)
1661086894574.png (213.6 KiB)
Jeanette F avatar image Jeanette F ♦♦ commented ·
Hello @Zakka Ugih R,

You can upload your model to the link mentioned above.

0 Likes 0 ·
Zakka Ugih R avatar image Zakka Ugih R Jeanette F ♦♦ commented ·
I have uploaded it. Thank you! @Jeanette F
0 Likes 0 ·

1 Answer

·
Felix Möhlmann avatar image
1 Like"
Felix Möhlmann answered Matthew Gillespie commented

There is an error in the "loadToUnloadDistance" option's code. In line 11, the index of the checked task becomes negative because the loadTask number is subtracted instead of added. Below you find one (of multiple possible) fixes for this.

int unloadTask = findmatch(ts.tasks.length - loadTask, ts.tasks[count + loadTask].type == TASKTYPE_UNLOAD, count + loadTask);

1661248761302.png

Also note that this option returns the distance between the center of the respective objects, not the distance the ASRS will travel to reach the actual slot. That would require further customization of the code.


@Jordan Johnson

This is still the case in the 22.2.0 version. Could someone take a look at this so it can get fixed for the next release?


1661248761302.png (18.3 KiB)
· 3
5 |100000

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

Jordan Johnson avatar image Jordan Johnson ♦♦ commented ·
I will add this to the dev list. Thanks!
1 Like 1 ·
Matthew Gillespie avatar image Matthew Gillespie ♦♦ commented ·
@Zakka Ugih R @Felix Möhlmann This bug has been fixed in 23.0.7 released today.
1 Like 1 ·
Zakka Ugih R avatar image Zakka Ugih R commented ·

That's what I am looking for. Thank you for your response! @Felix Möhlmann

0 Likes 0 ·

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.