question

Iago MF avatar image
1 Like"
Iago MF asked Iago MF commented

Problem with distancetotravel() in AGV network

Hello,

I was working on a model with a high number of AGVs using accumulation paths, where I need to know the distance remaining for the AGVs to complete a mission in order to assign missions optimally.

When working on this, I have noticed that on multiple occasions the value returned by the distancetotravel() function is infinite, making it impossible to efficiently assign missions.

I have created a small model where I replicate this case, where it is observed that it returns an infinite value while it is blocked by accumulation at a crosspaths, this occurs at second 435 approximately.

Is this a bug? I understood that the distancetotravel() function is simply a distance check between the point where a traveler is and a destination in the same network, regardless of what happens in the network.

Thanks in advance.

23.0 DistanceToTravel Problem.fsm

1680774069379.png

FlexSim 23.0.6
agvagvnetworkdistancetotravel
· 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.

Jeanette F avatar image Jeanette F ♦♦ commented ·

Hi @Iago MF, was Kavika F's answer helpful? If so, please click the "Accept" button at the bottom of their answer. Or if you still have questions, add a comment and we'll continue the conversation.

If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always unaccept and comment back to reopen your question.

0 Likes 0 ·

1 Answer

Kavika F avatar image
0 Likes"
Kavika F answered Iago MF commented

Hey @Iago MF, the documentation for distancetotravel() states that it

Returns the distance that a traveler (Operator, Transporter, etc) would need to travel in order to reach the given destination. If the object is connected to a network, then it will return the travel distance along the network.

Considering the route for the AGV at that time is blocked due to traffic and it cannot reverse its current path, it states it will take an infinite amount of time to reach its destination (which is currently unreachable). Once the path clears, the value changes back to normal distance to travel.

So I think this is working as intended and is not a bug. However, I could be wrong so I'll email dev and let you know what their thoughts are on how the function works.

· 11
5 |100000

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

Patrick Zweekhorst avatar image Patrick Zweekhorst commented ·
Hi @Kavika F ,

I would expect the function to still return the travel distance. Although the path is blocked the distance that would need to be covered is still the same. The time needed to do this is unknown, but the distance will stay the same right?

0 Likes 0 ·
Jason Lightfoot avatar image Jason Lightfoot ♦♦ Patrick Zweekhorst commented ·
The documentation doesn't say if it's the shortest distance (which as you say will not change) or the distance of a calculated viable route. This needs clarifying.
0 Likes 0 ·
Kavika F avatar image Kavika F ♦ Patrick Zweekhorst commented ·

@Patrick Zweekhorst, it's true the distances will stay the same; however, there may be scenarios where this would be disadvantageous. Consider the case where the shortest path is blocked, but then another path opens up to the AGV. How do you choose? Do you stick to the shortest path (although currently blocked for an unknown amount of time) or do you switch to the newly opened path?

However, you're correct the distances will stay the same, and I agree with @Jason that the documentation should clarify this a bit. I'll make a note of this on the email I sent to dev. Thank you.

0 Likes 0 ·
Kavika F avatar image Kavika F ♦ Kavika F ♦ commented ·
Hey @Patrick Zweekhorst, I discussed this matter with the dev team. This is in fact a bug. The distance shouldn't be affected by an AGV occupying the network. If a path is unreachable, then the distance will be infinite; however, if a path is simply blocked by another AGV for a moment, it shouldn't. We have added this to our dev list. Thank you for pointing it out to us!
0 Likes 0 ·
Show more comments