a-b-street / a-b-street/abstreet

The path in TripPhase is sometimes a lie

Ouverte
#361 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
Rust
Étoiles
8.2k
Forks
380
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

`Analytics` records the `PathRequest` of each phase of the trip. Later, the UI calls `get_trip_phases` and draws the path returned. This method calls `map.pathfind` to recalculate the path. This works sometimes, but in many cases, it's wrong:

- The static case: Say the player edited the map and forced a reroute in the "after" case. Both the "before" and "after" route will be identical (just the "after").
- The dynamic case: Say congestion caps (#325) are in effect. The route shown for "after" will always totally ignore caps, since it just calls `map.pathfind`.

For the static case, we could use the original map without edits (assuming it has no dynamic caps) to get the correct route. How do we get at the original map?
- Should we store in memory the original CHs? (What if the map doesn't use CHs at all?)
- Should we store in memory the entire original map?
- Should we undo the edits temporarily? Likely slow, since that has to recalculate the CH.

For the dynamic case... do we have to store the entire path? Maybe compressed somehow, maybe just for capped trips, maybe just in memory and not serialized?

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.