activitysim icon indicating copy to clipboard operation
activitysim copied to clipboard

Add global option to skip households in simulation when failed

Open i-am-sijia opened this issue 1 year ago • 0 comments
trafficstars

Is your feature request related to a problem? Please describe.

In production runs, sometimes ActivitySim crashes because one or two choosers cannot make a choice in the simulation. The common error message when this happens is e.g., no choice is available.

As a user of ActivitySim, agency X would like to have the option to skip households if they fail in any components, without crashing the entire ActivitySim run. This is extremely useful in production runs, especially when the agency is under time crunch to get RTP runs done and does not have time / resource to find out why the simulation fails for just a handful of households.

See original comment by @i-am-sijia https://github.com/ActivitySim/activitysim/pull/821#issuecomment-1992029253

Describe the solution you'd like

This is implemented in CT-RAMP2 models (perhaps also in DaySim?) - When a household is failing in the simulation, skip it and exclude it in the subsequent components and exclude it in the output. Keep a list of such households that failed and write them out in the end, give the user a warning in the end with the number of households that failed. If it's just a small number of households, then it's probably an edge case and user can choose to ignore them and trust the model result. But if it's a large number of households that failed, then it suggests bigger issues like inputs error or specification error, then user can investigate.

This solution allows the model run to complete, at the same time gives user information on the scale of potential issues behind the scene.

Describe alternatives you've considered

A clear and concise description of any alternative solutions or features you've considered.

Additional context

Add any other context or screenshots about the feature request here.

i-am-sijia avatar Sep 26 '24 21:09 i-am-sijia