question

Adam C avatar image
0 Likes"
Adam C asked Jeff Nordgren converted comment to answer

How to pull transporter closest to origin for transport task?

An event-triggered source (transport reference, transport == 0) creates a token for a transport task. I pull the transporter from a list and query "ORDER BY distance ASC" (closest transporter).

The transporter list has the distance expression, which is calculated based on the puller. What does the Puller need to be set as in the process flow to properly evaluate the distance expression and pick the nearest transporter? Token and list do not work.

Currently, the first available transporter on the list is pulled. Presumably all distance values are evaluated at 0, causing this. Transporters are pulled off the list in first available order, rather than by distance.

FlexSim 19.0.1
process flowtransporterlist pulldistance
pullbydistance.fsm (32.0 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

Joerg Vogel avatar image
1 Like"
Joerg Vogel answered

I have looked into the model and made some minor changes. I added a breath activity and some print commands to look for what the dynamic field distance does. I am confused why the computed distance value isn't returned as a dynamic field value. The value is printed into the output console, but not into the field.
shortest-distance-resource.fsm


· 1
5 |100000

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

Adam C avatar image Adam C commented ·

Thank you! I had to change the puller from token.destination to token.origin, but it seems obvious now that the origin should be the puller to calculate distance. It looks like the breath activity is not needed in this case, though they do seem to be a helpful addition following event-triggered sources.

0 Likes 0 ·