ActivitySim / activitysim

An Open Platform for Activity-Based Travel Modeling
https://activitysim.github.io
BSD 3-Clause "New" or "Revised" License
189 stars 96 forks source link

Merging accessibilities onto person_merged table #853

Open dhensle opened 2 months ago

dhensle commented 2 months ago

Is your feature request related to a problem? Please describe. The auto_ownership model passes in the persons_merged table in the auto_ownership_simulate() call even though the person_merged table is not actually used in the code.

The reason why this is included is because it causes the persons_merged function to be called here which joins the disaggregate accessibility columns that get used in the model preprocessor. Generally this wouldn't be needed, but is in this case because auto_ownership is the first actual model run after reading in the households and persons data.

This is a pretty sneaky way for the data to get merged in and should probably be more explicit in the code.

Describe the solution you'd like To have persons_merged contain the disaggregate_accessibility values when it gets called in the preprocessor without having to include the table call in the main workflow.step function.

Additional context This arose in the context of #834 PR review.