<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Sun, May 19, 2013 at 10:16 PM, Stephen Woodbridge <span dir="ltr"><<a href="mailto:woodbri@swoodbridge.com" target="_blank">woodbri@swoodbridge.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Dave, et al,<br>
<br>
One of the stumbling blocks I have have had with creating a new API for TSP is how we should pass the distance matrix. So I have been thinking of something like this:<br>
<br>
select * from pgr_tsp(matrix <type>, num integer, start integer);<br></blockquote><div><br></div><div style>Hi Steve,</div><div style><br></div><div style>What is "num integer" supposed to be?</div><div> </div>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
The matrix type could be text for a SQL query that would return num rows of num float8 or it could be float8[][] that is [num][num] elements. And I support with a little extra work I could support both of these.<br></blockquote>

<div><br></div><div style>I would prefer some "regular" SQL query (if there is no strong argument against.</div><div style><br></div><div style>What about this:</div><div style><br></div><div style>SELECT * FROM pgr_tsp( 'SELECT id, start, end, cost FROM distances, origin int [, destination int])</div>

<div style><br></div><div style>... which would return the matrix in an optimized order.</div><div style>I think it would be nice to be able to set origin and destination point.</div><div style>But destination could be optional.</div>

<div style><br></div><div style>Daniel</div><div style><br></div><div style><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


<br>
I'm not interested in computing the distance matrix because I will not be able to do it "right" for any given use case and it limits how people can use the function.<br>
<br>
Thoughts?<br>
<br>
-Steve<br>
______________________________<u></u>_________________<br>
pgrouting-dev mailing list<br>
<a href="mailto:pgrouting-dev@lists.osgeo.org" target="_blank">pgrouting-dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/pgrouting-dev" target="_blank">http://lists.osgeo.org/<u></u>mailman/listinfo/pgrouting-dev</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><span style="font-family:arial,sans-serif;font-size:13px;border-collapse:collapse">Georepublic UG & Georepublic Japan<br>eMail: <a href="mailto:daniel.kastl@georepublic.de" style="color:rgb(66,99,171)" target="_blank">daniel.kastl@georepublic.de</a><br>

Web: <a href="http://georepublic.de/" style="color:rgb(66,99,171)" target="_blank">http://georepublic.de</a></span>
</div></div>