The Python toolbox petritub allows to manipulate untimed Petri nets and provides max-plus and min-plus algebra tools for the study of timed event graphs.

For example, the library provides functions for performing the following tasks:

  • Drawing the coverability tree for a given Petri net

  • Computing the maximally permissive state-based controller, given a set of specifications

  • Finding the cycle time of a timed event graph and solving the related eigenproblem

  • Drawing the trajectory of a timed event graph as a Gantt chart


The toolbox is continuously developed at the Control Systems Group of the Technical University Berlin. The first version of the code was designed in the summer semester of 2022 by Jan Bednar, Jan Clevorn, Jakub Dvorak, Dominik Tirpak, under the supervision of Davide Zorzenon, as part of the course “Projekt Synthese und Analyse von Regelsystemen”. External contributions are highly welcome, for contact write to Davide Zorzenon.