-
Notifications
You must be signed in to change notification settings - Fork 9
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
PT headways #102
PT headways #102
Conversation
# Conflicts: # genet/schedule_elements.py # tests/test_core_components_route.py # tests/test_core_components_service.py # tests/test_core_schedule.py
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clarification question.
Does this implement a given headway across the entire day uniformly? I can imagine this having unintended consequences, for example, creating services early in the morning or late at night that we may not want. Does this make that configurable?
@@ -598,6 +610,16 @@ def routes(self): | |||
yield self | |||
|
|||
def route_trips_with_stops_to_dataframe(self, gtfs_day='19700101'): | |||
""" | |||
This method exists for backwards compatibility only |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice
The headway specification is a dictionary in this format: {('01:00:00', '02:00:00'): 20,
('02:00:00', '03:00:00'): 30} the spec requires you to specify the temporal bound, you can have various headways across the day. And then of course for a uniform headway in a day you can just specify {('00:00:00', '23:59:59'): 20} I updated my PR description with this, pretty big omission on my part, soz |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent, understood now. 🚀
MATSim requires explicit trips with vehicles for all PT Services. Sometimes we only know the headway in a time bracket for a service, this PR adds a few new convenience methods to:
pandas.DataFrame
[ref]pandas.DataFrame
[ref]This will help with generating PT scenarios.
The headway specification is a dictionary in this format:
(time_from, time_to): headway in minutes
, e.g.Will come out with these trips:
This can be more complicated with only some trips being injected among an existing set of trips to try and match a headway, but we propose this simple addition to current functionality for the time being.