<div dir="ltr">Hi everybody, I am new to this list and new to pgrouting.<br><br><div>I found the following TSP example <a href="http://hardwarefetish.com/513-pgrouting-dijksta-travelling-salesman-problem-tsp-with-openstreetmap">http://hardwarefetish.com/513-pgrouting-dijksta-travelling-salesman-problem-tsp-with-openstreetmap</a></div>
<div>and tried to reproduce the solution.</div><div><br></div><div>Unfortunately I always get an error message.</div><div>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(LineString,4326)”<br><br>- I installed the functions as mentioned via SQL window in pgAdmin3 (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 concatenation.<br>
CONTEXT: PL/pgSQL function “pgr_makedijkstramatrix” line 25 at 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 concatenation.<br>Kontext:PL/pgSQL function “pgr_makedijkstramatrix” line 25 at assignment 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 solutionget working. I would appreciate a lot.</div><div><br></div><div>Thanks for your help.</div>
<div><br></div><div>PS: this text is a copy of what I wrote on on the comment site of the blog where I found the solution.</div><div><br></div><div>BR</div><div>Carsten</div></div>