pgRouting / pgrouting

Repository contains pgRouting library. Development branch is "develop", stable branch is "master"
https://pgrouting.org
GNU General Public License v2.0
1.12k stars 364 forks source link

back to square 1 on TRSP code for version 2.4.0 #723

Closed cvvergara closed 7 years ago

cvvergara commented 7 years ago

Maybe trying to fix the warnings, I messed a little with the code. (it crashes the server sometimes) So, using the original code (that includes the via) and letting the warnings live will be best. (I don't know if that will crash the server sometimes, but Its worth the try)

And, keeping the wrappers when there are no restrictions. (unless the not so shortest paths is ok)

I need opinions.

links that might help to decide: https://travis-ci.org/cvvergara/pgrouting/jobs/189902506#L772 https://ci.appveyor.com/project/cvvergara/pgrouting/build/2.4.728

note that on travis:

ERROR:  could not load library "/usr/lib/postgresql/9.6/lib/libpgrouting-2.4.so": /usr/lib/postgresql/9.6/lib/libpgrouting-2.4.so: undefined symbol: heap_formtuple

is not letting the library to be built correctly Task while I get comments about this topic:

cvvergara commented 7 years ago

After fixing the heap_form_tuple it compiles and tests are executed:

From travis visual tests: the expected results get substitued with |||

< 0|2|4|1
< 1|5|10|1
< 2|10|12|1
< 3|11|11|1
< 4|6|8|1
< 5|5|7|1
< 6|8|6|1
< 7|7|-1|0
< 0|7|6|1
< 1|8|7|1
< 2|5|8|1
< 3|6|9|1
< 4|9|15|1
< 5|12|13|1
< 6|11|-1|0
---
> |||
> |||
> |||
> |||
> |||
> |||
> |||
> |||
> |||
> |||
> |||
> |||
> |||
> |||
> |||

tasks to do while I get comments about this topic:

cvvergara commented 7 years ago

The visual tests pass on my computer after the last change

   'src/trsp/test/test.conf' => [
         {
              'comment' => 'TRSP test for any versions.',
               'src/trsp/test/doc-trsp.test.sql' => 'Passed',
               'src/trsp/test/issue693.test.sql' => 'Passed',
               'src/trsp/test/issue704.test.sql' => 'Passed',
               'src/trsp/test/issue717.test.sql' => 'Passed',
              'src/trsp/test/trsp-any-02.test.sql' => 'Passed',
              'src/trsp/test/trsp_vias-any-04.test.sql' => 'Passed'
          }
   ],

On appveyor is still not compiling.

cvvergara commented 7 years ago

task:

cvvergara commented 7 years ago

After modifying line trsp.c line 22 which caused the error on appveyor: this is the change Now trsp.c compiles so it continued the compilation on the next file of the directory and GraphDefinition.cpp has 4 warnings and 31 errors.

Tasks:

cvvergara commented 7 years ago

Jenkins compilation and visual tests works (http://winnie.postgis.net:1500/view/pgRouting/job/pgRouting_PGVersionEDB/5775/console) shows an extra NOTICE message on the results that travis does not have (very minor issue, the least of the problems), but bottom line is that its working like in travis.

So currently the only problem I can see is in appveyor (visual studio)

I must say that I already went trough twice on fixing trsp for it to work and run eliminating all the errors & warning, but as the first comment mentions:

Maybe trying to fix the warnings, I messed a little with the code. (it crashes the server sometimes)

Also the fact that the test pass does not change the fact that there are lots of coding issues on the TRSP code: Some of the warnings on travis are errors on appveyor I don't know if there are logic issues or not, but I suspect there are, are if there are, they are out of scope of this current topic.

cvvergara commented 7 years ago

Fixing: https://ci.appveyor.com/project/cvvergara/pgrouting/build/2.4.731#L1099 this is the change now GraphDefinition.h has 15 warnings and 9 errors.

cvvergara commented 7 years ago

Fixing: Fix for: greater: is not a member of std on GraphDefinition.h this is the change Now build succeeded with 15 warnings there is this error when trying to load the library to the data base: https://ci.appveyor.com/project/cvvergara/pgrouting/build/2.4.733#L1691

ERROR:  could not find function "turn_restrict_shortest_path_vertex" in file "C:/Program Files/PostgreSQL/9.4/lib/libpgrouting-2.4.dll"
cvvergara commented 7 years ago

fixing the error by adding PGDLLEXPORT to the functions