This is the implementation of petri net for our assignment.
Visit here to get our code in github.
This assignment is separated into 6 files:
- net.py contains all neccessary implementation classes to visualize the simple petri net.
- asm1b_i.py constructs the Specialist petri net
s_netand visualize desired transition system. - asm1b_ii.py uses
s_netfrom asm1b_i.py to tackle the problem. - asm2.py constructs the Patient petri net
p_net. - asm3.py merges
s_netandp_netinto the superimposed (merge) petri netm_net - asm4.py uses
m_netand find reachable marking by firing one transition once.
Some packages are required for some actions:
- Visualize the petri net: graphviz
- Install pydot, pydotplus, pydot, pydot-ng:
pip install pydot,pip install pydotplus,pip install pydot-ng. - Access this link and download the latest 32-bit Windows install package.
- Add
C:\Program Files (x86)\Graphviz\binto user environment path. Click here to know more about it. - Add
C:\Program Files (x86)\Graphviz\bin\dot.exeto system environment path. - Install graphviz:
pip install graphviz. Restart computer to be enabled to use.
- Install pydot, pydotplus, pydot, pydot-ng:
- Organizing graphical files and folders: os, shutil
- Install os:
pip install os - Install shutil:
pip install shutil
- Install os: