urbansim
urbansim copied to clipboard
Transition model: households can end up with zero records in the persons table
https://github.com/UDST/urbansim/blob/0db75668ada0005352b7c7e0a405265f78ccadd7/urbansim/models/transition.py#L451 If households are contained in both objects, "added" and "removed", the fact that we first remove households before creating new persons causes those households to end up with no records in the object "new_rows" below and therefore no records in the updated persons table.
Here is our fix which separates the removal of rows (table_new) and the creation of new persons.