Closed danielsclint closed 4 years ago
fixed this in develop by adding chunking by chunk_id, and updated tests to catch such errors in the future by forcing singleton full model run test to use minimal chunk size.
This is provisional code as the multiple_zone branch has more extensive changes to chunking (adaptive chunking).
@danielsclint to now test
I see the new method in chunk to chunk by chunk id, but I don't see any changes to the joint tour participation code in develop. As this be merged with the main repo or in some other working version of develop?
Oops! Sorry! It helps to push - which I just did.
In the joint tour participation model, its possible for the chunker to split potential joint tour participants from the same household across two different chunks. This will create an endless loop and eventual assertion error in the joint tour participation model.
https://github.com/ActivitySim/activitysim/blob/7b57c94e12d27a23f86c8988117e885ae754c44e/activitysim/core/chunk.py#L217-L229
If a household is split, so only one person is chosen in the chunk, the following code will never evaluate to true, because
x.participants > 1
will always evaluate toFalse
. Or...x.participants > x.adults
will always evaluate toFalse
.https://github.com/ActivitySim/activitysim/blob/7b57c94e12d27a23f86c8988117e885ae754c44e/activitysim/abm/models/joint_tour_participation.py#L86-L87
Eventually, the mode will crash in the following set of code after the maximum number of iterations for finding participants occurs.
https://github.com/ActivitySim/activitysim/blob/7b57c94e12d27a23f86c8988117e885ae754c44e/activitysim/abm/models/joint_tour_participation.py#L158-L165