Closed maxhoerstr closed 4 years ago
There's several problems and bugs actually.
fire()
expects a Substitution
object as its argument, because no arc as actually variables on it, object Value(1)
is not used during the firing and fire
works happily.Value(1)
to the marking of a place: Value
is for an arc annotation and is not supposed to be a token. Just use add(1)
to add integer 1
to the place. Even if there would be no bug in fire()
the transition would be enabled because Value(1)
is not 1
and the inhibitor arc refuses the latter.fire()
should not work indeed because the transition is not enabled, and indeed using net.transition("transition").modes()
returns an empty list: no mode is available for this transition. So I need to perform additional checks in fire()
to fix this bug.Thank you very much for your quick response. Can you estimate how long it would take to fix the bug?
Fixed in 13f8c40. ;)
Can you also publish it to pypi? ;-) This would be also really nice! Merci!
Yep, that's done.
I have a simple test scenario with 2 places and a transition. The first place is connected with the transition over an inhibitor arc. If I add a token to the first place and try to fire the transition it fires. It also fires if nothing is there which is what it should do. I cant figure out though why the transition fires when there is a token in place.
Here is the example code:
Is this the expected behavior and if so what can i do to realize a net that don't fire if a token is in a place.
Thanks in advance