/gspn-lib

Python API to create generalized stochastic Petri nets (GSPNs). It allows to capture multi-robot problems as a GSPN and simulate the model.

Primary LanguagePython

GSPN LIB

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.

Installation

To install the gspn_lib run in this folder the following command:
pip install -e .

Getting Started

Please check the examples folder to understand how to use the lib.