Petri Net Simulator
Explore a finite-capacity place/transition net with weighted arcs. Token markings enable or block firings, and a breadth-first search shows reachable markings and no-enabled-transition states. A state cap keeps exploration responsive and is never mistaken for exhaustive proof.
Key features
- Validate places, transitions, bipartite weighted arcs, initial tokens and each place capacity
- Fire one enabled transition or a jointly enabled pair; undo and reset the live marking
- Draw the current token marking and arc weights as a local SVG without external graph services
- Explore the interleaving reachability graph with an explicit state and edge ceiling
- Report deadlock markings with shortest firing paths and distinguish incomplete searches
- Check exact per-transition token delta and whether total token count is conserved
- Export normalized project JSON, reachability report, state CSV and current-marking SVG
How to use
- Load the two-branch example, a local JSON file or a version 1 project in the editor.
- Apply the project, then click an enabled transition to change the live marking.
- Choose a jointly enabled pair to fire both with aggregate token consumption and output capacity checks.
- Set a state limit and run breadth-first reachability analysis from the initial marking.
- Inspect no-enabled-transition states, shortest firing paths, conservation, and whether exploration was complete.
- Download the project, report, state CSV or current SVG diagram.
Use cases
- Reveal resource conflicts caused by two jobs choosing the same branch
- Check whether a synchronization join can be reached
- Compare a concurrent pair with individual transition firings
- Teach token conservation and how capacity bounds state explosion
Frequently asked questions
What makes a transition enabled?
Its input arcs must have enough tokens, and after all input tokens are consumed and output tokens are produced no place may exceed its declared capacity. Arc weights are positive integers. A pair is jointly enabled only when aggregate input and final capacities both pass.
Is a no-enabled-transition state always a defect?
No. A finished workflow may intentionally have no enabled transition. The report lists every such reachable marking as a deadlock candidate; you decide whether it is expected completion or an unwanted stall.
Does the reachability report include simultaneous steps?
Reachability explores one transition per edge (interleaving semantics). The live controls can fire a pair simultaneously. A capacity-constrained simultaneous step can sometimes reach a marking that no serial order reaches, so the report is not a proof about all step-semantic executions.
What happens when the search hits a limit?
The tool records whether the state or edge ceiling was hit. Found deadlocks remain valid witnesses, but an absence of deadlocks and unseen transitions is not a global conclusion when search is truncated. All places have finite declared capacities.
How is token conservation checked?
For each transition, total output arc weight minus total input arc weight is calculated. If every delta is zero, total tokens are conserved by any firing. This is a structural total-token test, not a full place-invariant or liveness proof.
Is the project sent to a server?
No. JSON parsing, simulation, diagrams and downloads run in the current browser tab. No external layout engine, account or automatic storage is used.
Privacy
Projects are processed in the current browser tab without automatic upload or storage. Exported JSON contains the model you entered.
Comments & questions