<div dir="ltr">Hi Steve,<div>thanks for your suggestion. I'll try that later when back from office.</div><div>BR</div><div>Carsten</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-02-20 15:41 GMT+01:00 Stephen Woodbridge <span dir="ltr"><<a href="mailto:woodbri@swoodbridge.com" target="_blank">woodbri@swoodbridge.com</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Carsten,<br>
<br>
The functions at<br>
<a href="http://dose.0wnz.at/scripts/sql/pgroute_tspDijkstra.sql" target="_blank">http://dose.0wnz.at/scripts/<u></u>sql/pgroute_tspDijkstra.sql</a><br>
are not part of pgRouting.<br>
<br>
You need to ask this question to Ivan the author of the original article.<br>
<br>
You probably need to add some debug statements to get a better understanding of what the code is doing. For example in pgr_makeDijkstraMatrix before the statement:<br>
<br>
ids := ids || array[r2.id1];<br>
<br>
Add:<br>
<br>
raise notice 'r2: %', r2;<br>
raise notice 'r2.id1: %', r2.id1;<br>
raise notice 'ids: %', ids;<br>
<br>
This should show you the progression of how the array ids is getting built as it appears to be compaining about that in the error message.<br>
<br>
Hope this helps,<br>
-Steve<div><div class="h5"><br>
<br>
On 2/20/2014 9:21 AM, Carsten Hogertz wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">
Hi everybody, I am new to this list and new to pgrouting.<br>
<br>
I found the following TSP example<br>
<a href="http://hardwarefetish.com/513-pgrouting-dijksta-travelling-salesman-problem-tsp-with-openstreetmap" target="_blank">http://hardwarefetish.com/513-<u></u>pgrouting-dijksta-travelling-<u></u>salesman-problem-tsp-with-<u></u>openstreetmap</a><br>
and tried to reproduce the solution.<br>
<br>
Unfortunately I always get an error message.<br>
My DB is complaining about one of your functions.<br>
<br>
I got my routing table from osm2po. The table has the following structure:<br>
<br>
1;”id”;”integer”<br>
2;”osm_id”;”bigint”<br>
3;”osm_name”;”character varying”<br>
4;”osm_meta”;”character varying”<br>
5;”osm_source_id”;”bigint”<br>
6;”osm_target_id”;”bigint”;<br>
7;”clazz”;”integer”<br>
8;”flags”;”integer”<br>
9;”source”;”integer”<br>
10;”target”;”integer”<br>
11;”length”;”double precision”<br>
12;”kmh”;”integer”<br>
13;”cost”;”double precision”<br>
14;”reverse_cost”;”double precision”<br>
15;”x1″;”double precision”<br>
16;”y1″;”double precision”<br>
17;”x2″;”double precision”<br>
18;”y2″;”double precision”<br>
19;”geom_way”;”geometry(<u></u>LineString,4326)”<br>
<br>
- I installed the functions as mentioned via SQL window in pgAdmin3<br>
(copy&paste then excecute)<br>
- I create and populate the my_route table<br>
- When it comes to step 5 and I try<br>
<br>
select id,lon,lat from pgr_tspDijkstraLen(’my_route’, 1260<br>
) dj, my_route rt where dj.id2=rt.node;<br>
<br>
my DB warns<br>
<br>
ERROR: cannot concatenate incompatible arrays<br>
DETAIL: Arrays with differing element dimensions are not compatible for<br>
concatenation.<br>
CONTEXT: PL/pgSQL function “pgr_makedijkstramatrix” line 25 at<br>
assignment PL/pgSQL function “pgr_tspdijkstra” line 8 at RETURN QUERY<br>
PL/pgSQL function “pgr_tspdijkstralen” line 3 at RETURN QUERY<br>
<br>
********** Fehler **********<br>
<br>
ERROR: cannot concatenate incompatible arrays SQL Status:2202E<br>
Detail:Arrays with differing element dimensions are not compatible for<br>
concatenation.<br>
Kontext:PL/pgSQL function “pgr_makedijkstramatrix” line 25 at assignment<br>
PL/pgSQL function “pgr_tspdijkstra” line 8 at RETURN QUERY<br>
PL/pgSQL function “pgr_tspdijkstralen” line 3 at RETURN QUERY<br>
<br>
Do you have any idea what went wrong? I really really need your<br>
solutionget working. I would appreciate a lot.<br>
<br>
Thanks for your help.<br>
<br>
PS: this text is a copy of what I wrote on on the comment site of the<br>
blog where I found the solution.<br>
<br>
BR<br>
Carsten<br>
<br>
<br></div></div>
______________________________<u></u>_________________<br>
Pgrouting-users mailing list<br>
<a href="mailto:Pgrouting-users@lists.osgeo.org" target="_blank">Pgrouting-users@lists.osgeo.<u></u>org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/pgrouting-users" target="_blank">http://lists.osgeo.org/<u></u>mailman/listinfo/pgrouting-<u></u>users</a><br>
<br>
</blockquote>
<br>
______________________________<u></u>_________________<br>
Pgrouting-users mailing list<br>
<a href="mailto:Pgrouting-users@lists.osgeo.org" target="_blank">Pgrouting-users@lists.osgeo.<u></u>org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/pgrouting-users" target="_blank">http://lists.osgeo.org/<u></u>mailman/listinfo/pgrouting-<u></u>users</a></blockquote></div><br></div>