diff --git a/andes/system.py b/andes/system.py index 8a9510440..96d44b3a8 100644 --- a/andes/system.py +++ b/andes/system.py @@ -710,6 +710,12 @@ def store_adder_setter(self, models): if not mdl.n: continue + # Fixes an issue if the cache was manually built but stale + # after assigning addresses for simulation + # Assigning memory will affect the cache of `v_adders` and `e_adders`. + + mdl.cache.refresh() + # ``getters` that retrieve variable values from DAE for var in mdl.cache.v_getters.values(): self._getters[var.v_code].append(var)