Turn any operational model into a what-if machine. Describe a system as a Petri net — staffing, queues, equipment, patience — store it with one POST, and every model gets the same instruments: seeded scenario comparison, disruption injection, synthetic event-log datasets, and one-click publishing into your own Google Sheets with live charts.
Every number comes from a discrete engine that enforces the model — resource holds, thresholds, capacities, non-accelerating queues — and says plainly what it could not enforce. Same seed, same answer, byte for byte.
Fetching /api/catalog.
A model is a stored data item, not a deployment. POST a Petri-net JSON and the id that comes back — the content hash, stable forever — carries the whole API. Nothing to register, no routes to code.
# store a model
curl -X POST https://sim.pflow.xyz/api/models \
-H 'Content-Type: application/json' -d @model.json
# → {"id":"…","url":"/api/models/…"}
# ask it a hypothetical (pure read, seeded)
curl -X POST https://sim.pflow.xyz/api/models/$ID/scenario \
-d '{"hours":8,"realizations":16,"seed":7,
"marking":{"staff":3}}'
Every model answers the same six endpoints:
GET /api/models/$ID the model
GET /api/models/$ID/rates declared knobs
POST /api/models/$ID/scenario one hypothetical
POST /api/models/$ID/scenario/compare
seeded side-by-side
GET /api/models/$ID/dataset synthetic event log
(?seed=&cases=&format=csv|jsonl)
POST /api/models/$ID/publish → your Google Sheets