3

With pgRouting 2.0 there are two different TSP functions, see: http://docs.pgrouting.org/2.0/en/src/tsp/doc/index.html#pgr-tsp The first one has as first argument a SQL statement (that's the one you are using), the second one requires a distance matrix. The advantage of the distance matrix is, that it's up to you, how exact you want to calculate the ...


2

Use this query to get the route for the sequence of given nodes. select fd.seq as seq, fd.geo as geo from ( SELECT ROW_NUMBER() OVER (ORDER BY now() ASC) AS seq, ( SELECT (ST_Collect(foo.geo)) FROM ( SELECT e.the_geom as geo FROM pgr_dijkstra('SELECT gid as id,source, target, rcost_len ...


1

Complementing, previous answer.. montevideo-release-v4 is the latest branch. There is a lot of clean up that needs to be done as everything we coded is still there even if its not used.


1

The thing that you want to do is to solve Travelling Salesman Problem or one of its variations. 7000 points is a very difficult task. And you may spent a lot time calculating it (depending on software and algorithm) There is an open-source implementation of Genetic algorithm (not the most advanced one) in pgRouting extension for PostGIS. Another option is ...


1

jsprit and MATSim are open source Java projects. They do not use PostGIS database, but have their own datastructures they use for networks/graphs which are persisted in XML files. If you think about using them to solve your problem, you would need to convert your network you have in your PostGIS database into the MATSim XML format. This conversion would need ...


1

You specify that the route should start on node 1 but there is no node 1 in the query result set. That can't work ... According to the documentation http://docs.pgrouting.org/dev/src/tsp/doc/index.html, you should specify the start point id. This works: create table tsp_test (id integer, x double precision, y double precision); insert into tsp_test (id,x,...


1

In case you decide to use pgRouting for TSP the answers to your questions are: a) pgRouting's documentation for TSP b) When you install pgRouting with CREATE EXTENSION pgrouting;, then the TSP function is available, too. c) This decision is up to you.


Only top voted, non community-wiki answers of a minimum length are eligible