Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Apologies in advance---this isn't an issue so much as a question.
I would like to process a small city for edge-covering problems, like the Chinese Postman Problem.
Obviously I could write my own node and edge extraction code, etc etc, but why reinvent the wheel, esp when I like the flexibility of the OSRM approach to extracting content from OSM files.
I'm not sure the best way to go about accessing the underlying network graph, however. Should I just hack out a CPP solver as part of the server algorithms in my own fork? Or is there a hook in the node or C++ bindings to access the underlying graph (if there is, I can't find it).
There does exist such a graph, although access to it isn't easy by default. OSRM has so far focused primarily on shortest-path problems, so the actual routing graphs used (the CH and MLD graphs) aren't really useful for arc-covering problems - it's not possible to traverse all edges directly, particularly with the CH graph.
However - @TheMarex did some work about 18 months ago to show how to implement A*:
The last 4 commits on that branch show how to access the base graph - the one that hasn't been processed for accelerated shortest-path queries.
While this branch is pretty behind
It assumes you've created data using the MLD pipeline -
I'd use this as a starting point. This stuff isn't exposed in the public library bindings by default (the "routing algorithm" concept is an internal concept), but you could certainly make a new routing algorithm, then implement a new plugin that implements the public interface to the behaviour you want to write (say