User Guide
Petrinaut is a visual editor for Petri nets.
It lets you build, configure, and simulate Petri nets. It has support for various extensions including typed tokens (colours), continuous dynamics, and stochastic transitions.
Live siteCopy link to this section
Petrinaut is available at demo.petrinaut.org.
The live site saves nets in your browser's local storage. Export and import nets as YAML or JSON files to move them between devices and browsers.
ConceptsCopy link to this section
A quick map of the things you'll encounter:
- Net -- the document you're editing: places, transitions, arcs, types, parameters, differential equations.
- Scenario -- a saved, named configuration for running the net (initial markings, scenario parameters, parameter overrides). Optional.
- Metric -- a built-in or user-authored function over simulation state that returns a number to plot on the Timeline.
- Experiment -- a Monte Carlo batch: many independent simulation runs of the current net, optionally against one scenario, aggregated as distributions over time.
- Parameter sweep -- an experiment over intervals of scenario parameters, whose sliders the in-browser optimizer can drive to maximize or minimize one metric.
Petrinaut has three global modes in the top bar, though Actual is only enabled when the host application provides a live execution source:
- Edit -- Canvas and Definitions views for editing the same net, plus single-run simulation playback on Canvas.
- Simulate -- a separate management surface for scenarios and experiments.
- Actual -- a read-only view of an execution supplied by the host application.
ContentsCopy link to this section
- Drawing a Net -- Top bar, Canvas and Definitions views, sidebars, adding nodes and connecting arcs, selection, keyboard shortcuts, import/export, auto-layout.
- Petri Net Extensions -- Types, dynamics, transition kernels, firing rules, read/inhibitor arcs, as well as parameters and state visualizers.
- Useful Patterns -- Common modelling techniques, including duration and resource pools.
- Simulation -- Set initial state, run a single simulation, use the timeline, control playback.
- Scenarios -- Save and switch between named simulation configurations.
- Ad-hoc Scenarios -- The scenario form: define initial state and parameters inline for one run, or save them as a scenario.
- Experiments -- Run Monte Carlo batches and inspect token-count distributions over time.
- Simulation Panels -- Open scenarios and experiments beside the main view, expand to fullscreen, and use links and browser history.
- Actual Mode -- View a live or completed Petri net execution supplied by the host application.
- Embedded Preview -- Explore a compact, read-only Petri net embedded in a host application.
- AI Assistant -- Build, review, and revise nets with text or inline Voice mode.
- Code Editor -- Edit model functions and expand their sections within the Properties Panel.
- User Settings -- Open preferences from any workspace tab and configure General, Viewport, Plugins, and Labs.
- Compilation Output -- Inspect how your net's code compiled, and what stops it running on the GPU.
- Examples -- Walkthrough of the built-in example nets.