Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scenario-added routes are always trams #465

Closed
abyrd opened this issue Nov 20, 2018 · 1 comment
Closed

Scenario-added routes are always trams #465

abyrd opened this issue Nov 20, 2018 · 1 comment
Assignees
Labels

Comments

@abyrd
Copy link
Member

abyrd commented Nov 20, 2018

When enabling or disabling transit modes in an analysis, all routes added by scenarios are treated as trams.

There is no UI element to set the mode of a newly added route, but when an AddTrips object is initialized, its mode = Route.BUS. Applying this modification to the network does not copy the mode info into the new instance of com.conveyal.r5.transit.RouteInfo, which is where the router looks for it. So the field com.conveyal.r5.transit.RouteInfo#route_type remains uninitialized at 0, which in GTFS means "tram".

@abyrd abyrd added the bug label Nov 20, 2018
@abyrd abyrd self-assigned this Nov 20, 2018
abyrd added a commit that referenced this issue Nov 21, 2018
The mode of travel for added trips (routes) still can't be set in the UI, but this change at least copies over the default value (bus) from the AddTrips modification class.
This has been confirmed to work - when bus is deselected in the UI, added routes are not considered.
It should suffice to include a mode property in the modification JSON.
@ansoncfit
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants