[GRASS-user] error with v.net.salesman

Hello everyone. I'm trying v.net.salesman module. I followed the
instructions in the manual page. All tests are good, except one case,
which returns the following error:

v.net.salesman myroads_net ccats=1-237 out=mysalesman2

Number of cities: [237]
Building graph...
Registering arcs...
100%
Flattening the graph...
Graph was built
ERROR: Destination node [604] is unreachable from node [1045]

The range 1-237 refers to all nodes in the network.

I can not find a way of relate [604] and [1045] with categories.

Thanks for any advice to deal with this.

Saludos
José María

Hi José,

On Wed, Dec 31, 2008 at 8:39 AM, José María Michia
<jose.maria.michia@gmail.com> wrote:

Hello everyone. I'm trying v.net.salesman module. I followed the
instructions in the manual page. All tests are good, except one case,
which returns the following error:

v.net.salesman myroads_net ccats=1-237 out=mysalesman2

Number of cities: [237]
Building graph...
Registering arcs...
100%
Flattening the graph...
Graph was built
ERROR: Destination node [604] is unreachable from node [1045]

The range 1-237 refers to all nodes in the network.

I can not find a way of relate [604] and [1045] with categories.

Are you using the Spearfish data set?

I have replicated the example of the man page without problems.
Additionally, I have tried yours:

GRASS 6.4.svn (spearfish60):~ > v.net.salesman myroads_net ccats=1-237
out=mysalesman2
Number of cities: [6]
Building graph...
Registering arcs...
100%
Flattening the graph...
Graph was built

Cycle:
Arcs' categories (layer 1, 107 arcs):
4,4,4,4,4,4,5,5,4,2,2,4,4,4,5,5,5,5,5,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,2,2,2,2,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,4,4,4,4,4,4,4,4,4,4,2,2,2,4,4,2,2,2,2,2,2,2,2,5,5,5,5,4,4,4,4,4,4,4,4,4,4,4,4,4

Nodes' categories (layer 2, 107 nodes):
2,1,6,5,4,3

Building topology for vector map <mysalesman2>...
Registering primitives...
113 primitives registered
872 vertices registered
Building areas...
100%
0 areas built
0 isles built
Attaching islands...
Attaching centroids...
100%
Number of nodes: 107
Number of primitives: 113
Number of points: 6
Number of lines: 107
Number of boundaries: 0
Number of centroids: 0
Number of areas: 0
Number of isles: 0

-> no problem.

Question: Which GRASS version are you using, whih operating system?

I am using 6.4.0RC1 here.

Markus

On Wed, Dec 31, 2008 at 5:20 AM, Markus Neteler <neteler@osgeo.org> wrote:

Hi José,

On Wed, Dec 31, 2008 at 8:39 AM, José María Michia
<jose.maria.michia@gmail.com> wrote:

Hello everyone. I'm trying v.net.salesman module. I followed the
instructions in the manual page. All tests are good, except one case,
which returns the following error:

v.net.salesman myroads_net ccats=1-237 out=mysalesman2

Number of cities: [237]
Building graph...
Registering arcs...
100%
Flattening the graph...
Graph was built
ERROR: Destination node [604] is unreachable from node [1045]

The range 1-237 refers to all nodes in the network.

I can not find a way of relate [604] and [1045] with categories.

Are you using the Spearfish data set?

I have replicated the example of the man page without problems.
Additionally, I have tried yours:

GRASS 6.4.svn (spearfish60):~ > v.net.salesman myroads_net ccats=1-237
out=mysalesman2
Number of cities: [6]
Building graph...
Registering arcs...
100%
Flattening the graph...
Graph was built

Cycle:
Arcs' categories (layer 1, 107 arcs):
4,4,4,4,4,4,5,5,4,2,2,4,4,4,5,5,5,5,5,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,2,2,2,2,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,4,4,4,4,4,4,4,4,4,4,2,2,2,4,4,2,2,2,2,2,2,2,2,5,5,5,5,4,4,4,4,4,4,4,4,4,4,4,4,4

