How to pull transporter closest to origin for transport task?

How to pull transporter closest to origin for transport task?

c_adam_collins
Enthusiast Enthusiast
365 Views
2 Replies
Message 1 of 3

How to pull transporter closest to origin for transport task?

c_adam_collins
Enthusiast
Enthusiast

[ FlexSim 19.0.1 ]

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.

0 Likes
Accepted solutions (1)
366 Views
2 Replies
Replies (2)
Message 2 of 3

joerg_vogel_HsH
Mentor
Mentor
Accepted solution

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

Message 3 of 3

c_adam_collins
Enthusiast
Enthusiast

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