Shortest route between multiple points

前端 未结 4 642
悲哀的现实
悲哀的现实 2021-01-29 11:46

I need to find the shortest route between multipe points. Let\'s say that I have these four points:

var startPoint = new Point(1, 1);
var pointsToGoPast = new Li         


        
4条回答
  •  梦毁少年i
    2021-01-29 12:44

    As has already been pointed out, it is not clear what the cost is of going from one point to another point. Is it just the distance between those points? Anyway, regardless, such a problem can be solved using conventional Linear Programming. I've just finished making a C# library to simplify shortest path problems. Downloadable here.

    There is still more work to do on this library, but it should give you what you want in a very simple manner.

    Regards,

    Bruce.

提交回复
热议问题