question

Nicholas Grazioli avatar image
0 Likes"
Nicholas Grazioli asked Jeanette F commented

How to calculate the distance between any two points of the network?

Hello,

I have a question for the developers of the AGV module. I noticed that there is a specific function cpdistance(obj cp1, obj cp2) to calculate the distance between two Contrtol Points. By chance there is a similar function or a simple way to calculate the distance between two points of the network without using Control Points.

For example I would like to calculate the distance between the two points of intersection indicated in the attached photo.

1628259175511.png

FlexSim 21.0.6
agvagvpathdistanceflexsim 21.0.6paths
1628259175511.png (88.3 KiB)
· 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 @Nicholas G,

We haven't heard back from you. Were you able to solve your problem? If so, please add and accept an answer to let others know the solution. Or please respond to the previous comment so that we can continue to help you.

If we don't hear back in the next 3 business days, we'll assume you were able to solve your problem and we'll close this case in our tracker. You can always comment back at any time to reopen your question, or you can contact your local FlexSim distributor for phone or email help.

0 Likes 0 ·

1 Answer

Alessio Merlo avatar image
0 Likes"
Alessio Merlo answered

Hi,

I don't know a direct command to compute that distance.

I suggest to use the data "distAlong" stored inside the path to know the distance along the path. Then you can compute the total distance jumping from the previous path to the next path till the target is reached.

distalong.png

But I don't figure out how you could use this value. If you explained your objective, I'll try to help you better.


distalong.png (29.2 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.