Page 1 of 1

Why do we get a negative insertTourDistance in proposal func

Posted: Thu Jun 25, 2020 2:17 pm
by jmamy
We use one of the proposal functions of xTour. One of the proposals of findTourForUnplannedOrders contains a negative value for the additional insertTourDistance. Is this a bug? What is the reason for that?

Re: Why do we get a negative insertTourDistance in proposal

Posted: Thu Jun 25, 2020 2:26 pm
by Bernd Welter
Hello Julien,

that's an effect I can easily explain based on an other example. I'd label the question "why does an additional waypoint reduce the distance of a track?":
insertTourDistance.PNG
Look at the attached image: The original fastest route from Karlsruhe (Southwest) to Heilbronn(Northeast) takes a quick ride via a highway and so the time is "just" 53 minutes with a distance of almost 90km.
Now by adding another waypoint (blue icons) the "best" route is more or less the straight connection via some minor roads. The new track is just 74km so adding the blue qaypoint did save about 15km.

In other words:
- it is not a bug
- it simply requires an explanation ;-)

Best regards,
Bernd