You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For example, new households have been added to the households table as a result of relocation/transition. Those households go through hlcm and now have new building_ids. The columns that are added to the household table in variables_households.py do not get updated automatically. It seems like the clear_cached method on the table takes care of this. We probably want to clear the entire cache at the end of each simulation year to make sure that tables/columns/variables get updated. Also, sometimes this needs to happen within a simulation year so that the correct data is used for a subsequent step, such as wplcm.
The text was updated successfully, but these errors were encountered:
Unfortunately, unlike opus, orca does not have a variable dependency tree that would be automatically updated depending on the specific change. One possibility is to set the cache argument to False, in which case that variable would be always recomputed. But that increases the run time.
If using the clear_cached method, I would even run it after each model (or group of related models). Maybe it would be worth thinking if it should be a responsibility of the model to cleanup after itself. E.g. each model could get a logical argument, say cleanup, and if it is True, it would call the clear_cached method.
Yes- without knowing the dependency tree, it's hard to know which tables need to be updated. Plus, since additional dependencies could happen to support other models, it's impossible to know about dependencies that are not currently in place. So, the entire cache may have to be cleared often, which may mean its better to turn caching off. I'll add orca.clear_cached() to all models that change at least one table for now.
For example, new households have been added to the households table as a result of relocation/transition. Those households go through hlcm and now have new building_ids. The columns that are added to the household table in variables_households.py do not get updated automatically. It seems like the clear_cached method on the table takes care of this. We probably want to clear the entire cache at the end of each simulation year to make sure that tables/columns/variables get updated. Also, sometimes this needs to happen within a simulation year so that the correct data is used for a subsequent step, such as wplcm.
The text was updated successfully, but these errors were encountered: