question

John W7 avatar image
0 Likes"
John W7 asked John W7 commented

How to pull item from list based on nearest distance to operator

I am trying to simulate the operator pulling the nearest item on the conveyor using process flow. After the operator unloads an item to a queue, the distance between every item on the conveyor and the operator should be updated - then the operator selects the nearest item to pull next. The distance measurement from the operator to the item needs to be updated each time it is pulled from the list, since the items are moving along the conveyance.


I used the code below which I got from another Q&A though it does not seem to be working as intended: https://answers.flexsim.com/questions/31261/acquire-nearest-shared-resource.html

My files is attached: simulation1.fsm. You can see the list has an expression from the link above, and the Pull From List step is querying distance in ascending order. However, when the simulation runs, the operator clearly does not select the nearest item to pull next.

FlexSim 18.2.2
querylist pulldistancescripting
simulation1.fsm (52.9 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

Joshua S avatar image
0 Likes"
Joshua S answered John W7 commented

You need to change what the puller was referencing, in your pull From List activity your Puller needs to have token.reasource so that it can reference the operator.

Also I got some errors when I first opened the file, if you are getting them to, delete your load activity, and insert a new one.


pic1.png (24.6 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.

Aravind D avatar image Aravind D commented ·

Hi, i have updated your model please refer.

thanks

16285-answer.fsm

0 Likes 0 ·
16285-answer.fsm (51.4 KiB)
Joshua S avatar image Joshua S Aravind D commented ·

@Aravind D

Is there something wrong with it besides the lost connection between the release and acquire activities? Seems to be working how you wanted it to.

0 Likes 0 ·
John W7 avatar image John W7 commented ·

Thank you! This was tremendously helpful!

0 Likes 0 ·