<div dir="ltr"><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Mar 11, 2014 at 9:53 AM, Julien-Samuel Lacroix <span dir="ltr"><<a href="mailto:jlacroix@mapgears.com" target="_blank">jlacroix@mapgears.com</a>></span> wrote:<br>

<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">Hello,<br>
<br>
I'm trying to get my head around a networking building problem and wonder if it would be possible to have conditional cost depending on the type of segment (or nodes) we crossed to get there?<br>
<br>
An example would be:<br>
Each line segment have a cost and a type (A, B or C). You need to calculate the shortest path from one node 1 to node 35, but can only use one segment of type C.<br>
<br>
Would this be possible?<br>
What kind of modification would this need?<br>
<br>
My current solution would be to calculate the total cost using every single type C segment in my area, but in the long run, I fear this won't scale.<br>
<br>
I'm currently building a carpooling portal and I get the carpool offers as segments and nodes in my DB. I should not allow users to plan a trip combining 2 different offers as this quickly becomes a logistical nightmare.<br>


<br>
Best regards,<br>
Julien<span class=""><font color="#888888"><br>
<br></font></span></blockquote><div><br></div><div>Hi Julien,</div><div><br></div><div>It's an interesting problem and the first thing that came to my mind was "Time Dependant Shortest Path" (TDSP) as it also has one constraint which changes during moving through the network.</div>

<div><br></div><div>Jay developed it during Google Summer of Code, but before last year's new release, so the code still lives in a separate branch and won't follow the formal rules we use since version 2.0</div>
<div>
<ul><li><a href="https://github.com/pgRouting/pgrouting/wiki/Time-dependent---Dynamic-Shortest-Path">https://github.com/pgRouting/pgrouting/wiki/Time-dependent---Dynamic-Shortest-Path</a><br></li></ul><div>Well, in your case I think it needed a new algorithm, but maybe TDSP gives some ideas. Soon GSoC is going to start, so this is another project idea? ;-)</div>

</div><div><br></div><div>Best reagrds,</div><div>Daniel</div><div><br></div><div><br></div><div> </div></div>-- <br><div dir="ltr"><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.info" style="color:rgb(66,99,171)" target="_blank">http://georepublic.info</a></span></div>


</div></div>