rvhuang/linq-to-astar

Applicability to World Coordinates

sindizzy opened this issue · 2 comments

I am looking to use this library for a GIS project. In this case I have a a list of cities with x,y coordinates. I also have a list of connections between two cities. Each connection has a weight based on the geodesic distance between the two points. Looking to get shortest path between two given cities with alternate routings as well.

First, is this type of problem possible with the library and if so is there an example I could use as a template? Second, do the algorithms have a setting for the max number of connections used in a possible solution? Say for example, a max of 3 connections are allowed in a solution.

Many Thanks.

Hi @sindizzy, unfortunately, the library was initially designed for grid system (regardless of dimensions) and similar problems such as 8-puzzle. It may not suit your problem as the major issues are:

  1. It is tricky to implement a method that gets neighbor cities of the city where you are.
  2. It is tricky to implement a method that estimates the cost between the city where you are, and the goal city.

However, I'm still looking for the possibility of extending the library to make it fit the problem similar to yours. Thank you so much for the question!

Many thanks. Currently I am using Eric Lippert's implementation as re-coded by Leniel Maccaferri. He uses the Haversine formula to estimate geographic distances.

Works really well but I am looking to also add different algorithms and options. Unfortunately I am just not that skilled in path finding.