A quick implementation of a Petri net runner in python.
Run with python 2 or 3, for the example coded up in in __main__
, via
python petri_net.py --firings 10 --marking 1 2 3 2
- define Petri nets in terms of their transactions
- define transactions in terms of the actions of their arcs
- define arcs in terms with their action on their in- or outgoing place
- define places as basic containers