<div dir="ltr"><div><div><div><div><div>Thanks Steve,<br><br></div>my version is<br>PostgreSQL 9.1.11 on i686-pc-linux-gnu, compiled by gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3, 32-bit<br></div>I'am running it on a OSGeoLive 7.0<br>
<br></div>I'll wait till later or if someone else who wants to try to solve this one I'll be happy.<br></div>Until later<br>--<br></div>Carsten<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-02-25 21:23 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">I'm busy for the next few days so I will not have time to look at it until later this week.<br>
<br>
What version of postgresql are you running?<br>
<br>
select * from version();<br>
<br>
I would google "postgresql array functions" and read up on these.There is a function that will tell you the dimensions of an array and maybe you need to print out some more notices to figure out what it is expecting.<br>
<br>
Maybe someone else on the list wants to take a crack at this.<br>
<br>
Thanks,<br>
-Steve<br>
<br>
On 2/25/2014 3:14 PM, Carsten Hogertz wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Steve,<br>
have been busy the last days so I only check your Thursday's solution<br>
right now. Still not working.<br>
My function looks like this:<br>
<br>
create or replace function pgr_makeDijkstraMatrix(thetbl text, sqlP<br>
text, OUT dmatrix double precision[], OUT ids integer[])<br>
as<br>
$body$<br>
declare<br>
sql text;<br>
sql2 text;<br>
r record;<br>
r2 record;<br>
i integer;<br>
j integer;<br>
matrixl double precision[];<br>
begin<br>
<br>
ids := '{}'::integer[];<br>
sql:='select node, id-1 as id from '||thetbl;<br>
for r in execute sql loop<br>
sql2:='select id1, array_agg(cost) as arow from (<br>
SELECT id1, id2, cost<br>
FROM pgr_kdijkstraCost('''||sqlP||'<u></u>'', '||r.node||<br>
', (select array_agg(node) from '||thetbl||' where<br>
id>'||<a href="http://r.id" target="_blank">r.id</a> <<a href="http://r.id" target="_blank">http://r.id</a>>||'), false, false)<br>
) as foo group by id1 order by id1';<br>
for r2 in execute sql2 loop<br>
matrixl := '{}';<br>
for i in 1..<a href="http://r.id" target="_blank">r.id</a> <<a href="http://r.id" target="_blank">http://r.id</a>> loop<br>
matrixl := array_append(matrixl, dmatrix[i][<a href="http://r.id" target="_blank">r.id</a><br>
<<a href="http://r.id" target="_blank">http://r.id</a>>+1]);<br>
end loop;<br>
matrixl := array_cat(matrixl, r2.arow);<br>
dmatrix := array_cat(dmatrix, array[matrixl]);<br>
raise notice 'r2: %', r2;<br>
raise notice 'r2.id1: %', r2.id1;<br>
raise notice 'ids: %', ids;<br>
--ids := ids || r2.id1;<br>
ids := array_cat(ids, array[r2.id1]);<br>
end loop;<br>
end loop;<br>
end;<br>
$body$<br>
language plpgsql stable cost 10;<br>
<br>
<br>
create or replace function pgr_tspDijkstra(thetbl text, sql text,<br>
start_id integer, end_id integer default (-1))<br>
returns setof pgr_costResult as<br>
$body$<br>
declare<br>
sid integer;<br>
eid integer;<br>
<br>
begin<br>
<br>
return query with dm as (<br>
select * from pgr_makeDijkstraMatrix( thetbl, sql )<br>
),<br>
ids as (<br>
select (row_number() over (order by id asc))-1 as rnum, id<br>
from (<br>
select unnest(ids) as id<br>
from dm<br>
) foo<br>
),<br>
t as (<br>
select a.seq, b.rnum, <a href="http://b.id" target="_blank">b.id</a> <<a href="http://b.id" target="_blank">http://b.id</a>><br>
from pgr_tsp(<br>
(select dmatrix from dm),<br>
(select rnum from ids where id=start_id limit<br>
1)::integer,<br>
(case when end_id = -1 then -1 else (select rnum<br>
from ids where id=end_id limit 1) end)::integer<br>
) a,<br>
ids b<br>
where <a href="http://a.id" target="_blank">a.id</a> <<a href="http://a.id" target="_blank">http://a.id</a>>=b.rnum<br>
),<br>
r as (<br>
select array_agg(t.rnum) as rnum from t<br>
)<br>
select t.seq::integer,<br>
t.rnum::integer as id1,<br>
t.id::integer as id2,<br>
<br>
dm.dmatrix[r.rnum[t.seq+1]+1][<u></u>r.rnum[(t.seq+1)%array_length(<u></u>r.rnum,<br>
1)+1]+1]::float8 as cost<br>
from t, dm, r;<br>
end;<br>
$body$<br>
language plpgsql volatile cost 50 rows 50;<br>
<br>
<br>
create or replace function pgr_tspDijkstraLen(thetbl text, start_id<br>
integer, end_id integer default (-1))<br>
returns setof pgr_costResult as<br>
$body$<br>
begin<br>
return query SELECT * FROM pgr_tspDijkstra(thetbl,<br>
'SELECT id, source::integer, target::integer, length::double<br>
precision AS cost FROM cgn_2po_4pgr',<br>
start_id, end_id);<br>
end;<br>
$body$<br>
language plpgsql stable;<br>
<br>
<br>
<br>
AND the error I am getting:<br>
NOTICE: r2:<br>
(34304,"{0,5.<a href="tel:3602868897" value="+13602868897" target="_blank">3602868897</a>,4.<a href="tel:6782573327" value="+16782573327" target="_blank">6782573327</a>,5.<a href="tel:6026971537" value="+16026971537" target="_blank">6026971537</a>,5.<a href="tel:2062747797" value="+12062747797" target="_blank">2062747797</a>,5.<u></u>0497181017,5.<a href="tel:3147719797" value="+13147719797" target="_blank">3147719797</a>,5.<u></u>0700916462,4.3220066797,4.<u></u><a href="tel:8593618137" value="+18593618137" target="_blank">8593618137</a>,4.0002255227,6.<u></u>055760592,12.<a href="tel:5155379824" value="+15155379824" target="_blank">5155379824</a>,9.<u></u>3170226155,8.72783427270001,5.<u></u>9460446587,3.0868131677,5.<u></u>1839796057,5.2301666167,2.<u></u>1211198847,5.<a href="tel:7037465591" value="+17037465591" target="_blank">7037465591</a>,2.<u></u>7282842677,8.<a href="tel:4758437557" value="+14758437557" target="_blank">4758437557</a>,11.<u></u>1027935904,7.9434273599,7.<u></u>8361619299,7.7610621969,7.<u></u>4929139614,5.<a href="tel:8106133327" value="+18106133327" target="_blank">8106133327</a>,5.<u></u>9579132527,5.9888473034,6.<u></u><a href="tel:5618433959" value="+15618433959" target="_blank">5618433959</a>,4.<a href="tel:5013708887" value="+15013708887" target="_blank">5013708887</a>,1.<u></u>9218516244,5.7559805232,5.<u></u><a href="tel:2267081177" value="+12267081177" target="_blank">2267081177</a>,5.0968196707,4.<u></u>8949133597,5.<a href="tel:9137964962" value="+19137964962" target="_blank">9137964962</a>,4.<u></u>2936059427,4.6948533593,3.<u></u><a href="tel:4377318427" value="+14377318427" target="_blank">4377318427</a>,3.7991617067,4.<u></u>1242444467,3.8858731777,3.<u></u>9596393887,4.<a href="tel:9192685996" value="+19192685996" target="_blank">9192685996</a>,4.<u></u>6734033563,4.7511846457,4.<u></u>4544981945,4.2748693367,3.<u></u>411559417,6.6851381985,6.<u></u>6744741285,6.9296475385,7.<u></u>0136847108,7.1371500908,7.<u></u>2719520708,6.6787720528,7.<u></u>3530295908,6.8599596928,7.<u></u>2216891568,7.4951304208,7.<u></u>4404728868,8.1332243958,6.<u></u>2736028029,6.963685048,6.<u></u>0483763169,5.8653351624,5.<u></u>6164044005,6.54979166,5.<u></u>8783224469,6.533468297,5.<u></u>8553434082,5.7676662122,6.<u></u>267915357,5.22607939<br>
</blockquote>
03,3.745459072,6.352470342,5.<u></u>4392033722,5.5562602522,5.<u></u>3996670482,6.171297855,5.<u></u>648779598,5.5653279855,5.<u></u>671668653,5.3243595462,5.<u></u>879320328,5.859442385,6.<u></u>080574272,5.3767159992,6.<u></u>170852717,5.3001119472,5.<u></u>687201287,5.3573110752,3.<u></u>586385579,5.566591422,5.<u></u>5104826925,5.916268775,5.<u></u>4418422465,5.4037394705,5.<u></u>640889612,5.1407657702,4.<u></u>5523677017,5.3873769863,3.<u></u>601570449,2.978252449,4.<u></u>8725960282,4.9817842222,5.<u></u>2355359365,5.1227105795,5.<u></u>177856607,5.098596533,5.<u></u>1891181988,4.9327118245,4.<u></u>4632330777,7.4879538737,4.<u></u>8591269625,3.1339054377,5.<u></u>8472818275,4.6043306952,3.<u></u>3542942377,4.7660145915,6.<u></u>6679095357,5.51150886,2.<u></u>7404344677,5.9332075344,6.<u></u>2019594857,5.266709364,5.<u></u>4924174224,5.180577724,3.<u></u>0277711677,6.2913260157,4.<u></u>2862670877,5.5461328154,5.<u></u>5809644644,5.1132029296,5.<u></u>1904326724,4.8352505633,4.<u></u>9641930171,5.1366240426,7.<u></u>0699378037,3.1274712477,5.<u></u>1487646306,5.2717034197,5.<u></u>0200090866,3.0911490977,5.<u></u>8984613527,5.1973381747,4.<u></u>2427530627,6.7293864957,4.<u></u>7943011637,5.1130266607,5.<u></u>3948779287,4.7124246547,5.2<br>
186371577,2.<a href="tel:9723417287" value="+19723417287" target="_blank">9723417287</a>,2.3171875277,2.<a href="tel:8159853427" value="+18159853427" target="_blank">8159853427</a>,<u></u>4.7913513947,4.<a href="tel:7863347867" value="+17863347867" target="_blank">7863347867</a>,3.4531342837,<u></u>3.8161332287,5.8431115757,4.<u></u>4873126817,5.6577494097,5.<u></u>5867970832,9.4583860946,2.<u></u>7784615917,5.4279953797,1.<u></u>9376872717,5.0813930177,5.<u></u>8860618114,6.2411339874,6.<u></u>4536904614,6.0972641874,5.<u></u>7247963284,5.9823452114,5.<u></u>8316140784,5.2398164977,6.<u></u>2963392357,5.5864457124,6.<u></u>1599995178,5.2609646384,6.<u></u>1012355027,6.4129483756,6.<u></u>0056487896,5.0106569884,5.<u></u>4239402364,6.1148656496,2.<u></u>673828844,4.3332873457,3.<u></u>2943586634,4.5834393467,7.<u></u>278601561,3.5870893269,3.<u></u>3299191554,4.1049776549,5.<u></u>9256568037,6.2719334873,6.<u></u>2594329923,5.5752581689,5.<u></u>6058592867,6.1311384893,6.<u></u>4726413519,5.8973941434,6.<u></u>2572672069,5.9667442136,5.<u></u>3965422637,7.2837623985,6.<u></u>9586195092,7.1137641952,6.<u></u>3682104908,7.8495628418,7.<u></u>2245886958,6.2983788278,7.<u></u>3509762248,6.9925366658,6.<u></u>5600944468,6.936328733,6.<u></u>616665943,6.738732443}")<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
CONTEXT: PL/pgSQL function "pgr_tspdijkstra" line 8 at RETURN QUERY<br>
PL/pgSQL function "pgr_tspdijkstralen" line 3 at RETURN QUERY<br>
NOTICE: r2.id1: 34304<br>
CONTEXT: PL/pgSQL function "pgr_tspdijkstra" line 8 at RETURN QUERY<br>
PL/pgSQL function "pgr_tspdijkstralen" line 3 at RETURN QUERY<br>
NOTICE: ids: {}<br>
CONTEXT: PL/pgSQL function "pgr_tspdijkstra" line 8 at RETURN QUERY<br>
PL/pgSQL function "pgr_tspdijkstralen" line 3 at RETURN QUERY<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 26 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>
********** Fehler **********<br>
<br>
ERROR: cannot concatenate incompatible arrays<br>
SQL Status:2202E<br>
Detail:Arrays with differing element dimensions are not compatible for<br>
concatenation.<br>
Kontext:PL/pgSQL function "pgr_makedijkstramatrix" line 26 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>
<br>
HOW comes? I really don't know what to do.<br>
May you be so kind and try to help again?<br>
Thanks<br>
Carsten<br>
<br>
<br>
2014-02-21 9:36 GMT+01:00 Carsten Hogertz <<a href="mailto:carsten.hogertz@gmail.com" target="_blank">carsten.hogertz@gmail.com</a><br>
<mailto:<a href="mailto:carsten.hogertz@gmail.com" target="_blank">carsten.hogertz@gmail.<u></u>com</a>>>:<br>
<br>
<br>
<br>
<br>
2014-02-20 23:25 GMT+01:00 Stephen Woodbridge<br>
<<a href="mailto:woodbri@swoodbridge.com" target="_blank">woodbri@swoodbridge.com</a> <mailto:<a href="mailto:woodbri@swoodbridge.com" target="_blank">woodbri@swoodbridge.<u></u>com</a>>>:<br>
<br>
On 2/20/2014 4:59 PM, Carsten Hogertz wrote:<br>
<br>
<br>
<br>
<br>
2014-02-20 22:47 GMT+01:00 Stephen Woodbridge<br>
<<a href="mailto:woodbri@swoodbridge.com" target="_blank">woodbri@swoodbridge.com</a> <mailto:<a href="mailto:woodbri@swoodbridge.com" target="_blank">woodbri@swoodbridge.<u></u>com</a>><br>
<mailto:<a href="mailto:woodbri@swoodbridge." target="_blank">woodbri@swoodbridge.</a>__<u></u>com<br>
<mailto:<a href="mailto:woodbri@swoodbridge.com" target="_blank">woodbri@swoodbridge.<u></u>com</a>>>>:<br>
<br>
<br>
On 2/20/2014 4:39 PM, Carsten Hogertz wrote:<br>
<br>
<br>
<br>
<br>
2014-02-20 22:20 GMT+01:00 Stephen Woodbridge<br>
<<a href="mailto:woodbri@swoodbridge.com" target="_blank">woodbri@swoodbridge.com</a><br>
<mailto:<a href="mailto:woodbri@swoodbridge.com" target="_blank">woodbri@swoodbridge.<u></u>com</a>><br>
<mailto:<a href="mailto:woodbri@swoodbridge." target="_blank">woodbri@swoodbridge.</a>__<u></u>com<br>
<mailto:<a href="mailto:woodbri@swoodbridge.com" target="_blank">woodbri@swoodbridge.<u></u>com</a>>><br>
<mailto:<a href="mailto:woodbri@swoodbridge" target="_blank">woodbri@swoodbridge</a>.<br>
<mailto:<a href="mailto:woodbri@swoodbridge" target="_blank">woodbri@swoodbridge</a>.>_<u></u>___com<br>
<mailto:<a href="mailto:woodbri@swoodbridge." target="_blank">woodbri@swoodbridge.</a>__<u></u>com<br>
<mailto:<a href="mailto:woodbri@swoodbridge.com" target="_blank">woodbri@swoodbridge.<u></u>com</a>>>>>:<br>
<br>
<br>
On 2/20/2014 3:54 PM, Carsten Hogertz wrote:<br>
<br>
Thanks Steve,<br>
<br>
coming home and adding your lines it<br>
returns with an error:<br>
<br>
NOTICE: r2:<br>
(34304,"{0,5.<a href="tel:3602868897" value="+13602868897" target="_blank">3602868897</a> <tel:<a href="tel:3602868897" value="+13602868897" target="_blank">3602868897</a>><br>
<tel:<a href="tel:3602868897" value="+13602868897" target="_blank">3602868897</a> <tel:<a href="tel:3602868897" value="+13602868897" target="_blank">3602868897</a>>><br>
<tel:<a href="tel:3602868897" value="+13602868897" target="_blank">3602868897</a> <tel:<a href="tel:3602868897" value="+13602868897" target="_blank">3602868897</a>> <tel:<a href="tel:3602868897" value="+13602868897" target="_blank">3602868897</a><br>
<tel:<a href="tel:3602868897" value="+13602868897" target="_blank">3602868897</a>>>>,4.<a href="tel:6782573327" value="+16782573327" target="_blank">6782573327</a> <tel:<a href="tel:6782573327" value="+16782573327" target="_blank">6782573327</a>><br>
<tel:<a href="tel:6782573327" value="+16782573327" target="_blank">6782573327</a> <tel:<a href="tel:6782573327" value="+16782573327" target="_blank">6782573327</a>>><br>
<tel:<a href="tel:6782573327" value="+16782573327" target="_blank">6782573327</a> <tel:<a href="tel:6782573327" value="+16782573327" target="_blank">6782573327</a>><br>
<tel:<a href="tel:6782573327" value="+16782573327" target="_blank">6782573327</a> <tel:<a href="tel:6782573327" value="+16782573327" target="_blank">6782573327</a>>>>,5.<a href="tel:6026971537" value="+16026971537" target="_blank">6026971537</a> <tel:<a href="tel:6026971537" value="+16026971537" target="_blank">6026971537</a>><br>
<tel:<a href="tel:6026971537" value="+16026971537" target="_blank">6026971537</a> <tel:<a href="tel:6026971537" value="+16026971537" target="_blank">6026971537</a>>> <tel:<a href="tel:6026971537" value="+16026971537" target="_blank">6026971537</a><br>
<tel:<a href="tel:6026971537" value="+16026971537" target="_blank">6026971537</a>> <tel:<a href="tel:6026971537" value="+16026971537" target="_blank">6026971537</a><br>
<tel:<a href="tel:6026971537" value="+16026971537" target="_blank">6026971537</a>>>>,5.<a href="tel:2062747797" value="+12062747797" target="_blank">2062747797</a> <tel:<a href="tel:2062747797" value="+12062747797" target="_blank">2062747797</a>><br>
<tel:<a href="tel:2062747797" value="+12062747797" target="_blank">2062747797</a> <tel:<a href="tel:2062747797" value="+12062747797" target="_blank">2062747797</a>>><br>
<tel:<a href="tel:2062747797" value="+12062747797" target="_blank">2062747797</a> <tel:<a href="tel:2062747797" value="+12062747797" target="_blank">2062747797</a>><br>
<br>
<tel:<a href="tel:2062747797" value="+12062747797" target="_blank">2062747797</a><br>
<tel:<a href="tel:2062747797" value="+12062747797" target="_blank">2062747797</a>>>>,5.__0497181017,5.<a href="tel:3147719797" value="+13147719797" target="_blank">3147719797</a><br>
<tel:<a href="tel:3147719797" value="+13147719797" target="_blank">3147719797</a>> <tel:<a href="tel:3147719797" value="+13147719797" target="_blank">3147719797</a> <tel:<a href="tel:3147719797" value="+13147719797" target="_blank">3147719797</a>>><br>
<tel:<a href="tel:3147719797" value="+13147719797" target="_blank">3147719797</a> <tel:<a href="tel:3147719797" value="+13147719797" target="_blank">3147719797</a>><br>
<tel:<a href="tel:3147719797" value="+13147719797" target="_blank">3147719797</a><br>
<tel:<a href="tel:3147719797" value="+13147719797" target="_blank">3147719797</a>>>>,5.__0700916462,4.____<u></u>3220066797,4.__<a href="tel:8593618137" value="+18593618137" target="_blank">8593618137</a><br>
<tel:<a href="tel:8593618137" value="+18593618137" target="_blank">8593618137</a>><br>
<tel:<a href="tel:8593618137" value="+18593618137" target="_blank">8593618137</a> <tel:<a href="tel:8593618137" value="+18593618137" target="_blank">8593618137</a>>><br>
<tel:<a href="tel:8593618137" value="+18593618137" target="_blank">8593618137</a> <tel:<a href="tel:8593618137" value="+18593618137" target="_blank">8593618137</a>><br>
<tel:<a href="tel:8593618137" value="+18593618137" target="_blank">8593618137</a><br>
<tel:<a href="tel:8593618137" value="+18593618137" target="_blank">8593618137</a>>>>,4.0002255227,6.______<u></u>055760592,12.<a href="tel:5155379824" value="+15155379824" target="_blank">5155379824</a><br>
<tel:<a href="tel:5155379824" value="+15155379824" target="_blank">5155379824</a>><br>
<tel:<a href="tel:5155379824" value="+15155379824" target="_blank">5155379824</a> <tel:<a href="tel:5155379824" value="+15155379824" target="_blank">5155379824</a>>><br>
<tel:<a href="tel:5155379824" value="+15155379824" target="_blank">5155379824</a> <tel:<a href="tel:5155379824" value="+15155379824" target="_blank">5155379824</a>><br>
<tel:<a href="tel:5155379824" value="+15155379824" target="_blank">5155379824</a><br>
<tel:<a href="tel:5155379824" value="+15155379824" target="_blank">5155379824</a>>>>,9.__3170226155,8.____<u></u>72783427270001,5.__9460446587,<u></u>____3.0868131677,5.__<u></u>1839796057,__5.__2301666167,2.<u></u>__1211198847,__5.__7037465591<br>
<tel:<a href="tel:7037465591" value="+17037465591" target="_blank">7037465591</a>><br>
<tel:<a href="tel:7037465591" value="+17037465591" target="_blank">7037465591</a> <tel:<a href="tel:7037465591" value="+17037465591" target="_blank">7037465591</a>>><br>
<tel:<a href="tel:7037465591" value="+17037465591" target="_blank">7037465591</a> <tel:<a href="tel:7037465591" value="+17037465591" target="_blank">7037465591</a>><br>
<br>
<tel:<a href="tel:7037465591" value="+17037465591" target="_blank">7037465591</a><br>
<tel:<a href="tel:7037465591" value="+17037465591" target="_blank">7037465591</a>>>>,2.__7282842677,8.<a href="tel:4758437557" value="+14758437557" target="_blank">4758437557</a><br>
<tel:<a href="tel:4758437557" value="+14758437557" target="_blank">4758437557</a>> <tel:<a href="tel:4758437557" value="+14758437557" target="_blank">4758437557</a> <tel:<a href="tel:4758437557" value="+14758437557" target="_blank">4758437557</a>>><br>
<tel:<a href="tel:4758437557" value="+14758437557" target="_blank">4758437557</a> <tel:<a href="tel:4758437557" value="+14758437557" target="_blank">4758437557</a>><br>
<tel:<a href="tel:4758437557" value="+14758437557" target="_blank">4758437557</a><br>
<tel:<a href="tel:4758437557" value="+14758437557" target="_blank">4758437557</a>>>>,11.__1027935904,7.___<u></u>_9434273599,7.__8361619299,7._<u></u>___7610621969,7.__4929139614,<u></u>5.____8106133327<br>
<tel:<a href="tel:8106133327" value="+18106133327" target="_blank">8106133327</a>><br>
<tel:<a href="tel:8106133327" value="+18106133327" target="_blank">8106133327</a> <tel:<a href="tel:8106133327" value="+18106133327" target="_blank">8106133327</a>>><br>
<tel:<a href="tel:8106133327" value="+18106133327" target="_blank">8106133327</a> <tel:<a href="tel:8106133327" value="+18106133327" target="_blank">8106133327</a>><br>
<tel:<a href="tel:8106133327" value="+18106133327" target="_blank">8106133327</a><br>
<tel:<a href="tel:8106133327" value="+18106133327" target="_blank">8106133327</a>>>>,5.__9579132527,5.____<u></u>9888473034,6.__<a href="tel:5618433959" value="+15618433959" target="_blank">5618433959</a><br>
<tel:<a href="tel:5618433959" value="+15618433959" target="_blank">5618433959</a>><br>
<tel:<a href="tel:5618433959" value="+15618433959" target="_blank">5618433959</a> <tel:<a href="tel:5618433959" value="+15618433959" target="_blank">5618433959</a>>><br>
<tel:<a href="tel:5618433959" value="+15618433959" target="_blank">5618433959</a> <tel:<a href="tel:5618433959" value="+15618433959" target="_blank">5618433959</a>><br>
<tel:<a href="tel:5618433959" value="+15618433959" target="_blank">5618433959</a> <tel:<a href="tel:5618433959" value="+15618433959" target="_blank">5618433959</a>>>>,4.<a href="tel:5013708887" value="+15013708887" target="_blank">5013708887</a> <tel:<a href="tel:5013708887" value="+15013708887" target="_blank">5013708887</a>><br>
<tel:<a href="tel:5013708887" value="+15013708887" target="_blank">5013708887</a> <tel:<a href="tel:5013708887" value="+15013708887" target="_blank">5013708887</a>>><br>
<tel:<a href="tel:5013708887" value="+15013708887" target="_blank">5013708887</a> <tel:<a href="tel:5013708887" value="+15013708887" target="_blank">5013708887</a>><br>
<tel:<a href="tel:5013708887" value="+15013708887" target="_blank">5013708887</a><br>
<tel:<a href="tel:5013708887" value="+15013708887" target="_blank">5013708887</a>>>>,1.__9218516244,5.____<u></u>7559805232,5.__<a href="tel:2267081177" value="+12267081177" target="_blank">2267081177</a><br>
<tel:<a href="tel:2267081177" value="+12267081177" target="_blank">2267081177</a>><br>
<tel:<a href="tel:2267081177" value="+12267081177" target="_blank">2267081177</a> <tel:<a href="tel:2267081177" value="+12267081177" target="_blank">2267081177</a>>><br>
<tel:<a href="tel:2267081177" value="+12267081177" target="_blank">2267081177</a> <tel:<a href="tel:2267081177" value="+12267081177" target="_blank">2267081177</a>><br>
<tel:<a href="tel:2267081177" value="+12267081177" target="_blank">2267081177</a><br>
<tel:<a href="tel:2267081177" value="+12267081177" target="_blank">2267081177</a>>>>,5.0968196707,4.______<u></u>8949133597,5.<a href="tel:9137964962" value="+19137964962" target="_blank">9137964962</a><br>
<tel:<a href="tel:9137964962" value="+19137964962" target="_blank">9137964962</a>><br>
<tel:<a href="tel:9137964962" value="+19137964962" target="_blank">9137964962</a> <tel:<a href="tel:9137964962" value="+19137964962" target="_blank">9137964962</a>>><br>
<tel:<a href="tel:9137964962" value="+19137964962" target="_blank">9137964962</a> <tel:<a href="tel:9137964962" value="+19137964962" target="_blank">9137964962</a>><br>
<tel:<a href="tel:9137964962" value="+19137964962" target="_blank">9137964962</a><br>
<tel:<a href="tel:9137964962" value="+19137964962" target="_blank">9137964962</a>>>>,4.__2936059427,4.____<u></u>6948533593,3.__<a href="tel:4377318427" value="+14377318427" target="_blank">4377318427</a><br>
<tel:<a href="tel:4377318427" value="+14377318427" target="_blank">4377318427</a>><br>
<tel:<a href="tel:4377318427" value="+14377318427" target="_blank">4377318427</a> <tel:<a href="tel:4377318427" value="+14377318427" target="_blank">4377318427</a>>><br>
<tel:<a href="tel:4377318427" value="+14377318427" target="_blank">4377318427</a> <tel:<a href="tel:4377318427" value="+14377318427" target="_blank">4377318427</a>><br>
<tel:<a href="tel:4377318427" value="+14377318427" target="_blank">4377318427</a><br>
<tel:<a href="tel:4377318427" value="+14377318427" target="_blank">4377318427</a>>>>,3.7991617067,4.______<u></u>1242444467,3.8858731777,3.____<u></u>__9596393887,4.9192685996<br>
<tel:<a href="tel:9192685996" value="+19192685996" target="_blank">9192685996</a>><br>
<tel:<a href="tel:9192685996" value="+19192685996" target="_blank">9192685996</a> <tel:<a href="tel:9192685996" value="+19192685996" target="_blank">9192685996</a>>><br>
<tel:<a href="tel:9192685996" value="+19192685996" target="_blank">9192685996</a> <tel:<a href="tel:9192685996" value="+19192685996" target="_blank">9192685996</a>><br>
<tel:<a href="tel:9192685996" value="+19192685996" target="_blank">9192685996</a><br>
<tel:<a href="tel:9192685996" value="+19192685996" target="_blank">9192685996</a>>>>,4.__6734033563,4.____<u></u>7511846457,4.__4544981945,4.__<u></u>__2748693367,3.__411559417,6._<u></u>___6851381985,6.__6744741285,<u></u>6.____9296475385<br>
<tel:<a href="tel:9296475385" value="+19296475385" target="_blank">9296475385</a>><br>
<tel:<a href="tel:9296475385" value="+19296475385" target="_blank">9296475385</a><br>
<tel:<a href="tel:9296475385" value="+19296475385" target="_blank">9296475385</a>>>,7.__0136847108,7.____<u></u>1371500908,7.__2719520708,6.__<a href="tel:6787720528" value="+16787720528" target="_blank">6787720528</a><br>
<tel:<a href="tel:6787720528" value="+16787720528" target="_blank">6787720528</a>><br>
<tel:<a href="tel:6787720528" value="+16787720528" target="_blank">6787720528</a><br>
<tel:<a href="tel:6787720528" value="+16787720528" target="_blank">6787720528</a>>>,7.__3530295908,6.__<a href="tel:8599596928" value="+18599596928" target="_blank">8599596928</a> <tel:<a href="tel:8599596928" value="+18599596928" target="_blank">8599596928</a>><br>
<tel:<a href="tel:8599596928" value="+18599596928" target="_blank">8599596928</a><br>
<tel:<a href="tel:8599596928" value="+18599596928" target="_blank">8599596928</a>>>,7.__2216891568,7.____<u></u>4951304208,7.__<a href="tel:4404728868" value="+14404728868" target="_blank">4404728868</a><br>
<tel:<a href="tel:4404728868" value="+14404728868" target="_blank">4404728868</a>><br>
<tel:<a href="tel:4404728868" value="+14404728868" target="_blank">4404728868</a><br>
<tel:<a href="tel:4404728868" value="+14404728868" target="_blank">4404728868</a>>>,8.__1332243958,6.____<u></u>2736028029,6.__963685048,6.___<u></u>_0483763169,5.__<a href="tel:8653351624" value="+18653351624" target="_blank">8653351624</a><br>
<tel:<a href="tel:8653351624" value="+18653351624" target="_blank">8653351624</a>><br>
<tel:<a href="tel:8653351624" value="+18653351624" target="_blank">8653351624</a> <tel:<a href="tel:8653351624" value="+18653351624" target="_blank">8653351624</a>>>,5.__<a href="tel:6164044005" value="+16164044005" target="_blank">6164044005</a><br>
<tel:<a href="tel:6164044005" value="+16164044005" target="_blank">6164044005</a>><br>
<tel:<a href="tel:6164044005" value="+16164044005" target="_blank">6164044005</a><br>
<tel:<a href="tel:6164044005" value="+16164044005" target="_blank">6164044005</a>>>,6.__54979166,5.__<a href="tel:8783224469" value="+18783224469" target="_blank">8783224469</a> <tel:<a href="tel:8783224469" value="+18783224469" target="_blank">8783224469</a>><br>
<tel:<a href="tel:8783224469" value="+18783224469" target="_blank">8783224469</a><br>
<tel:<a href="tel:8783224469" value="+18783224469" target="_blank">8783224469</a>>>,6.__533468297,5.__<a href="tel:8553434082" value="+18553434082" target="_blank">8553434082</a> <tel:<a href="tel:8553434082" value="+18553434082" target="_blank">8553434082</a>><br>
<tel:<a href="tel:8553434082" value="+18553434082" target="_blank">8553434082</a><br>
<tel:<a href="tel:8553434082" value="+18553434082" target="_blank">8553434082</a>>>,5.__7676662122,6.____<u></u>267915357,5.__22607939<br>
<br>
<br>
<br>
03,3.745459072,6.352470342,5._<u></u>_____4392033722,5.5562602522,<u></u>5.______3996670482,6.<u></u>171297855,5.______648779598,5.<u></u>5653279855,5.______671668653,<u></u>5.3243595462,5.______<u></u>879320328,5.859442385<br>
<tel:<a href="tel:5.859442385" value="+15859442385" target="_blank">5.859442385</a>><br>
<tel:<a href="tel:5.859442385" value="+15859442385" target="_blank">5.859442385</a><br>
<tel:<a href="tel:5.859442385" value="+15859442385" target="_blank">5.859442385</a>>>,6.____080574272,5.__<u></u>3767159992,6.____170852717,5._<u></u>_3001119472,5.____687201287,5.<u></u>__3573110752,3.____586385579,<u></u>5.__566591422,5.____5104826925<br>
<tel:<a href="tel:5104826925" value="+15104826925" target="_blank">5104826925</a>>,5.__916268775,5.____<u></u>4418422465,5.__<a href="tel:4037394705" value="+14037394705" target="_blank">4037394705</a><br>
<tel:<a href="tel:4037394705" value="+14037394705" target="_blank">4037394705</a>>,5.____640889612,5.__<u></u>1407657702,4.____5523677017,5.<u></u>__3873769863,3.____601570449,<u></u>2.__978252449,4.____8725960282<br>
<tel:<a href="tel:8725960282" value="+18725960282" target="_blank">8725960282</a>>,4.__9817842222,5.____<u></u>2355359365,5.__1227105795,5.__<u></u>__177856607,5.__098596533,5.__<u></u>__1891181988,4.__9327118245,4.<u></u>____4632330777,7.__4879538737,<u></u>4.____8591269625,3.__<u></u>1339054377,5.____8472818275<br>
<tel:<a href="tel:8472818275" value="+18472818275" target="_blank">8472818275</a>>,4.__<a href="tel:6043306952" value="+16043306952" target="_blank">6043306952</a><br>
<tel:<a href="tel:6043306952" value="+16043306952" target="_blank">6043306952</a>>,3.____3542942377,4.__<u></u>7660145915,6.____<a href="tel:6679095357" value="+16679095357" target="_blank">6679095357</a><br>
<tel:<a href="tel:6679095357" value="+16679095357" target="_blank">6679095357</a>>,5.__51150886,2.____<a href="tel:7404344677" value="+17404344677" target="_blank">7404344677</a><br>
<tel:<a href="tel:7404344677" value="+17404344677" target="_blank">7404344677</a>>,5.__9332075344,6.____<a href="tel:2019594857" value="+12019594857" target="_blank">2019594857</a><br>
<tel:<a href="tel:2019594857" value="+12019594857" target="_blank">2019594857</a>>,5.__266709364,5.____<u></u>4924174224,5.__180577724,3.___<u></u>_0277711677,6.__2913260157,4._<u></u>___2862670877,5.__5461328154,<u></u>5.____5809644644<br>
<tel:<a href="tel:5809644644" value="+15809644644" target="_blank">5809644644</a>>,5.__1132029296,5.____<u></u>1904326724,4.__<a href="tel:8352505633" value="+18352505633" target="_blank">8352505633</a><br>
<tel:<a href="tel:8352505633" value="+18352505633" target="_blank">8352505633</a>>,4.____9641930171,5.__<u></u>1366240426,7.____0699378037,3.<u></u>__1274712477,5.____1487646306,<u></u>5.__2717034197,5.____<u></u>0200090866,3.__0911490977,5.__<u></u>__8984613527,5.__1973381747,4.<u></u>__<br>
<br>
<br>
2427530627,6.7293864957,4.____<u></u>__7943011637,5.1130266607,5.__<u></u>____3948779287,4.7124246547<br>
<tel:<a href="tel:7124246547" value="+17124246547" target="_blank">7124246547</a>>,5.2<br>
<br>
186371577,2.<a href="tel:9723417287" value="+19723417287" target="_blank">9723417287</a> <tel:<a href="tel:9723417287" value="+19723417287" target="_blank">9723417287</a>><br>
<tel:<a href="tel:9723417287" value="+19723417287" target="_blank">9723417287</a> <tel:<a href="tel:9723417287" value="+19723417287" target="_blank">9723417287</a>>> <tel:<a href="tel:9723417287" value="+19723417287" target="_blank">9723417287</a><br>
<tel:<a href="tel:9723417287" value="+19723417287" target="_blank">9723417287</a>><br>
<br>
<tel:<a href="tel:9723417287" value="+19723417287" target="_blank">9723417287</a><br>
<tel:<a href="tel:9723417287" value="+19723417287" target="_blank">9723417287</a>>>>,2.3171875277,2.<a href="tel:8159853427" value="+18159853427" target="_blank">8159853427</a><br>
<tel:<a href="tel:8159853427" value="+18159853427" target="_blank">8159853427</a>> <tel:<a href="tel:8159853427" value="+18159853427" target="_blank">8159853427</a> <tel:<a href="tel:8159853427" value="+18159853427" target="_blank">8159853427</a>>><br>
<tel:<a href="tel:8159853427" value="+18159853427" target="_blank">8159853427</a> <tel:<a href="tel:8159853427" value="+18159853427" target="_blank">8159853427</a>><br>
<br>
<tel:<a href="tel:8159853427" value="+18159853427" target="_blank">8159853427</a><br>
<tel:<a href="tel:8159853427" value="+18159853427" target="_blank">8159853427</a>>>>,__4.7913513947,4.<a href="tel:7863347867" value="+17863347867" target="_blank">7863347867</a><br>
<tel:<a href="tel:7863347867" value="+17863347867" target="_blank">7863347867</a>> <tel:<a href="tel:7863347867" value="+17863347867" target="_blank">7863347867</a> <tel:<a href="tel:7863347867" value="+17863347867" target="_blank">7863347867</a>>><br>
<tel:<a href="tel:7863347867" value="+17863347867" target="_blank">7863347867</a> <tel:<a href="tel:7863347867" value="+17863347867" target="_blank">7863347867</a>><br>
<tel:<a href="tel:7863347867" value="+17863347867" target="_blank">7863347867</a><br>
<tel:<a href="tel:7863347867" value="+17863347867" target="_blank">7863347867</a>>>>,3.4531342837,__3.____<u></u>8161332287,5.8431115757,4.____<u></u>__4873126817,5.6577494097<br>
<tel:<a href="tel:6577494097" value="+16577494097" target="_blank">6577494097</a>>,5.______<a href="tel:5867970832" value="+15867970832" target="_blank">5867970832</a><br>
<tel:<a href="tel:5867970832" value="+15867970832" target="_blank">5867970832</a>>,9.<a href="tel:4583860946" value="+14583860946" target="_blank">4583860946</a><br>
<tel:<a href="tel:4583860946" value="+14583860946" target="_blank">4583860946</a>>,2.______<a href="tel:7784615917" value="+17784615917" target="_blank">7784615917</a><br>
<tel:<a href="tel:7784615917" value="+17784615917" target="_blank">7784615917</a>>,5.4279953797,1.______<a href="tel:9376872717" value="+19376872717" target="_blank">9376872717</a><br>
<tel:<a href="tel:9376872717" value="+19376872717" target="_blank">9376872717</a>>,5.0813930177,5.______<u></u>8860618114,6.2411339874,6.____<u></u>__4536904614,6.0972641874,5.__<u></u>____7247963284<br>
<tel:<a href="tel:7247963284" value="+17247963284" target="_blank">7247963284</a>>,5.9823452114,5.______<a href="tel:8316140784" value="+18316140784" target="_blank">8316140784</a><br>
<tel:<a href="tel:8316140784" value="+18316140784" target="_blank">8316140784</a>>,5.<a href="tel:2398164977" value="+12398164977" target="_blank">2398164977</a><br>
<tel:<a href="tel:2398164977" value="+12398164977" target="_blank">2398164977</a>>,6.______2963392357,5.<a href="tel:5864457124" value="+15864457124" target="_blank">5864457124</a>,<u></u>6.______1599995178,5.<a href="tel:2609646384" value="+12609646384" target="_blank">2609646384</a>,6.______<u></u>1012355027,6.<a href="tel:4129483756" value="+14129483756" target="_blank">4129483756</a>,6.______<u></u>0056487896,5.0106569884,5.____<u></u>__4239402364,6.1148656496,2.__<u></u>____673828844,4.3332873457,3._<u></u>_____2943586634,4.5834393467,<u></u>7.______278601561,3.<u></u>5870893269,3.______3299191554,<u></u>4.1049776549,5.______<u></u>9256568037,6.2719334873,6.____<u></u>__2594329923,5.5752581689,5.__<u></u>____6058592867,6.1311384893,6.<u></u>______4726413519,5.8973941434,<u></u>6.______2572672069,5.<u></u>9667442136,5.______3965422637,<u></u>7.2837623985,6.______<u></u>9586195092,7.1137641952,6.____<u></u>__3682104908,7.8495628418,7.__<u></u>____2245886958,6.2983788278,7.<u></u>______3509762248,6.9925366658,<u></u>6.______5600944468,6.<u></u>936328733,6.______616665943,6.<u></u>738732443}")<br>
<br>
<br>
<br>
CONTEXT: PL/pgSQL function<br>
"pgr_tspdijkstra" line 8 at<br>
RETURN QUERY<br>
PL/pgSQL function "pgr_tspdijkstralen"<br>
line 3 at RETURN<br>
QUERY<br>
NOTICE: r2.id1: 34304<br>
CONTEXT: PL/pgSQL function<br>
"pgr_tspdijkstra" line 8 at<br>
RETURN QUERY<br>
PL/pgSQL function "pgr_tspdijkstralen"<br>
line 3 at RETURN<br>
QUERY<br>
NOTICE: ids: <NULL><br>
CONTEXT: PL/pgSQL function<br>
"pgr_tspdijkstra" line 8 at<br>
RETURN QUERY<br>
PL/pgSQL function "pgr_tspdijkstralen"<br>
line 3 at RETURN<br>
QUERY<br>
ERROR: cannot concatenate incompatible arrays<br>
DETAIL: Arrays with differing element<br>
dimensions are not<br>
compatible for<br>
concatenation.<br>
CONTEXT: PL/pgSQL function<br>
"pgr_makedijkstramatrix"<br>
line 25 at<br>
assignment<br>
PL/pgSQL function "pgr_tspdijkstra" line 8<br>
at RETURN QUERY<br>
PL/pgSQL function "pgr_tspdijkstralen"<br>
line 3 at RETURN<br>
QUERY<br>
<br>
I tried to write to Dose but he didn't<br>
reply yet.<br>
Does anyone have a clue?<br>
<br>
<br>
Try adding the follow line after the "begin" line:<br>
<br>
ids := '{}'::integer[];<br>
<br>
This should make sure the ids is initialized<br>
as an empty<br>
array of<br>
integers.<br>
<br>
-Steve<br>
<br>
<br>
<br>
Again:<br>
NOTICE: r2:<br>
(34304,"{0,5.<a href="tel:3602868897" value="+13602868897" target="_blank">3602868897</a> <tel:<a href="tel:3602868897" value="+13602868897" target="_blank">3602868897</a>><br>
<tel:<a href="tel:3602868897" value="+13602868897" target="_blank">3602868897</a> <tel:<a href="tel:3602868897" value="+13602868897" target="_blank">3602868897</a>>>,4.<a href="tel:6782573327" value="+16782573327" target="_blank">6782573327</a> <tel:<a href="tel:6782573327" value="+16782573327" target="_blank">6782573327</a>><br>
<tel:<a href="tel:6782573327" value="+16782573327" target="_blank">6782573327</a> <tel:<a href="tel:6782573327" value="+16782573327" target="_blank">6782573327</a>>>,5.<a href="tel:6026971537" value="+16026971537" target="_blank">6026971537</a><br>
<tel:<a href="tel:6026971537" value="+16026971537" target="_blank">6026971537</a>> <tel:<a href="tel:6026971537" value="+16026971537" target="_blank">6026971537</a><br>
<tel:<a href="tel:6026971537" value="+16026971537" target="_blank">6026971537</a>>>,5.<a href="tel:2062747797" value="+12062747797" target="_blank">2062747797</a> <tel:<a href="tel:2062747797" value="+12062747797" target="_blank">2062747797</a>><br>
<tel:<a href="tel:2062747797" value="+12062747797" target="_blank">2062747797</a><br>
<tel:<a href="tel:2062747797" value="+12062747797" target="_blank">2062747797</a>>>,5.__0497181017,5.<a href="tel:3147719797" value="+13147719797" target="_blank">3147719797</a><br>
<tel:<a href="tel:3147719797" value="+13147719797" target="_blank">3147719797</a>>,5.____0700916462,4.<u></u>3220066797,4.__<a href="tel:8593618137" value="+18593618137" target="_blank">8593618137</a> <tel:<a href="tel:8593618137" value="+18593618137" target="_blank">8593618137</a>>,__4.0002255227,6.__<u></u>055760592,12.__5155379824,9.__<u></u>3170226155,8.__72783427270001,<u></u>5.__9460446587,__3.0868131677,<u></u>5.__1839796057,5.__2301666167,<u></u>2.__1211198847,5.__7037465591,<u></u>2.__7282842677,8.__4758437557,<u></u>11.__1027935904,7.__<u></u>9434273599,7.__8361619299,7.__<u></u>7610621969,7.__4929139614,5.__<u></u>8106133327,5.__9579132527,5.__<u></u>9888473034,6.__5618433959,4.__<u></u>5013708887,1.__9218516244,5.__<u></u>7559805232,5.__2267081177,5.__<u></u>0968196707,4.__8949133597,5.__<u></u>9137964962,4.__2936059427,4.__<u></u>6948533593,3.__4377318427,3.__<u></u>7991617067,4.__1242444467,3.__<u></u>8858731777,3.__9596393887,4.__<u></u>9192685996,4.__6734033563,4.__<u></u>7511846457,4.__4544981945,4.__<u></u>2748693367,3.__411559417,6.__<u></u>6851381985,6.__6744741285,6.__<u></u>9296475385,7.__0136847108,7.__<u></u>1371500908,7.__2719520708,6.__<u></u>6787720528,7.__3530295908,6.__<u></u>8599596928,7.__2216891568,7.__<u></u>4951304208,7.__4404728868,8.__<u></u>1332243958,6.__2736028029,6.__<u></u>963685048,6.__0483763169,5.__<u></u>8653351624,5.__6164044005,6<br>
</blockquote>
.__54979166,5.__<a href="tel:8783224469" value="+18783224469" target="_blank">8783224469</a>,6.__<u></u>533468297,5.__<a href="tel:8553434082" value="+18553434082" target="_blank">8553434082</a>,5.7<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
676662122,6.__267915357,5.__<u></u>22607939<br>
<br>
<br>
<br>
03,3.745459072,6.352470342,5._<u></u>___4392033722,5.5562602522,5._<u></u>___3996670482,6.171297855,5.__<u></u>__648779598,5.5653279855,5.___<u></u>_671668653,5.3243595462,5.____<u></u>879320328,5.859442385,6.____<u></u>080574272,5.3767159992,6.____<u></u>170852717,5.3001119472,5.____<u></u>687201287,5.3573110752,3.____<u></u>586385579,5.566591422,5.____<u></u>5104826925,5.916268775,5.____<u></u>4418422465,5.4037394705,5.____<u></u>640889612,5.1407657702,4.____<u></u>5523677017,5.3873769863,3.____<u></u>601570449,2.978252449,4.____<u></u>8725960282,4.9817842222,5.____<u></u>2355359365,5.1227105795,5.____<u></u>177856607,5.098596533,5.____<u></u>1891181988,4.9327118245,4.____<u></u>4632330777,7.4879538737,4.____<u></u>8591269625,3.1339054377,5.____<u></u>8472818275,4.6043306952,3.____<u></u>3542942377,4.7660145915,6.____<u></u>6679095357,5.51150886,2.____<u></u>7404344677,5.9332075344,6.____<u></u>2019594857,5.266709364,5.____<u></u>4924174224,5.180577724,3.____<u></u>0277711677,6.2913260157,4.____<u></u>2862670877,5.5461328154,5.____<u></u>5809644644,5.1132029296,5.____<u></u>1904326724,4.8352505633,4.____<u></u>9641930171,5.1366240426,7.____<u></u>0699378037,3.1274712477,5.____<u></u>1487646306<br>
</blockquote>
,5.2717034197,5.____<u></u>0200090866,3.0911490977,5.____<u></u>8984613527,5.1973381747,4.__<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
2427530627,6.7293864957,4.____<u></u>7943011637,5.1130266607,5.____<u></u>3948779287,4.7124246547,5.2<br>
<br>
186371577,2.<a href="tel:9723417287" value="+19723417287" target="_blank">9723417287</a> <tel:<a href="tel:9723417287" value="+19723417287" target="_blank">9723417287</a>> <tel:<a href="tel:9723417287" value="+19723417287" target="_blank">9723417287</a><br>
<tel:<a href="tel:9723417287" value="+19723417287" target="_blank">9723417287</a>>>,2.3171875277,2.<a href="tel:8159853427" value="+18159853427" target="_blank">8159853427</a> <tel:<a href="tel:8159853427" value="+18159853427" target="_blank">8159853427</a>><br>
<tel:<a href="tel:8159853427" value="+18159853427" target="_blank">8159853427</a><br>
<tel:<a href="tel:8159853427" value="+18159853427" target="_blank">8159853427</a>>>,__4.7913513947,4.<a href="tel:7863347867" value="+17863347867" target="_blank">7863347867</a> <tel:<a href="tel:7863347867" value="+17863347867" target="_blank">7863347867</a>><br>
<tel:<a href="tel:7863347867" value="+17863347867" target="_blank">7863347867</a><br>
<tel:<a href="tel:7863347867" value="+17863347867" target="_blank">7863347867</a>>>,3.4531342837,__3.__<u></u>8161332287,5.8431115757,4.____<u></u>4873126817,5.6577494097,5.____<u></u>5867970832,9.4583860946,2.____<u></u>7784615917,5.4279953797,1.____<u></u>9376872717,5.0813930177,5.____<u></u>8860618114,6.2411339874,6.____<u></u>4536904614,6.0972641874,5.____<u></u>7247963284,5.9823452114,5.____<u></u>8316140784,5.2398164977,6.____<u></u>2963392357,5.5864457124,6.____<u></u>1599995178,5.2609646384,6.____<u></u>1012355027,6.4129483756,6.____<u></u>0056487896,5.0106569884,5.____<u></u>4239402364,6.1148656496,2.____<u></u>673828844,4.3332873457,3.____<u></u>2943586634,4.5834393467,7.____<u></u>278601561,3.5870893269,3.____<u></u>3299191554,4.1049776549,5.____<u></u>9256568037,6.2719334873,6.____<u></u>2594329923,5.5752581689,5.____<u></u>6058592867,6.1311384893,6.____<u></u>4726413519,5.8973941434,6.____<u></u>2572672069,5.9667442136,5.____<u></u>3965422637,7.2837623985,6.____<u></u>9586195092,7.1137641952,6.____<u></u>3682104908,7.8495628418,7.____<u></u>2245886958,6.2983788278,7.____<u></u>3509762248,6.9925366658,6.____<u></u>5600944468,6.936328733,6.____<u></u>616665943,6.738732443}")<br>
<br>
CONTEXT: PL/pgSQL function "pgr_tspdijkstra" line<br>
8 at RETURN QUERY<br>
PL/pgSQL function "pgr_tspdijkstralen" line 3 at<br>
RETURN QUERY<br>
NOTICE: r2.id1: 34304<br>
CONTEXT: PL/pgSQL function "pgr_tspdijkstra" line<br>
8 at RETURN QUERY<br>
PL/pgSQL function "pgr_tspdijkstralen" line 3 at<br>
RETURN QUERY<br>
NOTICE: ids: {}<br>
<br>
CONTEXT: PL/pgSQL function "pgr_tspdijkstra" line<br>
8 at RETURN QUERY<br>
PL/pgSQL function "pgr_tspdijkstralen" line 3 at<br>
RETURN QUERY<br>
ERROR: cannot concatenate incompatible arrays<br>
DETAIL: Arrays with differing element dimensions<br>
are not<br>
compatible for<br>
concatenation.<br>
CONTEXT: PL/pgSQL function<br>
"pgr_makedijkstramatrix" line 26 at<br>
assignment<br>
PL/pgSQL function "pgr_tspdijkstra" line 8 at<br>
RETURN QUERY<br>
PL/pgSQL function "pgr_tspdijkstralen" line 3 at<br>
RETURN QUERY<br>
<br>
Thanks for your help. Maybe you need some other<br>
facts about my<br>
table?<br>
The whole script I am excecuting is the following.<br>
I changed some<br>
things, like adding your code and changing the<br>
table name 'ways' to<br>
'cgn_2po_4pgr':<br>
<br>
create or replace function<br>
pgr_makeDijkstraMatrix(thetbl text, sqlP<br>
text, OUT dmatrix double precision[], OUT ids<br>
integer[])<br>
as<br>
$body$<br>
declare<br>
sql text;<br>
sql2 text;<br>
r record;<br>
r2 record;<br>
i integer;<br>
j integer;<br>
matrixl double precision[];<br>
begin<br>
<br>
ids := '{}'::integer[];<br>
sql:='select node, id-1 as id from '||thetbl;<br>
for r in execute sql loop<br>
sql2:='select id1, array_agg(cost) as<br>
arow from (<br>
SELECT id1, id2, cost<br>
FROM<br>
pgr_kdijkstraCost('''||sqlP||'<u></u>____'', '||r.node||<br>
<br>
', (select array_agg(node) from<br>
'||thetbl||' where<br>
id>'||<a href="http://r.id" target="_blank">r.id</a> <<a href="http://r.id" target="_blank">http://r.id</a>> <<a href="http://r.id" target="_blank">http://r.id</a>><br>
<<a href="http://r.id" target="_blank">http://r.id</a>>||'), false, false)<br>
<br>
<br>
) as foo group by id1 order by id1';<br>
for r2 in execute sql2 loop<br>
matrixl := '{}';<br>
for i in 1..<a href="http://r.id" target="_blank">r.id</a> <<a href="http://r.id" target="_blank">http://r.id</a>><br>
<<a href="http://r.id" target="_blank">http://r.id</a>> <<a href="http://r.id" target="_blank">http://r.id</a>> loop<br>
<br>
<br>
matrixl := array_append(matrixl,<br>
dmatrix[i][<a href="http://r.id" target="_blank">r.id</a> <<a href="http://r.id" target="_blank">http://r.id</a>> <<a href="http://r.id" target="_blank">http://r.id</a>><br>
<<a href="http://r.id" target="_blank">http://r.id</a>>+1]);<br>
<br>
end loop;<br>
matrixl := array_cat(matrixl,<br>
r2.arow);<br>
dmatrix := array_cat(dmatrix,<br>
array[matrixl]);<br>
raise notice 'r2: %', r2;<br>
raise notice 'r2.id1: %', r2.id1;<br>
raise notice 'ids: %', ids;<br>
<br>
<br>
Sorry, I don't have a running version of this so this<br>
is somewhat<br>
guess work.<br>
<br>
-- ids := ids || r2.id1;<br>
ids := array_cat(ids, r2.id1);<br>
<br>
<br>
try changing the line above to:<br>
<br>
ids := array_cat(ids, array[r2.id1]);<br>
<br>
<br>
Hi Steve, thank you. Back in office now but I'll try that later at home.<br>
I'll let you know and hopefully I get a good result :)<br>
Thanks so much.<br>
Carsten<br>
<br>
<br>
<br>
So comment out the old like and rewrite like this.<br>
<br>
-Steve<br>
<br>
<br>
Thanks for all your help Steve,<br>
hope, we're getting closer! Look, not it returns this:<br>
NOTICE: r2:<br>
(34304,"{0,5.<a href="tel:3602868897" value="+13602868897" target="_blank">3602868897</a> <tel:<a href="tel:3602868897" value="+13602868897" target="_blank">3602868897</a>>,4.<a href="tel:6782573327" value="+16782573327" target="_blank">6782573327</a><br>
<tel:<a href="tel:6782573327" value="+16782573327" target="_blank">6782573327</a>>,5.<a href="tel:6026971537" value="+16026971537" target="_blank">6026971537</a> <tel:<a href="tel:6026971537" value="+16026971537" target="_blank">6026971537</a>>,5.<a href="tel:2062747797" value="+12062747797" target="_blank">2062747797</a><br>
<tel:<a href="tel:2062747797" value="+12062747797" target="_blank">2062747797</a>>,5.__0497181017,5.<a href="tel:3147719797" value="+13147719797" target="_blank">3147719797</a>,5.__<u></u>0700916462,4.3220066797,4.__<a href="tel:8593618137" value="+18593618137" target="_blank">8593618137</a>,<u></u>4.0002255227,6.__055760592,12.<u></u>5155379824,9.__3170226155,8.<u></u>72783427270001,5.__9460446587,<u></u>3.0868131677,5.__1839796057,5.<u></u>2301666167,2.__1211198847,5.<u></u>7037465591,2.__7282842677,8.<u></u>4758437557,11.__1027935904,7.<u></u>9434273599,7.__8361619299,7.<u></u>7610621969,7.__4929139614,5.<u></u>8106133327,5.__9579132527,5.<u></u>9888473034,6.__5618433959,4.<u></u>5013708887,1.__9218516244,5.<u></u>7559805232,5.__2267081177,5.<u></u>0968196707,4.__8949133597,5.<u></u>9137964962,4.__2936059427,4.<u></u>6948533593,3.__4377318427,3.<u></u>7991617067,4.__1242444467,3.<u></u>8858731777,3.__9596393887,4.<u></u>9192685996,4.__6734033563,4.<u></u>7511846457,4.__4544981945,4.<u></u>2748693367,3.__411559417,6.<u></u>6851381985,6.__6744741285,6.<u></u>9296475385,7.__0136847108,7.<u></u>1371500908,7.__2719520708,6.<u></u>6787720528,7.__3530295908,6.<u></u>8599596928,7.__2216891568,7.<u></u>4951304208,7.__4404728868,8.<u></u>1332243958,6.__2736028029,6.<u></u>963685048,6.__0483763169,5.<u></u>8653351624,5.__6164044005,6.<u></u>54979166,5.__8783224469,6.<u></u>533468297,5.__8553434082<br>
</blockquote>
,5.7676662122,6.__267915357,5.<u></u>22607939<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
03,3.745459072,6.352470342,5._<u></u>_4392033722,5.5562602522,5.__<u></u>3996670482,6.171297855,5.__<u></u>648779598,5.5653279855,5.__<u></u>671668653,5.3243595462,5.__<u></u>879320328,5.859442385,6.__<u></u>080574272,5.3767159992,6.__<u></u>170852717,5.3001119472,5.__<u></u>687201287,5.3573110752,3.__<u></u>586385579,5.566591422,5.__<u></u>5104826925,5.916268775,5.__<u></u>4418422465,5.4037394705,5.__<u></u>640889612,5.1407657702,4.__<u></u>5523677017,5.3873769863,3.__<u></u>601570449,2.978252449,4.__<u></u>8725960282,4.9817842222,5.__<u></u>2355359365,5.1227105795,5.__<u></u>177856607,5.098596533,5.__<u></u>1891181988,4.9327118245,4.__<u></u>4632330777,7.4879538737,4.__<u></u>8591269625,3.1339054377,5.__<u></u>8472818275,4.6043306952,3.__<u></u>3542942377,4.7660145915,6.__<u></u>6679095357,5.51150886,2.__<u></u>7404344677,5.9332075344,6.__<u></u>2019594857,5.266709364,5.__<u></u>4924174224,5.180577724,3.__<u></u>0277711677,6.2913260157,4.__<u></u>2862670877,5.5461328154,5.__<u></u>5809644644,5.1132029296,5.__<u></u>1904326724,4.8352505633,4.__<u></u>9641930171,5.1366240426,7.__<u></u>0699378037,3.1274712477,5.__<u></u>1487646306,5.2717034197,5.__<u></u>0200090866,3.0911490977,5.__<u></u>8984613527,5.1973381747,<br>
</blockquote>
4.__2427530627,6.7293864957,4.<u></u>__7943011637,5.1130266607,5.__<u></u>3948779287,4.7124246547,5.2<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
186371577,2.<a href="tel:9723417287" value="+19723417287" target="_blank">9723417287</a><br>
<tel:<a href="tel:9723417287" value="+19723417287" target="_blank">9723417287</a>>,2.3171875277,2.<a href="tel:8159853427" value="+18159853427" target="_blank">8159853427</a><br>
<tel:<a href="tel:8159853427" value="+18159853427" target="_blank">8159853427</a>>,__4.7913513947,4.<a href="tel:7863347867" value="+17863347867" target="_blank">7863347867</a><br>
<tel:<a href="tel:7863347867" value="+17863347867" target="_blank">7863347867</a>>,3.4531342837,__3.<u></u>8161332287,5.8431115757,4.__<u></u>4873126817,5.6577494097,5.__<u></u>5867970832,9.4583860946,2.__<u></u>7784615917,5.4279953797,1.__<u></u>9376872717,5.0813930177,5.__<u></u>8860618114,6.2411339874,6.__<u></u>4536904614,6.0972641874,5.__<u></u>7247963284,5.9823452114,5.__<u></u>8316140784,5.2398164977,6.__<u></u>2963392357,5.5864457124,6.__<u></u>1599995178,5.2609646384,6.__<u></u>1012355027,6.4129483756,6.__<u></u>0056487896,5.0106569884,5.__<u></u>4239402364,6.1148656496,2.__<u></u>673828844,4.3332873457,3.__<u></u>2943586634,4.5834393467,7.__<u></u>278601561,3.5870893269,3.__<u></u>3299191554,4.1049776549,5.__<u></u>9256568037,6.2719334873,6.__<u></u>2594329923,5.5752581689,5.__<u></u>6058592867,6.1311384893,6.__<u></u>4726413519,5.8973941434,6.__<u></u>2572672069,5.9667442136,5.__<u></u>3965422637,7.2837623985,6.__<u></u>9586195092,7.1137641952,6.__<u></u>3682104908,7.8495628418,7.__<u></u>2245886958,6.2983788278,7.__<u></u>3509762248,6.9925366658,6.__<u></u>5600944468,6.936328733,6.__<u></u>616665943,6.738732443}")<br>
<br>
CONTEXT: PL/pgSQL function "pgr_tspdijkstra" line 8 at<br>
RETURN QUERY<br>
PL/pgSQL function "pgr_tspdijkstralen" line 3 at RETURN QUERY<br>
NOTICE: r2.id1: 34304<br>
CONTEXT: PL/pgSQL function "pgr_tspdijkstra" line 8 at<br>
RETURN QUERY<br>
PL/pgSQL function "pgr_tspdijkstralen" line 3 at RETURN QUERY<br>
NOTICE: ids: {}<br>
CONTEXT: PL/pgSQL function "pgr_tspdijkstra" line 8 at<br>
RETURN QUERY<br>
PL/pgSQL function "pgr_tspdijkstralen" line 3 at RETURN QUERY<br>
<br>
<br>
ERROR: function array_cat(integer[], integer) does not exist<br>
<br>
LINE 1: SELECT array_cat(ids, r2.id1)<br>
^<br>
HINT: No function matches the given name and argument<br>
types. You might<br>
need to add explicit type casts.<br>
QUERY: SELECT array_cat(ids, r2.id1)<br>
CONTEXT: PL/pgSQL function "pgr_makedijkstramatrix" line 31<br>
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>
********** Fehler **********<br>
<br>
ERROR: function array_cat(integer[], integer) does not exist<br>
SQL Status:42883<br>
Hinweis:No function matches the given name and argument<br>
types. You might<br>
need to add explicit type casts.<br>
Kontext:PL/pgSQL function "pgr_makedijkstramatrix" line 31<br>
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>
<br>
Function does not exist? Still have an idea?<br>
Thanks<br>
Carsten<br>
<br>
<br>
end loop;<br>
end loop;<br>
end;<br>
$body$<br>
language plpgsql stable cost 10;<br>
<br>
<br>
create or replace function pgr_tspDijkstra(thetbl<br>
text, sql text,<br>
start_id integer, end_id integer default (-1))<br>
returns setof pgr_costResult as<br>
$body$<br>
declare<br>
sid integer;<br>
eid integer;<br>
<br>
begin<br>
<br>
return query with dm as (<br>
select * from pgr_makeDijkstraMatrix(<br>
thetbl, sql )<br>
),<br>
ids as (<br>
select (row_number() over (order by id<br>
asc))-1 as rnum, id<br>
from (<br>
select unnest(ids) as id<br>
from dm<br>
) foo<br>
),<br>
t as (<br>
select a.seq, b.rnum, <a href="http://b.id" target="_blank">b.id</a> <<a href="http://b.id" target="_blank">http://b.id</a>><br>
<<a href="http://b.id" target="_blank">http://b.id</a>> <<a href="http://b.id" target="_blank">http://b.id</a>><br>
<br>
<br>
from pgr_tsp(<br>
(select dmatrix from dm),<br>
(select rnum from ids where<br>
id=start_id limit<br>
1)::integer,<br>
(case when end_id = -1 then -1<br>
else (select<br>
rnum<br>
from ids where id=end_id limit 1) end)::integer<br>
) a,<br>
ids b<br>
where <a href="http://a.id" target="_blank">a.id</a> <<a href="http://a.id" target="_blank">http://a.id</a>> <<a href="http://a.id" target="_blank">http://a.id</a>><br>
<<a href="http://a.id" target="_blank">http://a.id</a>>=b.rnum<br>
<br>
<br>
),<br>
r as (<br>
select array_agg(t.rnum) as rnum from t<br>
)<br>
select t.seq::integer,<br>
t.rnum::integer as id1,<br>
t.id::integer as id2,<br>
<br>
<br>
dm.dmatrix[r.rnum[t.seq+1]+1][<u></u>____r.rnum[(t.seq+1)%array___<u></u>length(__r.rnum,<br>
<br>
1)+1]+1]::float8 as cost<br>
from t, dm, r;<br>
end;<br>
$body$<br>
language plpgsql volatile cost 50 rows 50;<br>
<br>
<br>
create or replace function<br>
pgr_tspDijkstraLen(thetbl text, start_id<br>
integer, end_id integer default (-1))<br>
returns setof pgr_costResult as<br>
$body$<br>
begin<br>
return query SELECT * FROM<br>
pgr_tspDijkstra(thetbl,<br>
'SELECT id, source::integer,<br>
target::integer,<br>
length::double<br>
precision AS cost FROM cgn_2po_4pgr',<br>
start_id, end_id);<br>
end;<br>
$body$<br>
language plpgsql stable;<br>
<br>
<br>
Maybe you've got another idea?<br>
Thank you<br>
Carsten<br>
<br>
<br>
Thanks for you help<br>
Carsten<br>
<br>
<br>
2014-02-20 16:24 GMT+01:00 Stephen Woodbridge<br>
<<a href="mailto:woodbri@swoodbridge.com" target="_blank">woodbri@swoodbridge.com</a><br>
<mailto:<a href="mailto:woodbri@swoodbridge.com" target="_blank">woodbri@swoodbridge.<u></u>com</a>><br>
<mailto:<a href="mailto:woodbri@swoodbridge." target="_blank">woodbri@swoodbridge.</a>__<u></u>com<br>
<mailto:<a href="mailto:woodbri@swoodbridge.com" target="_blank">woodbri@swoodbridge.<u></u>com</a>>><br>
<mailto:<a href="mailto:woodbri@swoodbridge" target="_blank">woodbri@swoodbridge</a>.<br>
<mailto:<a href="mailto:woodbri@swoodbridge" target="_blank">woodbri@swoodbridge</a>.>_<u></u>___com<br>
<mailto:<a href="mailto:woodbri@swoodbridge." target="_blank">woodbri@swoodbridge.</a>__<u></u>com<br>
<mailto:<a href="mailto:woodbri@swoodbridge.com" target="_blank">woodbri@swoodbridge.<u></u>com</a>>>><br>
<mailto:<a href="mailto:woodbri@swoodbridge" target="_blank">woodbri@swoodbridge</a><br>
<mailto:<a href="mailto:woodbri@swoodbridge" target="_blank">woodbri@swoodbridge</a>>.<br>
<mailto:<a href="mailto:woodbri@swoodbridge" target="_blank">woodbri@swoodbridge</a><br>
<mailto:<a href="mailto:woodbri@swoodbridge" target="_blank">woodbri@swoodbridge</a>>.><u></u>______com<br>
<br>
<br>
<mailto:<a href="mailto:woodbri@swoodbridge" target="_blank">woodbri@swoodbridge</a>.<br>
<mailto:<a href="mailto:woodbri@swoodbridge" target="_blank">woodbri@swoodbridge</a>.>_<u></u>___com<br>
<mailto:<a href="mailto:woodbri@swoodbridge." target="_blank">woodbri@swoodbridge.</a>__<u></u>com<br>
<mailto:<a href="mailto:woodbri@swoodbridge.com" target="_blank">woodbri@swoodbridge.<u></u>com</a>>>>>>:<br>
<br>
<br>
On 2/20/2014 9:41 AM, Stephen<br>
Woodbridge wrote:<br>
<br>
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.<u></u>__sql</a><br>
<<a href="http://dose.0wnz.at/scripts/______sql/pgroute_tspDijkstra.sql" target="_blank">http://dose.0wnz.at/scripts/_<u></u>_____sql/pgroute_tspDijkstra.<u></u>sql</a>><br>
<br>
<<a href="http://dose.0wnz.at/scripts/______sql/pgroute_tspDijkstra.sql" target="_blank">http://dose.0wnz.at/scripts/_<u></u>_____sql/pgroute_tspDijkstra.<u></u>sql</a><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><u></u>>__><br>
<br>
<br>
<br>
<<a href="http://dose.0wnz.at/scripts/______sql/pgroute_tspDijkstra.sql" target="_blank">http://dose.0wnz.at/scripts/_<u></u>_____sql/pgroute_tspDijkstra.<u></u>sql</a><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><u></u>><br>
<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>
<<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>>><u></u>><br>
<br>
<br>
<br>
<br>
<br>
<<a href="http://dose.0wnz.at/scripts/______sql/pgroute_tspDijkstra.sql" target="_blank">http://dose.0wnz.at/scripts/_<u></u>_____sql/pgroute_tspDijkstra.<u></u>sql</a><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><u></u>><br>
<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>
<<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>
<br>
<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>
<<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>
<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>
<<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>>>><u></u>><br>
are not part of pgRouting.<br>
<br>
You need to ask this question to<br>
Ivan the<br>
author of the<br>
original<br>
article.<br>
<br>
<br>
Sorry, Dose was the original author.<br>
<br>
<br>
<br>
You probably need to add some<br>
debug statements<br>
to get a<br>
better<br>
understanding of what the code is<br>
doing. For<br>
example in<br>
pgr_makeDijkstraMatrix before the<br>
statement:<br>
<br>
ids := ids || array[r2.id1];<br>
<br>
<br>
You could try changing this line to:<br>
<br>
ids := ids || r2.id1;<br>
<br>
and see if that fixes the problem.<br>
<br>
-Steve<br>
<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<br>
progression of how<br>
the array<br>
ids is getting<br>
built as it appears to be<br>
compaining about<br>
that in the<br>
error<br>
message.<br>
<br>
Hope this helps,<br>
-Steve<br>
<br>
On 2/20/2014 9:21 AM, Carsten<br>
Hogertz wrote:<br>
<br>
Hi everybody, I am new to<br>
this list and new to<br>
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-____<u></u>__travelling-__salesman-<u></u>problem-______tsp-with-__<u></u>openstreetmap</a><br>
<<a href="http://hardwarefetish.com/513-______pgrouting-dijksta-____travelling-__salesman-problem-____tsp-with-__openstreetmap" target="_blank">http://hardwarefetish.com/<u></u>513-______pgrouting-dijksta-__<u></u>__travelling-__salesman-<u></u>problem-____tsp-with-__<u></u>openstreetmap</a>><br>
<br>
<<a href="http://hardwarefetish.com/__513-____pgrouting-dijksta-____travelling-__salesman-problem-____tsp-with-__openstreetmap" target="_blank">http://hardwarefetish.com/__<u></u>513-____pgrouting-dijksta-____<u></u>travelling-__salesman-problem-<u></u>____tsp-with-__openstreetmap</a><br>
<<a href="http://hardwarefetish.com/513-____pgrouting-dijksta-__travelling-__salesman-problem-__tsp-with-__openstreetmap" target="_blank">http://hardwarefetish.com/<u></u>513-____pgrouting-dijksta-__<u></u>travelling-__salesman-problem-<u></u>__tsp-with-__openstreetmap</a>>><br>
<br>
<br>
<<a href="http://hardwarefetish.com/____513-__pgrouting-dijksta-____travelling-__salesman-problem-____tsp-with-__openstreetmap" target="_blank">http://hardwarefetish.com/___<u></u>_513-__pgrouting-dijksta-____<u></u>travelling-__salesman-problem-<u></u>____tsp-with-__openstreetmap</a><br>
<<a href="http://hardwarefetish.com/__513-__pgrouting-dijksta-__travelling-__salesman-problem-__tsp-with-__openstreetmap" target="_blank">http://hardwarefetish.com/__<u></u>513-__pgrouting-dijksta-__<u></u>travelling-__salesman-problem-<u></u>__tsp-with-__openstreetmap</a>><br>
<br>
<<a href="http://hardwarefetish.com/__513-__pgrouting-dijksta-__travelling-__salesman-problem-__tsp-with-__openstreetmap" target="_blank">http://hardwarefetish.com/__<u></u>513-__pgrouting-dijksta-__<u></u>travelling-__salesman-problem-<u></u>__tsp-with-__openstreetmap</a><br>
<<a href="http://hardwarefetish.com/513-__pgrouting-dijksta-travelling-__salesman-problem-tsp-with-__openstreetmap" target="_blank">http://hardwarefetish.com/<u></u>513-__pgrouting-dijksta-<u></u>travelling-__salesman-problem-<u></u>tsp-with-__openstreetmap</a>>>><br>
<br>
<br>
<br>
<br>
<<a href="http://hardwarefetish.com/______513-pgrouting-dijksta-______travelling-salesman-problem-______tsp-with-openstreetmap" target="_blank">http://hardwarefetish.com/___<u></u>___513-pgrouting-dijksta-_____<u></u>_travelling-salesman-problem-_<u></u>_____tsp-with-openstreetmap</a><br>
<<a href="http://hardwarefetish.com/____513-pgrouting-dijksta-____travelling-salesman-problem-____tsp-with-openstreetmap" target="_blank">http://hardwarefetish.com/___<u></u>_513-pgrouting-dijksta-____<u></u>travelling-salesman-problem-__<u></u>__tsp-with-openstreetmap</a>><br>
<br>
<<a href="http://hardwarefetish.com/____513-pgrouting-dijksta-____travelling-salesman-problem-____tsp-with-openstreetmap" target="_blank">http://hardwarefetish.com/___<u></u>_513-pgrouting-dijksta-____<u></u>travelling-salesman-problem-__<u></u>__tsp-with-openstreetmap</a><br>
<<a href="http://hardwarefetish.com/__513-pgrouting-dijksta-__travelling-salesman-problem-__tsp-with-openstreetmap" target="_blank">http://hardwarefetish.com/__<u></u>513-pgrouting-dijksta-__<u></u>travelling-salesman-problem-__<u></u>tsp-with-openstreetmap</a>>><br>
<br>
<br>
<br>
<br>
<<a href="http://hardwarefetish.com/____513-pgrouting-dijksta-____travelling-salesman-problem-____tsp-with-openstreetmap" target="_blank">http://hardwarefetish.com/___<u></u>_513-pgrouting-dijksta-____<u></u>travelling-salesman-problem-__<u></u>__tsp-with-openstreetmap</a><br>
<<a href="http://hardwarefetish.com/__513-pgrouting-dijksta-__travelling-salesman-problem-__tsp-with-openstreetmap" target="_blank">http://hardwarefetish.com/__<u></u>513-pgrouting-dijksta-__<u></u>travelling-salesman-problem-__<u></u>tsp-with-openstreetmap</a>><br>
<br>
<<a href="http://hardwarefetish.com/__513-pgrouting-dijksta-__travelling-salesman-problem-__tsp-with-openstreetmap" target="_blank">http://hardwarefetish.com/__<u></u>513-pgrouting-dijksta-__<u></u>travelling-salesman-problem-__<u></u>tsp-with-openstreetmap</a><br>
<<a href="http://hardwarefetish.com/513-pgrouting-dijksta-travelling-salesman-problem-tsp-with-openstreetmap" target="_blank">http://hardwarefetish.com/<u></u>513-pgrouting-dijksta-<u></u>travelling-salesman-problem-<u></u>tsp-with-openstreetmap</a>>>>><br>
<br>
and tried to reproduce the<br>
solution.<br>
<br>
Unfortunately I always get an<br>
error message.<br>
My DB is complaining about<br>
one of your<br>
functions.<br>
<br>
I got my routing table from<br>
osm2po. The<br>
table has<br>
the following<br>
structure:<br>
<br>
1;”id”;”integer”<br>
2;”osm_id”;”bigint”<br>
3;”osm_name”;”character varying”</blockquote>
</blockquote></div><br></div>