-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Infinite loop in NetworkTools.findClosestLinksSorted #199
Comments
Can you share the test map or an extract with the relevant links? I can't really tell what's going on. Mixing to and from nodes doesn't sound good and definitely looks like a bug, I'm surprised it hasn't come up sooner. |
I tested my code with this test network: https://github.com/ait-energy/matsim-drs/tree/main/data/floridsdorf |
Yes, sounds like an artifact. I think I realized that there's no use case to get a list sorted by distance (and link direction) without also providing the distance. |
I'm now happily using |
Yes, then it's best to remove it. While we're at it, there are probably some other unused or uncovered methods in CoordTools or NetworkTools worth a closer look. |
Hello @markusstraub @polettif, As I am preparing a new release, I That does not solve your issue, so I will not close it, but is that fine for you for now? |
That's fine for me! |
I just wanted to report that
NetworkTools.findClosestLinksSorted
produces an infinite loop here:pt2matsim/src/main/java/org/matsim/pt2matsim/tools/NetworkTools.java
Line 210 in fdfe40a
Unfortunately I can not look for a solution any deeper than finding this copy/paste bug (should be
l.getToNode()
instead ofl.getFromNode()
pt2matsim/src/main/java/org/matsim/pt2matsim/tools/NetworkTools.java
Line 206 in fdfe40a
.. but even when fixing this the problem does not go away.
The text was updated successfully, but these errors were encountered: