chairemobilite / transition

Transition is a modern new approach to transit planning. It's a web application to model, simulate and plan public transit and alternative transportation.
http://transition.city
MIT License
23 stars 13 forks source link

Path edit: map matching: reduce matching radius for far away nodes to increase routing performance #524

Open kaligrafy opened 1 year ago

kaligrafy commented 1 year ago

Map matching performance is becoming really slow, especially for long paths. We should reduce the radius around nodes for already selected nodes while keeping a certain number of previously selected nodes with the correct radius. Example: if there are 10 nodes in the path, keep the default or customized radius for the last 5 selected nodes, but reduce the radius of the last 5 to almost 0. It should not change paths too much and anyway, the user can drag a waypoint to force a detour or a specific route segment. This needs some testing to find the best compromise. We could also make this a preference (keep node routing radius for x last selected nodes). In fact, if the user inserts a node at the beginning or in the middle, we should keep the routing radius unchanged for x nodes before and after the new selected node.

tahini commented 1 year ago

To be investigated: I tested locally and on a server, with new paths going through the city of montreal and it's not so bad with 40+ nodes. Nodes typically have a radius of 50m. What is your default radius?

kaligrafy commented 1 year ago

Also 50

kaligrafy commented 1 year ago

But if possible, it should be almost instantaneous

tahini commented 1 year ago

I could argue that 2 seconds is "almost instantaneous"... :p

kaligrafy commented 1 year ago

I mean instantaneous like snappy. No wait at all! :-)

kaligrafy commented 1 year ago

We should also reduce the default 50m to something larger. In an ideal world, we should just check the intersections size and complexity with OpenStreetMap and enlarge the radius automatically accordingly.