I really like GraphHoppers custom model routing functionality, so first of all thank you for making that. Secondly I have a use case that might be possible with a combination of custom models and some further customization and I would be grateful if I could get your feedback/ opinions on the feasibility of it as well as changes that might be required.
For background I have an application that lets you discover sights within a certain detour time along a given route. The way we do that is by indexing a suitable subset of OSM junction nodes with pre-calculated travel times in preprocessing. I think Graphhopper might lend itself quite well to an Integration since from what I read GraphHopper tower nodes are osm junction nodes and can be fairly easily retrieved.
But what really interests me is not only finding out conveniently located sights after the fact but take them into account during routing via custom models so that you could find, for example a route that is biased towards leading you past lakes and beer gardens
.
The way I understand it, I could take my index during Graphhopper import, encode category information on the edges and then create a bias towards some categories in a custom model. One problem I see (and there might be more that I don’t see, let me know) is of being trapped in local maxima: so with the aforementioned lake, the route would take you to the lake (access junction) but then also to all the other junctions (because they share the same higher priority) leading to the lake which we don’t want. Is there anything I could do about that within the existing custom model infrastructure? I’ve seen there is something to take preceding edges into account but not sure if that would be enough. Other than that I imagine keeping track of visited nodes in the router and then having a reset of priority when conditions are satisfied would be an option but it sounds vastly more complicated.