Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
Home
Help
Login
Register
TheSwamp
»
Code Red
»
.NET
»
Topic:
Shortest Path along a network
« previous
next »
Print
Pages: [
1
] |
Go Down
Author
Topic: Shortest Path along a network (Read 1628 times)
0 Members and 1 Guest are viewing this topic.
themethodman
Mosquito
Posts: 12
Shortest Path along a network
«
on:
November 01, 2021, 08:32:50 AM »
Anyone seen a solution for solving for the shortest path from point A to point B along a network of polylines for c# .NET?
Have only been able to find LISP examples.
A little surprised this hasn't been asked before (or I haven't been able to find a relevant previous post).
For reference, this implementation linked below is example what I'm after (just not in lisp!)
https://www.cadforum.cz/en/the-shortest-path-between-two-points-on-a-network-tip10383
Logged
It's Alive!
Retired
Needs a day job
Posts: 8788
AKA Daniel
WWW
Re: Shortest Path along a network
«
Reply #1 on:
November 01, 2021, 08:07:54 PM »
I thought there was a challenge with this once.
You should be able to port lisp to C#, i know it can be difficult the way some lisp routines are written lol.
Logged
https://github.com/CEXT-Dan/PyRx
https://pyarx.blogspot.com/
dgorsman
Water Moccasin
Posts: 2437
Re: Shortest Path along a network
«
Reply #2 on:
November 04, 2021, 11:50:23 AM »
There should be several examples of generic A* pathfinding in C# out there. The bulk of your work (and it won't be much) would be interpreting the network of plines into nodes and edges.
Logged
If you are going to fly by the seat of your pants, expect friction burns.
try {GreatPower;}
catch (notResponsible)
{NextTime(PlanAhead);}
finally
{MasterBasics;}
Augusto
Newt
Posts: 75
Re: Shortest Path along a network
«
Reply #3 on:
November 06, 2021, 10:48:29 AM »
https://en.wikipedia.org/wiki/Dijkstra%27s_algorithm
There are many examples on the internet, but I believe this one can help you.
Enjoy.
https://www.codeproject.com/Articles/1221034/Pathfinding-Algorithms-in-Csharp
Logged
kirby
Newt
Posts: 132
Re: Shortest Path along a network
«
Reply #4 on:
November 08, 2021, 07:58:39 AM »
A lisp solution that could be converted to C#
https://www.theswamp.org/index.php?topic=45092.msg503957#msg503957
Logged
Print
Pages: [
1
] |
Go Up
« previous
next »
TheSwamp
»
Code Red
»
.NET
»
Topic:
Shortest Path along a network