Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it normal to have a bunch of warnings of "event doesn't exist" for parallel machines (with disjoint event sets)? #657

Closed
enjoysmath opened this issue Apr 25, 2024 · 2 comments

Comments

@enjoysmath
Copy link

Hi,

In the parallel example of transitions-gui, if you send model.event_on_A() and only model/machine A has the event, but the two machines are running in parallel, then a warning will be issued that B doesn't have any events from its current node that match "event_on_A". So just wondering if that is normal state of affairs, and I simply set logging level to ERROR-only.

I was unable to host the parallel machines on separate threads myself because of always getting that an event loop doesn't exist on my created thread, and was unable to SO-fix it. So the parallel + nested is the way to go for modeling the "whole system" or at least those parts we want expressed in FSM form. Therefore, the whole event queue internal of the Machine is shared among all the parallel processes.

Thanks.

EnjoysMath

@aleneum
Copy link
Member

aleneum commented Apr 25, 2024

Hello @enjoysmath,

could you provide an MRE for your use case? As of now, if a state or transition includes a callback it is expected that all models that may enter that state also feature that callback. Defining def on_enter_<state> on one model is basically the same as calling <state>.add_callback("on_enter_<state>") directly.

I do see the value to resolve this dynamically for each model though but for now I'd say i'd suggest to work with protocols or such a like to make sure that all models implement the same callbacks.

@aleneum
Copy link
Member

aleneum commented Jun 10, 2024

I am closing this since there hasn't been new feedback in (almost) 2 weeks. Feel free to comment if you still face this issue. I will reopen this issue if a bug or feature request emerges.

@aleneum aleneum closed this as completed Jun 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants