<div dir="ltr">Hi Steve,<div><br></div><div>I'm back to the TSP work.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
select * from pgr_tsp(<br> (select dmatrix::float8[]<br> from pgr_vidstodmatrix(<br> 'select id, source, target, cost, reverse_cost from ways',<br> pgr_pointstovids(<br> pgr_texttopoints('-8.6637,40.6403;-8.6406,40.6539;-8.6923,40.6312;-8.7411,40.6312', 4326),<br>
'ways'),<br> true, true, true) as dmatrix),<br> 1<br>);</blockquote><div><br></div><div>The query above return the following results:</div><div><br></div><div><div>seq;id</div>
<div>0;1</div><div>1;0</div><div>2;3</div><div>3;2</div></div><div><br></div><div>Computing pgr_dijkstra for that sequence (i.e., 1 >> 0 >> 3 >> 2) I get:</div><div><br></div><div>1975.82193954407<br></div>
<div>7098.18548705077<br></div><div>6299.05064340774<br></div><div><br></div><div>However, this is not the right sequence, which I can prove computing pgr_dijkstra for the sequence 1 >> 0 >> 2 >> 3:</div>
<div><br></div><div><div>1975.82193954407</div><div>2723.3692284753</div><div>4374.81625857547</div></div><div><br></div><div>Do you have any idea of whatever might be wrong here?</div><div><br></div><div>Thanks for you help! :-)</div>
<div><br></div><div class="gmail_extra"><br clear="all"><div><div dir="ltr"><div>--</div><div>Helder Alves <br></div><br></div></div></div></div>