[OSRM-talk] Add costs on route sections.

Pedro Luiz Cumino pedro.cumino at gmail.com
Fri Sep 30 00:19:46 UTC 2016


Hello all,


I'm a new user of the ORSM engine. I can run the basic setup and the server.


I'm working in build a route engine for web purpose in order to avoid
certain areas.


I'm wondering if it's possible to add costs to a certain group of route
sections. This costs must be considered during the route calculation. The
idea is better explained below:


I have the report coming from an external service, which comes as a JSON
object. It informs me the location where a sensor is present and must be
considered when calculating the route, like a cost to the lane stretch
pointed by the latitude and longitude from the sensors JSON object. The
sensors classify the region as *high*, *medium* or *low* level of
pollution. I need to set this cost to the lane stretch and then compare if
it's worthwhile to select the lane stretch where the issue is present or if
select another route is a better decision.



How open is the route solver service in order to implement this kind of
cost over a route? The idea at the end is to select the lower cost route by
comparing the issue level, the time travelling and the travelled distance
using my own algorithm.



The Figures 1 and 2 illustrate what I'm looking for. Figure 1 shows the
route A as the best one to be chosen, even with an issue place on it (the
issue with the lowest level). The route B is the worst since it has the
highest issue level/cost. The route D is possible to reach the end, but the
cost would be too high to be chosen, what makes it the worst route. Figure
2 shows the route B as the best route to be chosen because the cost of the
issue on B is lower than the cost that the total distance of D represents.



Figure 1
<https://geonet.esri.com/servlet/JiveServlet/showImage/2-630854-217931/route-solution.gif>



Figure 2
<https://geonet.esri.com/servlet/JiveServlet/showImage/2-630854-217935/route-solution-withBarriers.gif>







In summary, I need a way to insert a cost to certain routes (using the
information from coming from another service) and then calculate the route
considering such costs. At the end, the algorithm to be implemented will
consider both issues and route distances.


Which files should I modify in order to accomplish it? Where can I find the
routing algorithm used by the engine?



Thanks in advance!

-- 
Atenciosamente,
Kind regards,

Pedro Luiz Cumino.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/osrm-talk/attachments/20160929/00bc213f/attachment.html>


More information about the OSRM-talk mailing list