Boost logo

Boost Users :

Subject: Re: [Boost-users] [graph] dijkstra additional constrains that will stop the search (ex. distance from source)
From: The Maschine (justthemaschine_at_[hidden])
Date: 2013-04-16 16:18:03


:) My description of the problem is hopeless.

The boost::dijkstra_shortest_paths(m_ugraph, *vertex_iterator_begin, boost::
predecessor_map(predecessorMap).distance_map(distanceMap));

currently works ok. Finds the shortest path based on the "edge_weight"
(this is what I need).

The addition I need: I need the search for the shortest path to stop if
outside a radius. (my graph is a street network).

lets say max "travel distance" = 4
Source -> V1(length=1) -> V2(length=3) -> V3(length=2) -> V4(length=1) -> V5
(length=1) ->VEnd

The search should end on V3 and V3 should be "unreachable" from the source
(V4,V5 and Vend should be unreachable too)

The distance_map should have the distances for V1 and V2 based on the
"edge_weight".

This explanation seems to be better.

Thanks
Tasos



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net