Nodes' categories (layer 2, 107 nodes):
2,1,6,5,4,3

Building topology for vector map <mysalesman2>...
Registering primitives...
113 primitives registered
872 vertices registered
Building areas...
100%
0 areas built
0 isles built
Attaching islands...
Attaching centroids...
100%
Number of nodes: 107
Number of primitives: 113
Number of points: 6
Number of lines: 107
Number of boundaries: 0
Number of centroids: 0
Number of areas: 0
Number of isles: 0

-> no problem.

Question: Which GRASS version are you using, whih operating system?

I am using 6.4.0RC1 here.

Markus
_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

FYI, I have hadd good luck with v.net.salesman using the latest 6.4-SVN:

http://casoilresource.lawr.ucdavis.edu/drupal/node/698

Dylan

2008/12/31 Markus Neteler <neteler@osgeo.org>:

Hi José,

On Wed, Dec 31, 2008 at 8:39 AM, José María Michia
<jose.maria.michia@gmail.com> wrote:

Hello everyone. I'm trying v.net.salesman module. I followed the
instructions in the manual page. All tests are good, except one case,
which returns the following error:

v.net.salesman myroads_net ccats=1-237 out=mysalesman2

Number of cities: [237]
Building graph...
Registering arcs...
100%
Flattening the graph...
Graph was built
ERROR: Destination node [604] is unreachable from node [1045]

The range 1-237 refers to all nodes in the network.

I can not find a way of relate [604] and [1045] with categories.

Are you using the Spearfish data set?

Not, I'm using my own dataset.

I have replicated the example of the man page without problems.
Additionally, I have tried yours:

GRASS 6.4.svn (spearfish60):~ > v.net.salesman myroads_net ccats=1-237
out=mysalesman2
Number of cities: [6]
Building graph...
Registering arcs...
100%
Flattening the graph...
Graph was built

Cycle:
Arcs' categories (layer 1, 107 arcs):
4,4,4,4,4,4,5,5,4,2,2,4,4,4,5,5,5,5,5,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,2,2,2,2,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,4,4,4,4,4,4,4,4,4,4,2,2,2,4,4,2,2,2,2,2,2,2,2,5,5,5,5,4,4,4,4,4,4,4,4,4,4,4,4,4

Nodes' categories (layer 2, 107 nodes):
2,1,6,5,4,3

Building topology for vector map <mysalesman2>...
Registering primitives...
113 primitives registered
872 vertices registered
Building areas...
100%
0 areas built
0 isles built
Attaching islands...
Attaching centroids...
100%
Number of nodes: 107
Number of primitives: 113
Number of points: 6
Number of lines: 107
Number of boundaries: 0
Number of centroids: 0
Number of areas: 0
Number of isles: 0

-> no problem.

Question: Which GRASS version are you using, whih operating system?

I am using 6.4.0RC1 here.

I am using grass compiled from SVN (downloaded few weeks past).

Markus

Thanks Markus

Saludos
José María

2008/12/31 Dylan Beaudette <dylan.beaudette@gmail.com>:

On Wed, Dec 31, 2008 at 5:20 AM, Markus Neteler <neteler@osgeo.org> wrote:

Hi José,

On Wed, Dec 31, 2008 at 8:39 AM, José María Michia
<jose.maria.michia@gmail.com> wrote:

Hello everyone. I'm trying v.net.salesman module. I followed the
instructions in the manual page. All tests are good, except one case,
which returns the following error:

v.net.salesman myroads_net ccats=1-237 out=mysalesman2

Number of cities: [237]
Building graph...
Registering arcs...
100%
Flattening the graph...
Graph was built
ERROR: Destination node [604] is unreachable from node [1045]

The range 1-237 refers to all nodes in the network.

I can not find a way of relate [604] and [1045] with categories.

