<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 19/07/13 15:00, sanak wrote:<br>
Well spotted !<br>
<br>
yes it does matter, I had just assumed because I got an answer it
was all working, it seems that its not, so there still seems to be
an issue :-(<br>
<br>
The answers should be indentical<br>
Dave<br>
</div>
<blockquote
cite="mid:CALeT7PC_+b881AmZV1KhbrpCRRAVXZPLbF69z+0x1CU+Z0Z1bg@mail.gmail.com"
type="cite">
<div dir="ltr">Hi Dave,
<div><br>
</div>
<div>Yes, it is also necessary.<br>
</div>
<div><a moz-do-not-send="true"
href="https://github.com/sanak/pgrouting4w/commit/fa8c5ff559344653a464f2c3416de0ef8c4ce393"
target="_blank">https://github.com/sanak/pgrouting4w/commit/fa8c5ff559344653a464f2c3416de0ef8c4ce393</a></div>
<div><br>
</div>
<div>By the way, in my environment(currently use MacOSX),</div>
<div>your 2nd result was as follows, and it is not same as 1st
one.</div>
<div>
====</div>
<div>
<div>pgrouting-workshop=# SELECT seq, id FROM
pgr_tsp('{{0,0.1,0.3,0.3},{0.1,0,0.2,0.2},{0.3,0.2,0,0.2},{0.3,0.2,0.2,0}}'::float8[],1);</div>
<div> seq | id </div>
<div>-----+----</div>
<div> 0 | 1</div>
<div> 1 | 0</div>
<div> 2 | 3</div>
<div> 3 | 2</div>
<div>(4 rows)</div>
<div>====</div>
</div>
<div><br>
</div>
<div style="">In your environment, is there no problem?</div>
<div style=""><br>
</div>
<div style="">Regards,</div>
<div style="">
<br>
</div>
</div>
<div class="gmail_extra"><br>
<br>
<div class="gmail_quote">2013/7/19 Dave Potts <span dir="ltr"><<a
moz-do-not-send="true"
href="mailto:dave.potts@pinan.co.uk" target="_blank">dave.potts@pinan.co.uk</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF">
<div>On 19/07/13 15:08, Dave Potts wrote:<br>
I have found the problem, in the function int
findEulerianPath(TSP *tsp) in the file
src/tsp/src/tsplib.c<br>
<br>
<br>
the code says something like <br>
int d,i,j,k,l,a<br>
<br>
The varible d is used to compare against a variable of
type DTYPE, with the result that there seems to be an
underflow/overflow issue<br>
<br>
so the code needs to be changed to<br>
<br>
int *mst, *arc;<br>
DTYPE d;<br>
int i, j, k, l, a;<br>
int n, *iorder, *jorder;<br>
<br>
having done, I now get the expected result.<br>
<br>
Dave.<br>
</div>
<blockquote type="cite">
<div>On 19/07/13 13:02, sanak wrote:<br>
Hi Sanak<br>
<br>
Thanks for your help<br>
<br>
I had the float version in my source base I changed it
to a double, I have done a make clean, install
restarted the service, still have the same problem :-(<br>
<br>
Dave<br>
</div>
<blockquote type="cite">
<div dir="ltr">Hi Dave, Stephen,
<div><br>
</div>
<div>I encountered the same issue(<a
moz-do-not-send="true"
href="https://github.com/pgRouting/pgrouting/issues/159"
target="_blank">https://github.com/pgRouting/pgrouting/issues/159</a> ),</div>
<div> so, I sent the pull request(<a
moz-do-not-send="true"
href="https://github.com/pgRouting/pgrouting/pull/160"
target="_blank">https://github.com/pgRouting/pgrouting/pull/160</a> ).</div>
<div><br>
</div>
<div>> Stephen</div>
<div>Could you check my pull request?</div>
<div><br>
</div>
<div>Thanks,</div>
</div>
<div class="gmail_extra"><br>
<br>
<div class="gmail_quote">2013/7/19 Dave Potts <span
dir="ltr"><<a moz-do-not-send="true"
href="mailto:dave.potts@pinan.co.uk"
target="_blank">dave.potts@pinan.co.uk</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0
0 .8ex;border-left:1px #ccc
solid;padding-left:1ex">I have been trying to do
some work which requires the tsp, some of my
values have values of 0.1 in the dataset, I keep
getting odd results.<br>
<br>
So I tried a well known example from the pgr
_tsp distance page and it work as expected.<br>
<br>
I then repeated the same example but reduced all
of the distance by a factor off 10 and got an
error. Unless I have make a mistake in my
understanding of the manual page, I think we
might a problem where<br>
<br>
-- version used<br>
select pgr_version();<br>
pgr_version<br>
-------------------------------------------------<br>
(2.0.0-dev,v2.0.0-rc1,0,bf13fd7,develop,1.48.0)<br>
-- Use a example get a result set<br>
SELECT seq, id FROM
pgr_tsp('{{0,1,3,3},{1,0,2,2},{3,2,0,2},{3,2,2,0}}'::float8[],1);<br>
seq | id<br>
-----+----<br>
0 | 1<br>
1 | 2<br>
2 | 3<br>
3 | 0<br>
(4 rows)<br>
-- repeat for reduce everything by scale factor
of 10 ie 1.0 becomes 0.1 etc<br>
<br>
SELECT seq, id FROM
pgr_tsp('{{0,0.1,0.3,0.3},{0.1,0,0.2,0.2},{0.3,0.2,0,0.2},{0.3,0.2,0.2,0}}'::float8[],1);<br>
<br>
ERROR: Error TSP fail to findEulerianPath,
check your distance matrix is valid.<br>
<br>
As far as I understand it my matrix has 0's on
the leading diangonal and [a,b] == [b,a]<br>
<br>
Dave.<br>
_______________________________________________<br>
Pgrouting-users mailing list<br>
<a moz-do-not-send="true"
href="mailto:Pgrouting-users@lists.osgeo.org"
target="_blank">Pgrouting-users@lists.osgeo.org</a><br>
<a moz-do-not-send="true"
href="http://lists.osgeo.org/mailman/listinfo/pgrouting-users"
target="_blank">http://lists.osgeo.org/mailman/listinfo/pgrouting-users</a><br>
</blockquote>
</div>
<br>
<br clear="all">
<div><br>
</div>
-- <br>
<div dir="ltr">
<div>Ko Nagase (sanak)</div>
<div>Georepublic Japan</div>
<div>mail: <a moz-do-not-send="true"
href="mailto:geosanak@gmail.com"
target="_blank">geosanak@gmail.com</a> </div>
<div> <a moz-do-not-send="true"
href="mailto:nagase@georepublic.co.jp"
target="_blank">nagase@georepublic.co.jp</a></div>
</div>
</div>
<br>
<fieldset></fieldset>
<br>
<pre>_______________________________________________
Pgrouting-users mailing list
<a moz-do-not-send="true" href="mailto:Pgrouting-users@lists.osgeo.org" target="_blank">Pgrouting-users@lists.osgeo.org</a>
<a moz-do-not-send="true" href="http://lists.osgeo.org/mailman/listinfo/pgrouting-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/pgrouting-users</a>
</pre>
</blockquote>
<br>
<br>
<fieldset></fieldset>
<br>
<pre>_______________________________________________
Pgrouting-users mailing list
<a moz-do-not-send="true" href="mailto:Pgrouting-users@lists.osgeo.org" target="_blank">Pgrouting-users@lists.osgeo.org</a>
<a moz-do-not-send="true" href="http://lists.osgeo.org/mailman/listinfo/pgrouting-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/pgrouting-users</a>
</pre>
</blockquote>
<br>
</div>
<br>
_______________________________________________<br>
Pgrouting-users mailing list<br>
<a moz-do-not-send="true"
href="mailto:Pgrouting-users@lists.osgeo.org">Pgrouting-users@lists.osgeo.org</a><br>
<a moz-do-not-send="true"
href="http://lists.osgeo.org/mailman/listinfo/pgrouting-users"
target="_blank">http://lists.osgeo.org/mailman/listinfo/pgrouting-users</a><br>
<br>
</blockquote>
</div>
<br>
<br clear="all">
<div><br>
</div>
-- <br>
<div dir="ltr">
<div>Ko Nagase (sanak)</div>
<div>Georepublic Japan</div>
<div>mail: <a moz-do-not-send="true"
href="mailto:geosanak@gmail.com" target="_blank">geosanak@gmail.com</a> </div>
<div> <a moz-do-not-send="true"
href="mailto:nagase@georepublic.co.jp" target="_blank">nagase@georepublic.co.jp</a></div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Pgrouting-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Pgrouting-users@lists.osgeo.org">Pgrouting-users@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/pgrouting-users">http://lists.osgeo.org/mailman/listinfo/pgrouting-users</a>
</pre>
</blockquote>
<br>
</body>
</html>