Open stefancoe opened 6 years ago
Currently we break connections to jobs for those workers for which the new distance to work (max within household) is larger than the previous distance. It's deterministic.
The variable should be similar to the avg_network_distance_from_home_to_work, taking maximum instead of average. That one though is an interaction variable with a set of possible location zone, whereas here we just need a household variable with one location zone per household.
Or, if it's easier, we could skip the maximum over households and simply disconnect workers with larger network_distance_from_home_to_work after moving.
@hanase The code for this starts on line 67 of models.py
This can be closed once reviewed.
@stefancoe It looks good. Few comments:
Otherwise it's very nice - thanks Stefan!
Thanks @hanase . Yeah, I have been meaning to go back and make any usage of .to_frame() more selective in the columns that are included in the resulting dataframe. I'll make an issue about it.
In our current urbansim implementation, I believe this happens probabilistically using the distance the household moves. Re-implement for urbansim2.