Skip to content

Commit

Permalink
always finalize microgrid
Browse files Browse the repository at this point in the history
  • Loading branch information
marvin-steinke committed Sep 30, 2024
1 parent 7eee494 commit e152877
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions vessim/cosim.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,9 @@ def run(
disable_rt_warnings(behind_threshold)
try:
self.world.run(until=until, rt_factor=rt_factor, print_progress=print_progress)
except Exception:
finally:
for microgrid in self.microgrids:
microgrid.finalize()
raise


class _GridSim(mosaik_api_v3.Simulator):
Expand Down

0 comments on commit e152877

Please sign in to comment.