Skip to content

Commit

Permalink
Fixes an issue caused by cached variables in models.
Browse files Browse the repository at this point in the history
  • Loading branch information
cuihantao committed Oct 25, 2021
1 parent 4e53eb3 commit e8465ce
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions andes/system.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit e8465ce

Please sign in to comment.