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

Please add simple-petri-net #1542

Closed
phoe opened this issue Jul 29, 2018 · 6 comments
Closed

Please add simple-petri-net #1542

phoe opened this issue Jul 29, 2018 · 6 comments

Comments

@phoe
Copy link

phoe commented Jul 29, 2018

simple-petri-net is a library for simulating Petri nets in Common Lisp.

https://gitlab.com/porky11/simple-petri-net

@Harleqin
Copy link

Harleqin commented Aug 12, 2018

The README there states that it is not maintained anymore, but superseded by something called "simple-petri-net". Should the latter be added instead, maybe?

Edit: this comment is obsolete due to its intent having been incorporated into the original post, but it is necessary to understand the next.

@phoe
Copy link
Author

phoe commented Aug 12, 2018

Correct. I will edit the main post.

https://gitlab.com/porky11/simple-petri-net

@phoe phoe changed the title Please add petri-net Please add simple-petri-net Aug 12, 2018
@quicklisp
Copy link
Owner

I can't build it due to the reference to the ql package in net.lisp. I think that use could be replaced by a reference to ASDF functions instead and I would be able to make progress.

@quicklisp
Copy link
Owner

This can't be added until the issue with the use of the QL package is resolved.

@phoe
Copy link
Author

phoe commented Nov 21, 2019

@porky11
Copy link

porky11 commented Aug 30, 2021

@phoe I started to hate this library. It's not simple, but overly complicated, messy and buggy.
It works as expected for the most common cases, but some more difficult cases don't work at all.
I even made a fundamental logic mistake: add-parallel only takes two arguments.
And besides that, there are some unnecessary utilities, which I would nowadays probably pack into a separate library.

The "simple petri net" is also not really there to generate petri nets.
You don't specify any places. You only specify how the transitions relate to each other using a different logic and the program tries to convert that logic into petri nets. But that doesn't work because petri nets are not suited to represent that logic. That logic is more powerful, and might lead to some weird cases which feel like quantum entanglement. The conversion to perti nets is not allowed, when such cases might occur. It's only converted to perti nets to avoid such cases and allowing simulition.

Some time ago I created a new petri net simulator in C, which should be pretty efficient and only has the core features, so if you want it in common lisp, it might be a good idea to use FFI. I also wrote a few tools in rust for working with real petri nets.
And recently started rewriting the logic used for the simple-petri-net package, because as stated in the documentation of simple-petri-net, my logic has benefits over real petri nets, even if I have to convert it into petri nets and disallow some cases to simulate it.
I'm calling my logic flow net now. The language and the basic logic of parallel and alternative paths is now less related than before.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants