Hey Guys,
I have a pgrouting question.
Dijkstra returns the shortest path i.e. it chooses a path which minimizes the edge costs.
Is there an algorithm that chooses a path which maximizes the edge cost? I have my edge costs stored as likelihoods (so the higher the better).
Cathal
Hi Cathal,
I think if you build your graph with edge costs = 1/actual_cost, the output path will be as required.
You can then call the dijkstra algorithm as required.
Does this solve your problem?
On Wed, Jun 29, 2011 at 3:23 PM, cathal coffey <coffey.cathal@gmail.com> wrote:
Hey Guys,
I have a pgrouting question.
Dijkstra returns the shortest path i.e. it chooses a path which minimizes the edge costs.
Is there an algorithm that chooses a path which maximizes the edge cost? I have my edge costs stored as likelihoods (so the higher the better).
Cathal
pgrouting-dev mailing list
pgrouting-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/pgrouting-dev
–
Regards,
-Jay Mahadeokar