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
22 stars 13 forks source link

Reason for failed routing query (status) with pyTransition not included in the response #1043

Open adolmajian opened 3 weeks ago

adolmajian commented 3 weeks ago

In the case that there are no routes found when using the get_routing_result method in pyTransition, the reason for the failure is not indicated anywhere in the response. In the Transition GUI, when doing batch calculations, a reason (status) is always included :

success TRROUTING_NO_ROUTING_NO_SERVICE_FROM_ORIGIN TRROUTING_NO_ROUTING_FOUND TRROUTING_NO_ROUTING_NO_ACCESS_AT_ORIGIN TRROUTING_NOT_ROUTING_NO_ACCESS_AT_DESTINATION TRROUTING_NOT_ROUTING_NO_ACCESS_AT_ORIGIN_AND_DESTINATION etc.

adolmajian commented 2 weeks ago

@tahini can you please confirm if that is really the case or if I' missing something? In the event that the failure information is not included in the response, is it an easy fix? Thank you.

tahini commented 2 weeks ago

@adolmajian It is indeed the case that it does not return a reason why there are no results. That is no hard to fix, we just need to update the public API to add this information, then the pyTransition function to process it.

adolmajian commented 2 weeks ago

OK. This is a very important aspect for me because much of the advantage of having an API was to control the inputs that are otherwise constant to a whole CSV file with the batch run in the GUI. For example, setting departure or arrival time per query and not per file, controling the maximum travel more dynamically, etc.

As a backup option, If there are actual column names to use in the CSV file to control each input/parameter instead of the form on the app GUI, please let me know.