PDA

View Full Version : Multi-Point navigation (Arc Routing) - Via Points vs. calculateRouteWithPoints



isaac.udy
17.03.2015, 05:07
I am trying to create a system for garbage truck drivers. These drivers need to follow a set route down a number of streets. I need my application to be alerted whenever one street has been completed.

I am currently having our GIS specialist give me (via a RESTful API) several hundred 'waypoints' (arcs) consisting of a street name, and a lat/long. I am then navigating the driver between these waypoints. In Skobbler 2.3, I was simply using single navigation between the driver's current position and the next waypoint. However, I want the route to be navigated as a whole. I have been trying to use both Via Points and the calculateRouteWithPoints method, but neither of these is working particularly well.

Using via points, I can only add less than 5 via points. If I add more than 5, the route simply appears to not complete calculation.

Using the calculateRouteWithPoints method, I am also finding that if I add more than 20 or 30 points, the route fails to be created. In addition to this, when I add the user's current position as the FIRST point in the list for 'calculateRouteWithPoints' method, this seems to be ignored. I need to navigate what is essentially a pre-built route, but beginning at wherever the truck driver is.

One solution I imagined would be to use a limited number of via points (say 5), and add an extra via point when one is completed. This plan would allow me to use via points, and also give the drivers at least 3 or 4 streets worth of understanding where they're driving next. However, this doesn't work in practice, because I am REQUIRED to set an end point for the route, or the route will not display. I have attempted this solution by simply creating a new route every time a via point is completed, and adding that new via point to the new route, but this gives un-desirable effects where the route disappears for a second or two while the new route is being calculated.

My ideal solution would be to allow drivers to navigate a complete route of over 500 waypoints (arcs), displaying the whole route on the map at once.

My second best solution, if the ideal solution is unable to be completed, would be to allow the driver to navigate the whole route at once, but moving the 'end point' of the route every time a via point has been completed, and adding new via points as this happens, allowing drivers to see their route up to 4 or 5 waypoints ahead of where they currently are.

What are my options here? Is there something I am missing in attempting to complete this feature?

The route has basically been pre-computed for me, I just need the pre-computed route to be followed by Skobbler, with voice commands, and with no lag between completing one section (arc) of the route and beginning the next.

Thanks in advance for your help.

dandronic
17.03.2015, 13:21
There are no technical constraints to the number of via points that can be provided - but it may be that certain via points combinations (their frequency, locations, etc.) may confuse the routing engine. Could you add some examples of configurations that you've tried and did not work? (so that we can look closer at the input data).

Regarding the calculateRouteWithPoints method, this is not a replacement for via points navigation, but to GPX track navigation - the assumption being that the number of provided points is large, covering the whole route so it's interesting to hear that 20 or 30 points generate a route calculation error.
Again, could you attach an example of the input parameters you are providing to the API?
And what is the route calculation error? (the skRoutingErrorCode in onRouteCalculationFailed)

isaac.udy
19.03.2015, 02:36
Alright, I have got the via points sorted out now. Turns out it was an error by the guy who was giving me the data. He was giving me duplicate IDs, which was causing broken routes, which were causing the problems.

Sorry to waste your time again!

isaac.udy
19.03.2015, 02:53
Unsurprisingly, Skobbler struggles with the 500 or so Via Points I am trying to add. Is there a way that I can dynamically change the end point of a route? I know I can dynamically add Via Points, but it would be quite useful to be able to move the destination too.

If I can't do that, it looks like I am going to go back to my old solution, which was map out the route of each individual waypoint to the next waypoint, using polylines, and then just navigate between the current position and the next waypoint.

dandronic
19.03.2015, 09:11
Unfortunately it is not possible to change the destination dynamically - you would need a reroute for this (we'll definitely consider this improvement in a future update)