How I can get the shortest distance from a line to an attractor in anylogic?

203 Views Asked by At

I want to get the shortest distance from a line to an attractor/point node in Anylogic. In all the available references, I found the function to calculate point to point distance. Is there any function/suggested way to calculate a line to point distance in Anylogic? (Please let me know if my question is not clear enough)

1

There are 1 best solutions below

4
On BEST ANSWER

Best use a Path element from the "Space Markup" library, not a Line.

This allows you to call getNearestPoint as below:

enter image description here