[pgrouting-dev] selection of node types in dijkstra/TSP etc

Dave Potts dave.potts at pinan.co.uk
Wed Apr 11 04:22:50 EDT 2012


Hi Steve,

Thats useful but its not quite what I am looking for.

I can not make a preselection before I start routing, what I am actual
after is a 'rule based selection'

for example before selecting the next node to consider when selecting the
shortest path,  I like to apply a set of rules.


Whats the shortest path if I consider this dangerous node.
Whats the shortest path if I consider what to go near this node etc

There are many reasons why should you choose to go near nodes, some may be
more danegrous that others.  I can just screen out all the nodes before I
start out.

Dave.
Stephen Woodbridge wrote:
> On 4/10/2012 7:22 AM, Dave Potts wrote:
>>
>>
>> Hi
>>
>> Normally routing problems such as dijkstra/TSP always select the best
>> route by the length of the route.
>>
>> Does anybody known a version that selects the route choosen by the node
>> type as well as the distance covered?  The reason that I ask, in cases
>> the
>> select of the node type is important for example
>>
>> I am trying to get from node A to F,
>>
>> I have to possible routes A B C F  , A E to F or A D F.
>>
>> The route  A D E is the shortest one, but D is noted number of highway
>> men/gunfighters living in town.
>>
>> I am a careful man and would prefer to travel the safest fast route.  Is
>> there a generic solution to this type of problem other than removing D
>> from the input list of nodes to compare?
>>
>> Can anybody suggest a different news group where this type of issue
>> could
>> be raised?
>
> In pgRouting it is trivial to do this by putting a filter on the edges
> to remove edges or nodes of a particular class(es). Something like:
>
> select * from edges where etype != 'dangerous';
>
> select * from edges a, nodes b where a.source=b.id or a.target=b.id and
> b.ntype not in ('dangerous', 'dirty');
>
> -Steve
> _______________________________________________
> pgrouting-dev mailing list
> pgrouting-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/pgrouting-dev
>


-- 




More information about the pgrouting-dev mailing list