-
Notifications
You must be signed in to change notification settings - Fork 100
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
School Escorting #574
School Escorting #574
Conversation
@dhensle I have finished my review. Here are my comments: It might be good to add a check that abm/models/school_escorting.py
abm/models/non_mandatory_scheduling.py
abm/models/non_mandatory_destination.py
abm/models/non_mandatory_tour_frequency.py
|
@JoeJimFlood Thank you for your great comments. I have responded to each in bold below. Can you please review the changes and ensure they are satisfactory? Thanks! It might be good to add a check that abm/models/school_escorting.py
abm/models/non_mandatory_scheduling.py
abm/models/non_mandatory_destination.py
abm/models/non_mandatory_tour_frequency.py
|
@dhensle Everything looks good to me. Thank you so much for your work on this! |
242323665,644477,386761,shopping,1,True,1,24,16,30290458,,,shopping,,12,WALK,2.6242779649960877 | ||
242323669,644477,386761,shopping,1,False,1,16,24,30290458,,,home,,15,WALK,2.1220846081768716 | ||
242323977,644478,386761,school,1,True,1,20,16,30290497,644478,outbound,school,,9,WALK_LOC,1.5478828044209911 | ||
242323981,644478,386761,school,1,False,1,16,20,30290497,644478,inbound,home,,21,WALK_LRF,3.7659908084629183 |
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.
I notice here that there appears to be an inconsistency between trip mode choice of chauffeur and escortee. Trip 242323629 is chauffeur escorting a child home from school, trip 242323981 is the child being escorted. Purpose, destination, schedule all line up as intended. But the chauffeur is driving (SHARED2FREE) while the child is using transit (WALK_LRF). Reviewing the various code changes, it looks like this discrepancy is not a bug in code that has been written, but just something that has not been locked down; I don't recall if this is an intentional or unintentional omission.
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.
Post-processing functionality has been added to force escortee tour and trip modes to match the chauffeur modes. For tour modes, there is ambiguity as the tour mode for the outbound leg can be different for the inbound leg since the pickup/dropoff can happen on different chauffeur tours. (The current implementation just uses the last available chauffeur tour mode. Maybe a mode heirarchy should be implemented? But this would have to change between modeling regions...) I am not sure it really matters considering the trip modes are made to match downstream.
return alts | ||
|
||
|
||
def read_spec_file(file_name, set_index=None): |
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.
It looks like read_alts_file
and read_spec_file
are identical. Shall we use only one?
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.
Yes, only one is needed. And this was actually caught in the flexible trip and tour id's review. Resolved when merging in changes from develop branch.
util_chauf2_time_to_work_or_univ_rs,Chauffer 2 Auto time to work or university - Ride Share,time_mand_to_home2 * ((chauf1 == 3) | (chauf2 == 3) | (chauf3 == 3)),coef_chauf_time_to_work_or_univ_rs | ||
util_chauf1_walk_dist_to_work_or_univ_rs,Chauffer 1 Walk dist to work or university - Ride Share,(dist_mand1_to_home < 3) & ((chauf1 == 1) | (chauf2 == 1) | (chauf3 == 1)),coef_chauf_walk_dist_to_work_or_univ_rs | ||
util_chauf2_walk_dist_to_work_or_univ_rs,Chauffer 2 Walk dist to work or university - Ride Share,(dist_mand2_to_home < 3) & ((chauf1 == 3) | (chauf2 == 3) | (chauf3 == 3)),coef_chauf_walk_dist_to_work_or_univ_rs | ||
util_chauf1_walk_dist_to_work_or_univ_pe,Chauffer 1 Walk dist to work or university - Pure Escort,(dist_home1_to_mand < 3) & ((chauf1 == 2) | (chauf2 == 2) | (chauf3 == 2)),coef_chauf_walk_dist_to_work_or_univ_pe |
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.
There's an error in the escorting spec here. dist_home1_to_mand
isn't a valid variable, it should be dist_home_to_mand1
. And again on the following line for "2". When running in normal simulation mode the error is avoided and our test can pass this module, as the coefficient on this line happens to be set to 0 in the associated coefficients file. But this will cause errors if run in estimation mode or with sharrow enabled, neither of which is currently tested for the school escorting model.
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.
Good catch. Fixed. It looks like the outbound and conditional outbound spec files did not have this error.
School drop-off and pick-up model implementation. Initial design details were presented at the March 8th meeting.