POV-Ray : Newsgroups : povray.off-topic : Map routing : Re: Map routing Server Time
6 Sep 2024 09:16:35 EDT (-0400)
  Re: Map routing  
From: scott
Date: 27 Jan 2009 05:46:44
Message: <497ee614@news.povray.org>
> As far as I can tell, Dijkstra's algorithm appears to visit *all* the 
> nodes of the graph. You can then read off the optimal path from the 
> initial node to any desired node - but surely computing the distance 
> function for every road in the country would be infeasible?
>
> I guess if you know "approximately" what the optimal distance ought to be, 
> you can just ignore any node that's further away then that or something... 
> You're still computing quite a lot of data though.

You're beginning to invent the A* algorithm there ;-)

http://en.wikipedia.org/wiki/A*

I assume in real life applications there is some custom algorithm with many 
additions and hacks based on knowledge of the road system (as opposed to 
applying this to say a computer network).  Also I assume that roads are 
classified into speed ratings, so first it checks for any nearby motorways 
at either end and then checks a route based on that, before fiddling with 
the end sections etc, I imagine it can be quite complex!


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.