Documentation for developers using Petrinaut
Petrinaut is a suite of open-source Petri net simulation, visualization, and editing tools, developed by HASH and open-sourced at petrinaut.org.
The name Petrinaut refers to the entire collection of Petri net tools. This includes the Petri net simulation engine and visualizer, as well as the surrounding editing tools (bundled into an all-in-one modeling environment, available to download or use online at demo.petrinaut.org).
Petri nets provide a mathematical (and graphical) modeling framework for describing, analyzing and simulating systems with concurrent, parallel, or distributed processes. This allows us to visualize complex, dynamic systems (such as traditionally difficult-to-model real-world supply chains, agentic workflows, and even things like chemical reactions) in a relatively simple way.
Petri nets are directed, bipartite graphs (meaning they consist of two types of nodes: places and transitions). They consist of four main elements:
A transition exists in either an "enabled" or "disabled" state, and can only be enabled (allowed to occur) when all of its input places contain the required number of tokens. When a transition "fires," it consumes (removes) the tokens from its input places and creates new tokens in its output places, effectively changing the state of the system.
In contrast to classical finite state machines, Petri nets support concurrency, allowing multiple events to occur simultaneously.
These developer-facing docs cover:
For an overview of the project, visit petrinaut.org — or head to Setting up Petrinaut to dive right in.