From 916328799d353e2a4bb0ac6fc60a24f44ebdadf1 Mon Sep 17 00:00:00 2001 From: "marvin.steinke" Date: Sun, 22 Sep 2024 11:46:03 +0200 Subject: [PATCH 1/3] finalize actors --- vessim/cosim.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vessim/cosim.py b/vessim/cosim.py index c0765fa..d6d7131 100644 --- a/vessim/cosim.py +++ b/vessim/cosim.py @@ -102,6 +102,8 @@ def finalize(self): """ for controller in self.controllers: controller.finalize() + for actor in self.actors: + actor.finalize() class Environment: From cbe079bbe4f3b8d48c247b29cabe23feba892e91 Mon Sep 17 00:00:00 2001 From: "marvin.steinke" Date: Sun, 22 Sep 2024 11:55:16 +0200 Subject: [PATCH 2/3] added finalize to signal Actor --- vessim/actor.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/vessim/actor.py b/vessim/actor.py index c489aac..0180d94 100644 --- a/vessim/actor.py +++ b/vessim/actor.py @@ -49,6 +49,9 @@ def state(self, now: datetime) -> dict: "p": self.p(now), } + def finalize(self) -> None: + self.signal.finalize() + class ComputingSystem(ActorBase): """Model of the computing system. From 50dc2f7f6f5e430a1d452714a60a6bec05cc548c Mon Sep 17 00:00:00 2001 From: "marvin.steinke" Date: Sun, 22 Sep 2024 11:56:41 +0200 Subject: [PATCH 3/3] added finalize to ComputingSystem --- vessim/actor.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/vessim/actor.py b/vessim/actor.py index 0180d94..475976a 100644 --- a/vessim/actor.py +++ b/vessim/actor.py @@ -92,6 +92,10 @@ def state(self, now: datetime) -> dict: "nodes": {signal.name: -signal.now(at=now) for signal in self.nodes}, } + def finalize(self) -> None: + for node in self.nodes: + node.finalize() + class _ActorSim(mosaik_api_v3.Simulator): META = {