question

Magnus C avatar image
0 Likes"
Magnus C asked Magnus C commented

How to query AGVs by distance

Hello,

Using the default AGV process flow template I wish to activate the AGV parked closest to the item that need to be picked up. How can I do this?

As you know, this is the logic that activates parked AGVs, but using a simple query ORDER BY distance does not work. I have tried to modify the distance expression in the Available AGVs list, but without any luck.

I saw a similar thread, but no solution was presented: https://answers.flexsim.com/questions/34496/is-there-a-way-to-query-a-list-of-task-executors-b.html

Thanks!

Choose One
agvprocess flowlistquerydistance
skjermbilde.png (27.6 KiB)
5 |100000

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

1 Answer

Jason Lightfoot avatar image
1 Like"
Jason Lightfoot answered Magnus C commented

I expect you need to have an item referenced on the token in order to evaluate the distance within the list fields. The activity "Wait for New Item on Load List" doesn't assign the new item to a token label for you to use in a distance calculation based on puller.item. You could find the item in code and assign it to token.item or you could swap the "Wait for New Item on Load List" activity for a "Pull from List" with the "leave entry on list" checked - and assign the item to a label on the token there. To ensure you only pull new items I'd store the pushtime on the token and then only pull items "WHERE pushTime>token.lastpushtime".

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