Are you using the Spearfish data set?

I have replicated the example of the man page without problems.
Additionally, I have tried yours:

GRASS 6.4.svn (spearfish60):~ > v.net.salesman myroads_net ccats=1-237
out=mysalesman2
Number of cities: [6]
Building graph...
Registering arcs...
100%
Flattening the graph...
Graph was built

Cycle:
Arcs' categories (layer 1, 107 arcs):
4,4,4,4,4,4,5,5,4,2,2,4,4,4,5,5,5,5,5,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,2,2,2,2,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,4,4,4,4,4,4,4,4,4,4,2,2,2,4,4,2,2,2,2,2,2,2,2,5,5,5,5,4,4,4,4,4,4,4,4,4,4,4,4,4

Nodes' categories (layer 2, 107 nodes):
2,1,6,5,4,3

Building topology for vector map <mysalesman2>...
Registering primitives...
113 primitives registered
872 vertices registered
Building areas...
100%
0 areas built
0 isles built
Attaching islands...
Attaching centroids...
100%
Number of nodes: 107
Number of primitives: 113
Number of points: 6
Number of lines: 107
Number of boundaries: 0
Number of centroids: 0
Number of areas: 0
Number of isles: 0

-> no problem.

Question: Which GRASS version are you using, whih operating system?

I am using 6.4.0RC1 here.

Markus
_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

FYI, I have hadd good luck with v.net.salesman using the latest 6.4-SVN:

http://casoilresource.lawr.ucdavis.edu/drupal/node/698

Dylan

Thanks Dylan, Markus, and all great people from GRASS.

I think my error is due to something wrong with the data, not the code.

Anyway, I will to download a fresh copy of GRASS sources from SVN. I
will try again and hope find the problem.

I will collect more information and data, to include in my questions,
if it becomes necessary.

I want to find the best route, but I do not rush. I am about to
receive a fresh year, full of time to continue using GRASS! Happy
2009!

Saludos
José María

On Wed, Dec 31, 2008 at 7:09 PM, José María Michia
<jose.maria.michia@gmail.com> wrote:

2008/12/31 Markus Neteler <neteler@osgeo.org>:

Hi José,

On Wed, Dec 31, 2008 at 8:39 AM, José María Michia
<jose.maria.michia@gmail.com> wrote:

Hello everyone. I'm trying v.net.salesman module. I followed the
instructions in the manual page. All tests are good, except one case,
which returns the following error:

v.net.salesman myroads_net ccats=1-237 out=mysalesman2

Number of cities: [237]
Building graph...
Registering arcs...
100%
Flattening the graph...
Graph was built
ERROR: Destination node [604] is unreachable from node [1045]

The range 1-237 refers to all nodes in the network.

I can not find a way of relate [604] and [1045] with categories.

Are you using the Spearfish data set?

Not, I'm using my own dataset.

Did you try v.net to connect the missing nodes?
http://grass.osgeo.org/grass64/manuals/html64_user/v.net.html

Perhaps that solves the problem.
Additionally, d.vect can show node numbers with
disp=topo

This should, in combination with d.zoom help to identify the
(I suppose) data problem.

Markus

Perhaps that solves the problem.
Additionally, d.vect can show node numbers with
disp=topo

This should, in combination with d.zoom help to identify the
(I suppose) data problem.

Markus

Thanks. Using this advice, I've found the problem: a road isolated
from the rest.

Other command that I've used to debug my data:

v.build map=myroads_net option=dump --verbose |less

The above command show all nodes with full info (the coordinates
showing here can facilitate zooming to node).

I deleted the road isolated, and tried again with success!

Thank you very much.

Saludos
José María

FYI, I have hadd good luck with v.net.salesman using the latest 6.4-SVN:

http://casoilresource.lawr.ucdavis.edu/drupal/node/698

Dylan

Thanks for the link. Very nice example!

Saludos
José María