pgRouting / pgrouting

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

Problems installing Time Dependent Routing code #448

Open stev-0 opened 8 years ago

stev-0 commented 8 years ago

I am following instructions here to installing time dependent routing. When I attempt to compile the code with the Time Dependent Routing in it on Ubuntu 14.04, I get a series of errors:

Building CXX object extra/driving_distance/src/CMakeFiles/routing_dd.dir/boost_drivedist.o In file included from /usr/include/boost/graph/adjacency_list.hpp:246:0, from /home/ubuntu/workspace/pgrouting/extra/driving_distance/src/boost_drivedist.cpp:25: /usr/include/boost/graph/detail/adjacency_list.hpp: In instantiation of ‘struct boost::detail::adj_list_any_edge_pmap::bind_<boost::adjacency_list<boost::listS, boost::vecS, boost::directedS, Vertex, Edge>, Edge, boost::edge_weight_t>’: /usr/include/boost/graph/detail/adjacency_list.hpp:2684:12: required from ‘struct boost::detail::adj_list_choose_edge_pmap<boost::edge_weight_t, boost::adjacency_list<boost::listS, boost::vecS, boost::directedS, Vertex, Edge>, Edge>’ /usr/include/boost/graph/detail/adjacency_list.hpp:2689:14: required from ‘struct boost::detail::adj_list_edge_property_selector::bind_<boost::adjacency_list<boost::listS, boost::vecS, boost::directedS, Vertex, Edge>, Edge, boost::edge_weight_t>’ /usr/include/boost/graph/properties.hpp:208:12: required from ‘struct boost::detail::edge_property_map<boost::adjacency_list<boost::listS, boost::vecS, boost::directedS, Vertex, Edge>, boost::edge_weight_t>’ /usr/include/boost/graph/properties.hpp:228:10: required from ‘struct boost::property_map<boost::adjacency_list<boost::listS, boost::vecS, boost::directedS, Vertex, Edge>, boost::edge_weight_t>’ /home/ubuntu/workspace/pgrouting/extra/driving_distance/src/boost_drivedist.cpp:87:39: required from here /usr/include/boost/graph/detail/adjacency_list.hpp:2652:29: error: forming reference to void typedef value_type& reference; ^ /usr/include/boost/graph/detail/adjacency_list.hpp:2653:35: error: forming reference to void typedef const value_type& const_reference; ^ /usr/include/boost/graph/detail/adjacency_list.hpp:2657:61: error: forming reference to void typename Graph::vertex_descriptor,Property,Tag> type; ^ /usr/include/boost/graph/detail/adjacency_list.hpp:2660:68: error: forming reference to void typename Graph::vertex_descriptor,const Property, Tag> const_type; ^ /home/ubuntu/workspace/pgrouting/extra/driving_distance/src/boost_drivedist.cpp: In function ‘int boost_dijkstra_dist(edge_t*, unsigned int, int, double, bool, bool, path_element_t**, int*, char**)’: /home/ubuntu/workspace/pgrouting/extra/driving_distance/src/boost_drivedist.cpp:88:27: error: no matching function for call to ‘get(boost::edge_weight_t, graph_t&)’ get(edge_weight, graph); ^ /home/ubuntu/workspace/pgrouting/extra/driving_distance/src/boost_drivedist.cpp:88:27: note: candidates are: In file included from /usr/include/boost/graph/adjacency_list.hpp:36:0, from /home/ubuntu/workspace/pgrouting/extra/driving_distance/src/boost_drivedist.cpp:25: /usr/include/boost/property_map/property_map.hpp:179:19: note: template<class T> const T& get(const T*, std::ptrdiff_t) inline const T& get(const T* pa, std::ptrdiff_t k) { return pa[k]; } ^ /usr/include/boost/property_map/property_map.hpp:179:19: note: template argument deduction/substitution failed: /home/ubuntu/workspace/pgrouting/extra/driving_distance/src/boost_drivedist.cpp:88:27: note: mismatched types ‘const T*’ and ‘boost::edge_weight_t’ get(edge_weight, graph);

I wondered if this was due to the boost version (1.54), or the CGAL version (10.0.1). I have tried following the instructions here and using the pgrouting4w fork, but that gave similar errors.

Anyone know how this library can be built? Since it hasn't been updated since 2011, the build systems and all the libraries must have changed so I assume it's something to do with that.

woodbri commented 8 years ago

@stev-0 Sorry this is a Google Summer of Code (GsoC) project and as a result the students that are knowledgeable about it have mostly moved on to other work in their studies. We are trying to absorb these projects into pgRouting, but it is time consuming and often means that we need to rewrite a lot of code to make it stable and to better understand it for support.

I believe that this code may have been developed against pgRouting 1.x because pgRouting 2.0 was released in 2013 IIRC and the TDSP Tutorial is dated 2011.

If you are interested in trying to get this to compile and work against 2.x I would recommend that you fork pgrouting and checkout pgrouting-2.1.0 or dev-2.2 and try to get it to work in either of those environments and send us a pull request.

woodbri commented 8 years ago

I just added the following comment to the Tutorial page: This project was built against pgRouting 1.x and will need some work to convert it to compile under the 2.0, 2.1, or 2.2 build structure.

woodbri commented 8 years ago

FYI, I just tried to compile this with: -- Boost version: 1.54.0 and get errors. One problem we had with boost is that they moved some headers around in their include directory tree. You might need to change the include paths in some files based on your version of boost code. Compare the paths in src/driving_distance/src/boost_drivedist.cpp in master and extra/driving_distance/src/boost_drivedist.cpp in gsoc-tdsp. And do the same for other files.

stev-0 commented 8 years ago

OK, thanks. Do you think it might be enough to compile against earlier versions of boost / CGAL as a quick fix? I have tried a bit of that to no avail.

woodbri commented 8 years ago

You might try using Boost 1.34 or 1.43.

dkastl commented 8 years ago

@stev-0 as mentioned, TDSP was developed for pgRouting 1.x. It was not ported to pgRouting 2.0 because we were not aware of anyone using it at this time and the effort would have further delayed a new release. I think the problem of time-dependent shortest path is not solved by any other software. It's a very interesting problem, but usually also requires data with such time-dependent information.

Any help (contributions or funding) with bringing TRSP back to the latest version of pgRouting would be very appreciated.

ViswanathLekshmanan commented 6 years ago

Any updates on this ? Any way to solve TDSP problem with pgRouting ?

dkastl commented 6 years ago

No update on this. Someone either needed to provide funding or development support.