Python toolbox to design and simulate Generalized Stochastic Petri Nets (GSPN) through an easy-to-use API. It provides methods to:
- add and remove places, transitions, arcs, and tokens;
- check which transitions are enabled and fire enabled transitions;
- merge multiple Petri nets into a single one;
- draw the designed GSPN model;
- create a GSPN with transitions that are viewed as actions, enabling the use of decision-making algorithms;
- convert such GSPN model into the equivalent Markov Decision Process (MDP);
- obtain the optimal policy with value iteration for the equivalent MDP.
To install the gspn_lib run in this folder the following command:
pip install -e .
Please check the examples folder to understand how to use the lib.