Order by distance issue

Order by distance issue

milan_durackaDVYZD
Contributor Contributor
1,065 Views
5 Replies
Message 1 of 6

Order by distance issue

milan_durackaDVYZD
Contributor
Contributor

[ FlexSim 23.1.2 ]

Hello guys, I would like to ask you for help. I need to do quite simple thing in Flexsim, but even I tried everything, I can´t find the answer.

I need to pull from list the closest tote to Operator to load item from it. I don´t know what is wrong. It doesn´t work, token always gets stuck in the "pull from list" block.

Thanks in advance, all the best.


volvo_JIS_relocation.fsmorder-by-distance-1.png

0 Likes
Accepted solutions (1)
1,066 Views
5 Replies
Replies (5)
Message 2 of 6

Jeanette_Fullmer
Community Manager
Community Manager
Accepted solution

Hello @Milan U3,

This is because you define the puller as the operator but the operator does not have the label mat_index. I changed your assign labels activity to assign the label to the operator and then the query works. You will want to review if the mat_index label can be written to just the operator of if it also needs to be written to the token.

volvo-jis-relocation_JF.fsm

0 Likes
Message 3 of 6

milan_durackaDVYZD
Contributor
Contributor
Hello Jeanette, thanks a lot. Unfortunately, there are not any changes in the file You attached- please, could You send me it once more? I would like to try it. Thanks
0 Likes
Message 4 of 6

jason_lightfoot_adsk
Autodesk
Autodesk

Just duplicate the assign labels and and set to to token.op to add the the mat_index to the operator.

You're model is going to crash soon afterwards in the delete_rows activity - you should add this clause or actually populate the label with table structured data.

if (virtualtable.numRows)
    virtualtable.deleteRow(rowsqty);

Your model will appear to stop/lock 424.16 as the token in PartsCollecting loops continually in zero time.

0 Likes
Message 5 of 6

milan_durackaDVYZD
Contributor
Contributor

Thanks @Jason Lightfoot . I did It like in the picture, but there is still "puller required". Operator does work, but ORDER BY query doesn´t work. What is the reason? Thanksorder-by-distance-5.jpg

0 Likes
Message 6 of 6

milan_durackaDVYZD
Contributor
Contributor

I´ve just realized, why it doesn´t work like I want. Operator is working according to the "virtual table" schedule and this schedule is fixed (table below)- there is not possible to use ORDER BY, because there is only 1 option in real time (specific row in the table). I am gonna try to fix this, maybe with extra List, pushing selected items from "virtual table" into it.

1699284308268.png

0 Likes