[pgrouting-dev] TRSP

Vicky Vergara vicky at georepublic.de
Mon Oct 2 07:56:57 PDT 2017


Hello all

I made a rewrite of the original TRSP (no changes for vias, no changes for
points)
Its not complete (converting the graph to boost graph its still missing)

Branch is here:
https://github.com/cvvergara/pgrouting/tree/rewritte-trsp2


you can compare the original C code
https://github.com/cvvergara/pgrouting/blob/rewritte-trsp2/src/trsp/trsp.c
with the new code C code
https://github.com/cvvergara/pgrouting/blob/rewritte-trsp2/src/trsp/new_trsp.c

The old driver file:
https://github.com/cvvergara/pgrouting/blob/rewritte-trsp2/src/trsp/trsp_core.cpp
The new driver file:
https://github.com/cvvergara/pgrouting/blob/rewritte-trsp2/src/trsp/trsp_driver.cpp

And the old C++ code
https://github.com/cvvergara/pgrouting/blob/rewritte-trsp2/src/trsp/GraphDefinition.cpp
with the new C++ code
https://github.com/cvvergara/pgrouting/blob/rewritte-trsp2/src/trsp/edgeInfo.cpp
https://github.com/cvvergara/pgrouting/blob/rewritte-trsp2/src/trsp/rule.cpp
https://github.com/cvvergara/pgrouting/blob/rewritte-trsp2/src/trsp/pgr_trspHandler.cpp


With these changes:

- pointers are no longer used (no leaks)
- the code is more readable (so I think),
- ​I has the one to one, one to many, many to one and many to many versions:
https://github.com/cvvergara/pgrouting/blob/rewritte-trsp2/sql/trsp/trsp.sql
​
they all call this function:
https://github.com/cvvergara/pgrouting/blob/rewritte-trsp2/sql/trsp/_trsp.sql
- The sql files for the postgres (not underscored functions):
https://github.com/cvvergara/pgrouting/blob/rewritte-trsp2/sql/trsp/trsp_V2.2.sql
https://github.com/cvvergara/pgrouting/blob/rewritte-trsp2/sql/trsp/viaVertices_v2.2.sql
Use the new _pgr_trsp where is appropriate

- sorry no documentation yet, just the queries results on these notes are
updated
  https://github.com/cvvergara/pgrouting/tree/rewritte-trsp2/doc/trsp
  (I haven't gone through the text of the notes to update the text based on
the results)

- The sql functions are still underscored because the missing part of the
rewrite
 - Its not complete (converting the graph to boost graph its still missing)

For those who are using one way or another the pgr_trsp(one to one) version
If you can give these a try, and see if you find any issue about it.

I will be merging to develop next monday up to this changes

So any comments would be greatly appreciated.

I am normally on gitter
https://gitter.im/pgRouting/pgrouting

Vicky

-- 

Georepublic UG (haftungsbeschränkt)
Salzmannstraße 44,
81739 München, Germany

Vicky Vergara
Operations Research

eMail: vicky at georepublic.de
Web: https://georepublic.info

Tel: +49 (089) 4161 7698-1
Fax: +49 (089) 4161 7698-9

Commercial register: Amtsgericht München, HRB 181428
CEO: Daniel Kastl
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/pgrouting-dev/attachments/20171002/73bda016/attachment.html>


More information about the pgrouting-dev mailing list