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

Finite State Machine Support #46

Open
TJ-Adams opened this issue Oct 15, 2022 · 3 comments
Open

Finite State Machine Support #46

TJ-Adams opened this issue Oct 15, 2022 · 3 comments
Labels
enhancement New feature or request

Comments

@TJ-Adams
Copy link

Want to first say I love the project. I came across a scenario where I wanted to add a finite state machine and realized there wasn't support for it. I don't know if this is something of interest but just wanted to bring it up.

@ArthurSonzogni
Copy link
Owner

Hello!

Yes, adding support for state machine was one of the original goal. There are two tools:

The first only support directed acyclic graph.
The scond only support planar graph.

None of them is the ultimate solution. Graph drawing is a difficult question.

Please let me know if none of the tools above solved your issue.

@TJ-Adams
Copy link
Author

Hey,

The tools mentioned above come close but are not quite what I was thinking. One thing that I find very helpful for FSMs are the ability to show which input led to that state.

If I wanted to make a state machine for a stoplight I'd type something like:

green -> yellow
yellow -> red
red -> green

Using the planar graph support that would yield me:
image

Which is very close to what I want, but I'd like to specify the inputs leading to the state by doing something like:

green -> yellow : 50 seconds
yellow -> red: 8 seconds
red -> green: 32 seconds

and then get this:
image

You can ignore the syntax on the second example, I was just giving a random example. What do you think of that?

@ArthurSonzogni
Copy link
Owner

Yes, that would be awesome ;-)
Difficult to make, though.

@ArthurSonzogni ArthurSonzogni added the enhancement New feature or request label Oct 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants