Releases: sergiorbk/petri-net-sim
Release list
Release v1.1.0
A shared place may now be repeated by any number of places, the shared places between a pair of
objects read as one connector, and the delete tool becomes a real eraser. 52 files and about 4100
added lines since v1.0.0. The PNML dialect is unchanged: everything below is expressed with the
same standard reference nodes v1.0.0 already wrote.
Shared places
- One place, many copies. A place used to be shareable with exactly one other. It can now be
repeated by any number of places, and a copy may itself be repeated further, so chains are
allowed as long as they do not close into a loop. - A shared place has a direction. One end is the source, which holds the marking; the others
repeat it. Drawing the link starts at the source, and the document says the same thing: each
copy is written as a reference place pointing at the source, which stays an ordinary place. - Four arrangements are refused, each on its own terms: a place linked to itself; the same
pair linked twice or once each way; a place copying two sources, which would have no answer to
what its marking holds; a chain of links closing into a loop, which the standard forbids for
reference places too. Two places of one object still cannot be linked, since the object would
be repeating itself. - Two places belonging to no object may now be linked. The old check refused them for a
reason that did not apply to them. Such a link has no structural form, so it is left out of the
exported document and out of the simulation, and the app now says so rather than dropping it in
silence.
Notation
A shared place used to be drawn as a dashed line with an open arrowhead, which is the notation
for a dependency and reads as a special kind of arc. Nothing flows along a shared place: the copy
simply repeats the source.
- The tie is now dash-dot, with a filled node on the source end and no arrowhead at either end.
- With one source repeated by several copies the nodes coincide, so a fan reads as one origin
rather than as several unrelated links. - A place taking part in a link is drawn with a grey interior, in either role. Once the two are
one instance, the source's marking is no more its own than the copy's.
Connectors
All the shared places between one pair of objects are one connector.
- Selecting one strand lights the whole connector in two colours: the strand you clicked in the
accent, the rest held back. - A connector can be separated in one command, from the link's context menu or from the
inspector, and it takes one undo step. The command appears only when there is more than one
strand.
Simulation
- A step lights the shared place it passes through: both circles pulse, as before, and now the
tie between them lights with them. It is the only thing on the canvas that explains why a token
appeared in a place no arc leads to.
The eraser
The delete tool removed whatever you clicked exactly on, in canvas units, which shrink on screen
as the view zooms out; at half zoom an arc was a pixel and a half to aim at.
- It now reaches six screen pixels past the pointer, at any zoom.
- It gained a sweep: drag a band and everything it catches goes in one undo step. Places and
transitions are caught by their centre, arcs by crossing the band at all. - A Petri-object goes whole, its frame and the net inside it, without a confirmation. Undo covers
it.
Opened documents
A file written by hand, by another tool, or by an older build could declare links this editor
would never have allowed. Those links are now dropped, each reported as a warning naming both
ends and the reason, and the document still opens. The same rules are enforced on the server, so
an API or MCP caller building a model one link at a time is refused the same arrangements rather
than producing a document that turns out wrong later.
Compatibility with PetriObjModelPaint
Checked in both directions on real files rather than by reasoning, and pinned by tests:
- A document written by PetriObjModelPaint 2.3.0, holding two fans of four copies and a group of
objects, opens here with no warnings. Groups are an editing-time construct this app does not
implement, and skipping that block yields exactly the same model. - A document written here for the same model was read by PetriObjModelPaint's own parser as five
objects and eight shared places, two sources with four copies each, with nothing dropped.
Documents now carry version 1.1.0 in their tool-specific block. Readers that do not know this
tool ignore it, as before.
Also in this release
- A one-line Docker command in the README, community health files, CODEOWNERS, and CODEX.md
pointing at AGENTS.md.
Verified
- Frontend: 474 tests, typecheck clean. Backend: 2296 passed, 30 skipped.
- Composed exports are validated against the real ISO/IEC 15909-2 RELAX NG grammar, including a
fan, not just a single link. - Tests that fail against the previous implementation on purpose: the fan, the cycle on import,
the arrowhead-free notation, the arc pair routing, the eraser geometry.
Release v1.0.0
An editor, a simulator and a natural-language generator for Petri nets and Petri-object models, in one place. Describe a production line or a queueing system in plain language and an agent builds the net; edit it on a canvas, run stochastic simulations, read the charts, export the numbers.
Built for researchers who study systems by simulating them, and for students learning Petri nets and system modelling.
Try it
Nothing to clone, the image comes down on its own:
docker run -d --name petri-net-sim -p 6204:8000 \
-e APP_PUBLIC_URL=http://localhost:6204 \
-v petri-net-sim-data:/data \
ghcr.io/sergiorbk/petri-net-sim-local:v1.0.0Or from a checkout of this repository:
docker compose -f docker-compose.allinone.yml pull
docker compose -f docker-compose.allinone.yml up -dEither way, open http://localhost:6204. One container with the UI, the API and PostgreSQL inside, no signup, nothing to configure. Auth and encryption secrets are generated on first start and kept in the volume, so restarts keep your work. The app is BYOK: add your own LLM key in Settings, and nothing reaches a provider until you do.
What is in it
- Editor. Places, transitions, arcs, weights, priorities and timing on a canvas, with exponential, deterministic, normal and uniform delays.
- Simulator. Stochastic runs in the browser or on a remote engine. Watch the animation, step one firing at a time, or jump straight to the final state.
- Statistics. Tokens per place and buffers per transition plotted against the simulation clock, with a summary table, and export as CSV for Excel or PowerBI and as PNG or SVG for a paper.
- Petri-objects. A model composed of several named nets linked by shared places, so a large system stays a set of small readable ones.
- MCP server and an OpenAI-compatible HTTP API, both authenticated with API keys you issue yourself, each switchable off per account.
- ISO/IEC 15909-2 conformant PNML, validated against the standard's own RELAX NG grammar, and read by PetriObjModelPaint, TINA and CPN Tools.
Image
ghcr.io/sergiorbk/petri-net-sim-local:v1.0.0, linux/amd64.
The name says -local because the image defaults to AUTH_MODE=single_user: no login at all, everyone who reaches the port is the same account. That is right for one person running it for themselves and wrong for anything else, so set AUTH_MODE=multi and APP_ENV=prod before it faces a network, and supply AUTH_JWT_SECRET_KEY and CREDENTIALS_MASTER_KEY explicitly, since a deployed environment refuses to generate them.
Running it on a different port? Point APP_PUBLIC_URL at that port too, or the download links the app generates will point at the wrong one.
Documentation
Running · Configuration · Deployment · Simulation · Connecting other tools · Petri-objects
License
Source-available under the PolyForm Noncommercial License 1.0.0. Free for any noncommercial purpose; commercial use needs a separate license from the author.
@sergiorbk