[pgrouting-dev] pgr_trsp with k

Hello,

I'm currently working with pgr_trsp. Would it be possible to get K results like when we use pgr_kDijkstra?

I could probably provide a pull request if someone provide me some pointers.

Julien
--
Julien-Samuel Lacroix
T: +1 418-696-5056 #202
Mapgears
http://www.mapgears.com/

On 3/10/2014 8:42 PM, Julien-Samuel Lacroix wrote:

Hello,

I'm currently working with pgr_trsp. Would it be possible to get K
results like when we use pgr_kDijkstra?

I could probably provide a pull request if someone provide me some
pointers.

Julien

Hi Julien,

I actually have trsp code from the developer sitting in a branch that I have not had time to integrate, document, and setup tests for. It does not solve the kDijkstra problem using TRSP (but read on). I discussed this with Roni and he was interested in developing it. Let me know if you have any interest in funding Roni to do it and I'll pass on contact info and make introductions.

The changes I have MIGHT be applicable to you problem. They implement via points so you can pass multiple location into TRSP and it will compute the route from 1-2-3-...-n. To do this you have to setup up the graph, and then reinitialize it it on the next leg of the journey. I think this could be adapted such that you have a start point and N destination and you build one graph and then solve it N times reinitialize the existing graph for each solution.

Most of the cost of a solution in pgRouting is reading the edges from the database, passing them to the code, building the graph. The graph solver is fast. So if you can build one big graph then solve it N times it is big win.

We would love to get a pull request for this. And if you have time to integrate Roni code I have not gotten to yet, that would be cool also and you would need it anyway.

-Steve

Hi Steve,

If I can look at the branch, it may give me ideas on how to do it and what kind of problem it solve. This will probably help me define the limits of my analysis and potential problems I may encounter.

If it does solve my problem, I will be happy to help.

Julien

On 14-03-10 09:25 PM, Stephen Woodbridge wrote:

On 3/10/2014 8:42 PM, Julien-Samuel Lacroix wrote:

Hello,

I'm currently working with pgr_trsp. Would it be possible to get K
results like when we use pgr_kDijkstra?

I could probably provide a pull request if someone provide me some
pointers.

Julien

Hi Julien,

I actually have trsp code from the developer sitting in a branch that I
have not had time to integrate, document, and setup tests for. It does
not solve the kDijkstra problem using TRSP (but read on). I discussed
this with Roni and he was interested in developing it. Let me know if
you have any interest in funding Roni to do it and I'll pass on contact
info and make introductions.

The changes I have MIGHT be applicable to you problem. They implement
via points so you can pass multiple location into TRSP and it will
compute the route from 1-2-3-...-n. To do this you have to setup up the
graph, and then reinitialize it it on the next leg of the journey. I
think this could be adapted such that you have a start point and N
destination and you build one graph and then solve it N times
reinitialize the existing graph for each solution.

Most of the cost of a solution in pgRouting is reading the edges from
the database, passing them to the code, building the graph. The graph
solver is fast. So if you can build one big graph then solve it N times
it is big win.

We would love to get a pull request for this. And if you have time to
integrate Roni code I have not gotten to yet, that would be cool also
and you would need it anyway.

-Steve
_______________________________________________
pgrouting-dev mailing list
pgrouting-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/pgrouting-dev

--
Julien-Samuel Lacroix
T: +1 418-696-5056 #202
Mapgears
http://www.mapgears.com/