[pgrouting-users] increasing MAX_TOWNS for tsp

Hi all

How do I change MAX_TOWNS for tsp. I need to solve for blocks of between 200 and 500 nodes.

This ticket [1] points to change the value in the header file but I'm not sure exactly what to do to change it. Everything I've tried (not knowing c) results in make failing.

Where is the default of 40 set?

[1] ftp://download.osgeo.org/pgrouting/forum/pgrouting.postlbs.org/ticket/210.html

thanks

--
Gavin Fleming

On 4/20/2012 1:39 AM, Gavin Fleming wrote:

Hi all

How do I change MAX_TOWNS for tsp. I need to solve for blocks of between
200 and 500 nodes.

This ticket [1] points to change the value in the header file but I'm
not sure exactly what to do to change it. Everything I've tried (not
knowing c) results in make failing.

Where is the default of 40 set?

[1]
ftp://download.osgeo.org/pgrouting/forum/pgrouting.postlbs.org/ticket/210.html

thanks

In file extra/tsp/src/tsp.h:

change:

#define MAX_TOWNS 40

to

#define MAX_TOWNS 500

cmake -DWITH_TSP=ON .
make
sudo make install

-Steve