[pgrouting-users] increasing MAX_TOWNS for tsp

Stephen Woodbridge woodbri at swoodbridge.com
Fri Apr 20 08:35:13 EDT 2012


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


More information about the Pgrouting-users mailing list