Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KDjikstra compile fails #66

Closed
kgeographer opened this issue Aug 19, 2012 · 10 comments
Closed

KDjikstra compile fails #66

kgeographer opened this issue Aug 19, 2012 · 10 comments
Milestone

Comments

@kgeographer
Copy link

I'm trying to add KDijkstra to my pgRouting install (which works and works well by the way, thanks).

The instructions say simply "extract the contents of this in your /extra directory and add KDijkstra in its CMakeLists.txt."

KDijkstra already appears in /extra/CMakeList.txt. I run cmake without errors, make (4 deprecated header errors) and sudo make install (the writing is going to a folder owned by root).

I get successful install of librouting.so and the 4 basic sql files -- nothing about KDijkstra.

I tried adding to the root CMakeLists.txt
${PGROUTING_SOURCE_DIR}/extra/Kdijkstra ${PGROUTING_SOURCE_DIR}/extra/Kdijkstra/src
but the result is the same

I can't install functions in routing_tomany.sql of course because there's no library librouting_ktargets available.

Any ideas?

tia
Karl

@HSylvio
Copy link

HSylvio commented Aug 21, 2012

Hi,
Thanks for the feedback; I'm trying to install the whole stuff on a fresh squeeze server and I am facing many various problems...

The deprecated function comes from edge_visitors.hpp, MAYBE you can replace #include...graph/detail/is_same.hpp by #include...type_traits/is_same.hpp
(but that's not the point)

You were right adding ${PGROUTING_SOURCE_DIR}/extra/KDijkstra and ${PGROUTING_SOURCE_DIR}/extra/KDijkstra/src to the function SET(PGROUTING_INCLUDE_DIRECTORIES ;
in root CMakeLists.txt.
Have you also tried adding
SUBDIRS(extra/KDijkstra) at the end of this CMakeLists.txt?
(sorry for the lowercase, I replaced it in the tar.gz)

Please tell me if it works so I add the install instructions I forgot!

@kgeographer
Copy link
Author

thanks for getting back to me. I didn't do that (should have looked
harder!) and will get to it in the next day or two and get back to you.

Karl

On 8/21/2012 3:28 AM, HSylvio wrote:

Hi,
Thanks for the feedback; I'm trying to install the whole stuff on a
fresh squeeze server and I am facing many various problems...

You were right adding ${PGROUTING_SOURCE_DIR}/extra/Kdijkstra and
${PGROUTING_SOURCE_DIR}/extra/Kdijkstra/src to the function
SET(PGROUTING_INCLUDE_DIRECTORIES ;
in root CMakeLists.txt.

Have you also added
SUBDIRS(extra/Kdijkstra) at the end of this CMakeLists.txt?


Reply to this email directly or view it on GitHub
#66 (comment).

@HSylvio
Copy link

HSylvio commented Sep 10, 2012

Anyone tried using KDijkstra since?
I also created a fork (HSylvio/pgrouting), if anyone is interested...

@kgeographer
Copy link
Author

Sorry, I meant to get back sooner --

The compile was successful with the added config settings. Except that
instead of adding extra/Kdijkstra to the existing paths in the
SUBDIRS(core) I ran it with only SUBDIRS(extra/Kdijkstra) then ran the
resulting sql to install the functions.

The functions worked, but we have not tested yet whether the speed will
be adequate for our application.

On 9/10/2012 5:37 AM, HSylvio wrote:

Anyone tried using KDijkstra since?
I also created a fork (HSylvio/pgrouting), if anyone is interested...


Reply to this email directly or view it on GitHub
#66 (comment).

@emeeks
Copy link

emeeks commented Sep 15, 2012

I've just started using KDijkstra and the performance is off-the-charts. I was wondering, though, is it possible to also implement a manyto1 function? I'd like to know the paths from X to a set of nodes and compare it with the paths from that set of nodes to X.

@HSylvio
Copy link

HSylvio commented Sep 17, 2012

Dear emeeks,

first, if you use the example SQL in your call, the function will use "length::double precision as cost" thus no restrictions are applied.
I thougt you could replace this part by "reverse_cost::double precision as cost" to make a many_to_1 dijkstra. It should work if your reverse_cost values are correctly set.

As a matter of fact, in my current db to_cost is always NULL and reverse_cost == length (is it normal?!?),
so I can't give you any execution examples (but in theory I think using "reverse_cost as cost" would work juste fine).
I'll see if a newer osm and osm2pgrouting will give me some "to_cost" and sometimes different "reverse_cost" values.

Cheers

@HSylvio
Copy link

HSylvio commented Oct 3, 2012

Hi there,
I just modified osm2pgrouting so that it considers "oneway" values (true, 1 and yes) as oneway=true...
So in these cases reverse_cost = 10k * length (which is a little bit exagerated); and many_to_one could be constructed as explained in the last comment.

@woodbri
Copy link
Contributor

woodbri commented May 9, 2013

https://github.com/HSylvio/pgrouting

This is a one to many shortest path solution.

@dkastl
Copy link
Member

dkastl commented May 14, 2013

Moved this into 2.0 Milestone. If not appropriate just move to ie. 2.1

@woodbri
Copy link
Contributor

woodbri commented May 26, 2013

Now merged into 2.0. closing.

@woodbri woodbri closed this as completed May 26, 2013
@dkastl dkastl removed the 2.0 label Mar 23, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants