[GRASS-user] v.net.salesman problem: number of cities [0]
Moritz Lennert
mlennert at club.worldonline.be
Fri Jun 26 05:52:29 EDT 2009
On 24/06/09 19:46, Marco Lechner - FOSSGIS e.V. wrote:
> hi list,
>
> I've got a little net of ways and try to calculate a route from it. all
> the crossroads and all the ends of culs-de-sac have to be reached.
> according to the syntax of traveling-salesman-problem each cul-de-sac
> and crossroad is a "city". I tried the following:
> - import of the ways using v.in.ogr
> - v.clean.break to segment the ways at crossroads
> - v.net.nodes to create arcs and nodes of the net (looks o.k.)
I guess you mean v.net operation=nodes ? What is the exact command line
you use ?
> - v.net.salesman input=net_nodes alayer=1 nlayer=0 ccats=0
> output=net_salesman
By default, nlayer should be 2 and ccats has to list the cat values of
the nodes you want to include in your salesman journey. If you just want
to include all nodes, use ccats=1-9999.
> to get the solution, but instead I get the following error message:
>
> Number of cities: [0]
> ERROR: Not enough cities (< 2)
>
> although layer_0 consists of 4 nodes (two at ends of cul-de-sac and two
> crossroads.
What is layer_0 and how do you see that it contains the nodes ?
> In addition to that the cat-row is 0 at every node.
Again, could you tell us how you get that info ?
Moritz
More information about the grass-user
mailing list