Task Sequence Global List got error: loadToUnloadDistance

Task Sequence Global List got error: loadToUnloadDistance

zakka_ugih_r
Not applicable
22 Views
7 Replies
Message 1 of 8

Task Sequence Global List got error: loadToUnloadDistance

zakka_ugih_r
Not applicable

[ FlexSim 21.2.4 ]

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

0 Likes
Accepted solutions (1)
23 Views
7 Replies
Replies (7)
Message 2 of 8

zakka_ugih_r
Not applicable

Additional Information:

1661086894574.png

1661086863714.png

0 Likes
Message 3 of 8

Jeanette_Fullmer
Community Manager
Community Manager
Hello @Zakka Ugih R,

You can upload your model to the link mentioned above.

0 Likes
Message 4 of 8

zakka_ugih_r
Not applicable
I have uploaded it. Thank you! @Jeanette F
0 Likes
Message 5 of 8

moehlmann_fe
Observer
Observer
Accepted solution

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?

Message 6 of 8

zakka_ugih_r
Not applicable

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

0 Likes
Message 7 of 8

JordanLJohnson
Autodesk
Autodesk
I will add this to the dev list. Thanks!
.


Jordan Johnson
Principal Software Engineer
>

Message 8 of 8

Matthew_Gillespie
Autodesk
Autodesk
@Zakka Ugih R @Felix Möhlmann This bug has been fixed in 23.0.7 released today.


Matthew Gillespie
FlexSim Software Developer