osmandapp / OsmAnd

OsmAnd
https://osmand.net
Other
4.4k stars 988 forks source link

Abberance in the route calculation. #17001

Closed Breizhux closed 1 year ago

Breizhux commented 1 year ago

🐞 routing report

Routing engine

Routing Profile

In car routing profile.

Start and end points

Start address : https://www.openstreetmap.org/#map=17/48.10517/-1.69851 End address : https://www.openstreetmap.org/#map=19/48.11816/-1.67616

Actual and expected routes

The expected route is the one calculated on the open street map website : https://www.openstreetmap.org/directions?engine=fossgis_osrm_car&route=48.10520%2C-1.69850%3B48.11820%2C-1.67620#map=16/48.1118/-1.6873

The itineraries are aberrant, adding completely useless detours... Pictures will speak better than long speeches. These 3 captures are taken on the same route in car profile (I did not check the other profiles, I can do it if you wish):

Is this a regression?

I remember (when I was a kid ^^) a few years ago, I was promoting OSMAnd precisely for the quality of the calculated routes. I thought they were really amazing. But I can't remember which version the change was made to. But one day I discovered that OSMAnd proposed completely aberrant routes. Since then, regularly during some trips, I discover aberrations of this type, which I can obviously avoid sometimes... But this is not normal.

When I started to use OSMAnd, the first times I thought I was seeing aberrations, it was actually the application that had detected that by making me go through secondary roads the way to avoid me long roads with lights for example. It was really incredible. But now it is not the case anymore, on the contrary. In this case it lengthens the route for nothing!

To be honest, I really like OSMAnd, it's one of my favorite applications. But if it doesn't do its job anymore, even if the interface is made customizable and the navigation made pleasant, if the route is wrong (calculated route or ETA), the application is unusable.

I will try to find an old version of OSMAnd... But it must be 2 years and a half that I encounter this bug...

🌍 Your Environment

OsmAnd Version:


OsmAnd~ 4.3.8

Device and Android/iOS version: Device : Xiaomi Mi A1 Android version : 12

Maps used (online or offline):

Anything else relevant?

OSMAnd has all the capabilities to be by far the best GPS application. Please make sure it stays that way!!! Lots of courage, and thanks for a great project!

Zirochkabila commented 1 year ago

OsmAnd~ 4.5.0#35817m, Released: 2023-04-19

From 48.10527, -1.69846 to 48.11813, -1.67616 OsmAnd OSM Map here

App Cost 537 Cost 530
App Cost 279 Cost 277

@Breizhux, in this case, the route is correct, as the fare is lower

App Cost 96 Cost 122
Breizhux commented 1 year ago

I'm not sure I understand your answer. Besides I am not familiar with route calculations... When you talk about "costs" I guess it means fuel costs or time costs (depending on the setting)?

Anyway, in the first two cases, the cost is higher with the OSMAnd route than with the OpenStreetMap route... Only the third case seems to cost less.

But in fact, whatever happens, it is disconnected from reality. If you look closely, on the OSMAnd routes the resulting route is necessarily more fuel or time consuming: the calculated route looks like it follows the widest road, but which is therefore also the busiest; it also contains more traffic lights, more pedestrian crossings, etc. What I'm saying here is a bit theoretical, but it's mostly verifiable in reality, i.e. I spend much more time braking and accelerating with OSMAnd routes than with the others, where I gain in consumption (less energy consuming), by saving time and distance! The routes calculated by OSMAnd are in every way a loser. I'm not sure how much I want to tell myself that the route proposed by OSMAnd is better from a certain point of view, but there, I don't find it...

On the other hand, after having done the test, the 3 previous captures were made without the fuel economy mode. With the fuel economy mode, the route is better and corresponds to what I would usually expect, but there remains this which is still aberrant:

Capture du 2023-04-20 12-29-20 *the red dots correspond to traffic lights, which were not necessarily visible with this zoom level.

Calculated route (by car, economy mode or not): 4 traffic lights, 2 direction changes, 2 bus stop zones. Desired route (in both cases): 3 traffic lights, 1 change of direction, 2 bus stop zones.

In short, without the fuel saving mode, I don't see on what criterion the journey is optimised, as it is longer in time, distance and even consumption... After all, the aim is perhaps to accentuate the usefulness of the "fuel-saving route" option by adding unnecessary detours 😂️ More seriously, even without the fuel-saving mode, the route has no interest in making us take detours, and even less in making us pass through the big intersections that are regularly jammed in town.

And in fuel economy mode, the ride is better... But only in town. On long journeys the route avoids the motorways... Which is not desirable at all considering my fuel consumption. My car consumes little on the motorway (~4L/100), but the algorithm seems to assume that driving above 90km/h is undesirable. But in this case, it makes me drive on slower roads, but often segmented by regular roundabouts, or even traffic lights. So I spend my journey accelerating/braking at every intersection. And despite a rather regular and smooth driving, I consume much more than going on the motorway to avoid all these roundabouts. I can believe that it depends on the car. In this case, we should perhaps think about making the vehicle's consumption (in town and on the motorway) parameterisable...

ivanPyrohivskyi commented 1 year ago

Issues in this route:

  1. Rue de l'Hôtel Dieu is closed (motorvehicle=no) "Route fermée durant les travaux, du 30/05/2023 au 07/07/2023 "._
  2. Rue Legraverend has maxspeed=30 and lower highway=secondary than Boulevard de Chézy and Rue de Saint-Malo with maxspeed=50 and highway=primary
  3. Rue Papu has highway=residental that has too big penalty_transition in routing.xml. Minimal value of penalty_transition when OsmAnd routing build route through this way is 113.
vshcherb commented 1 year ago
  1. the main reason