[GRASS5] v.net.path

Radim Blazek radim.blazek at gmail.com
Thu May 4 03:27:51 EDT 2006


On 5/3/06, Robin Chauhan <robin.chauhan at gmail.com> wrote:
> > dglib is not slow, the only problem is to calculate matrices of costs
> > for more points becaus dglib cache can fail it is disabled in v.net.* modules.
>
> Many thanks for your reply, Radim.
>
> Perhaps I should first focus on dglib cache and not the algorithm
> used.  I have also seen your email:
>  http://grass.itc.it/pipermail/grassuser/2003-November/010745.html
>
> Do you know how I can enable the cache to try it?  I tried just
> uncommenting this line in Vect_net_build_graph ( in
> lib/vector/Vlib/net.c )  :
>
>   dglInitializeSPCache( gr, &(Map->spCache) );

OK, but also lines 412 and 415, i am not sure if more.

> ...but that didnt change my run times significantly.

The cache has only efect in modules which calculates
matrices of costs for sets of nodes and that is not
case for v.net.path. Try the difference with
v.net.iso, v.net.salesman, v.net.alloc and v.net.steiner.

> Do you know more about the bug?  I have seen the small note in
> lib/vector/dglib/BUGS about it.  But I cannot tell, is it just an
> implementation detail bug, or a deeper theoretical problem.

I believe that it is just a bug in implementation. The cache cannot be
anything complex, it just saves the state reached in previous
search. Were you able to reproduce the BUG1?
That could be possible also with d.path but I am  not sure.

Radim




More information about the grass-dev mailing list