Suspending "agents" from a reactor bank...? #1842
-
For reactor banks, the input/output cardinality must match. This means (... "is my understanding" ...) that all bank reactors are triggered and must check the presence of their specific (indexed) input. In an application (... which is more of a simulation nature rather than an embedded system ...) I want to use a reactor bank as an agent pool with a bank size equal to the maximum number of simultaneous agents active at any given time. Is there a runtime mechanism that could be used to put agents temporarily to sleep? (I do however anticipate that such an async-like feature may not be compatible with LF's synchronous paradigm ...) |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
It is not entirely clear what you are trying to achieve here. First, reactions are only triggered if inputs are present, so one option is to simply not send events to the reactors that you want to be suspended. This simply moves the logic managing which reactors are suspended to the sender (or an intermediate gateway reactor). That logic needs to be somewhere. If instead you are interested in federated execution, where federates are processes that may or may not be running, then @ChadliaJerad is working on a mechanism that supports such "transient federates." It is quite tricky to manage the joining and departing of such transient federates, but she is making great progress. |
Beta Was this translation helpful? Give feedback.
-
No, this is a misunderstanding of the semantics. A reactor with no present inputs is not triggered, regardless of whether it is in a bank. |
Beta Was this translation helpful? Give feedback.
No, this is a misunderstanding of the semantics. A reactor with no present inputs is not triggered, regardless of whether it is in a bank.