Choose the nearest AGV

Choose the nearest AGV

e_yiing98
Not applicable
20 Views
4 Replies
Message 1 of 5

Choose the nearest AGV

e_yiing98
Not applicable

[ FlexSim 21.2.4 ]

Hi, I wish to choose the nearest AGV to load object.

I make reference to these questions and try these methods in my own model. But it doesn't work as I wish.
https://answers.flexsim.com/questions/31261/acquire-nearest-shared-resource.html

https://answers.flexsim.com/questions/108310/process-flow-related.html

Any mistakes in my model?

221101_Nearest AGV.fsm

0 Likes
Accepted solutions (1)
21 Views
4 Replies
Replies (4)
Message 2 of 5

moehlmann_fe
Explorer
Explorer
Accepted solution

By default the distance-code assumes that the puller is either a task sequence or the object that the task executer will travel to. When using the Acquire activity, the puller is set as the token, so you have to change the reference for the code to work.

Your first linked post says to shift the reference from the token to the item. In this case this is not enough since you are using an AGV network. For the distance to be calculated correctly, the reference must be an object connected to the network, so in this case the source (or possibly queue later). So you want to shift the puller variable from the token, to the object containing the item.

puller = puller.item.up;

1667290588791.png

0 Likes
Message 3 of 5

e_yiing98
Not applicable

Thanks for your advice!

However my model still doesn't work.I found that the model in the first link will show how many resource are in the list, but my list didn't show such information.

1667367563966.png

I tried to change the puller to token.item.up, but still no response. Could you please give some advices?
Thanks!221102_Nearest AGV.fsm

0 Likes
Message 4 of 5

moehlmann_fe
Explorer
Explorer

You have to push the task executers to the list. Either at the start of the model, for example in a simple process flow that creates a token for each group member and pushes that member to the list. Or by adding the group to the "Initial Content" of the list.

1667372345451.png

When using a list and the Pull from List activity you can change the puller value directly in the activity. So you don't need to alter the code of the distance field. That was only meant for the case of using a process flow resource.

1667372428412.png

221102-nearest-agv_1.fsm

0 Likes
Message 5 of 5

e_yiing98
Not applicable

Thanks for letting me understand more about puller and list 🙂

Much appreciate!

0 Likes