Open Lknechtli opened 9 years ago
Are these infinite cr/ly ones where both stations are in the same system? or where locations were not recognised?
Yes, both stations are in the same system. You can have a total round trip of ~44 cr/t and it will prioritize it over a 3000 cr/t 10 lightyear trade.
One thing you may want to do is ask for the loaded jump distance of the user's ship, and make that the minimum jump distance used in calculations. Practically, it doesn't matter if the jump is 1/4 or 1/2 your jump range, it takes the same amount of time either way. Once you get over that jump distance though, it gets more complicated due to jump routes not being direct, so cr/ly makes sense again.
In passing, I note it is a testament to .Net that I have committed a cardinal sin (divide by zero) but .Net has managed to handle it anyway, rather than crash. I never even thought about this eventuality, never mind code the word "Infinity" into the app!
Need to create a "route-finding" issue (implement A*, use it everywhere, watch it perform like a one-legged dog etc.) and track that stuff separately. This issue to be used specifically for the "infinity" problem.
Either add a way to toggle showing these, or prioritize them differently in the Station-to-Station best round trip list. Adding a way to filter based on round trip profits would be a good way.