sim.pflow.xyz

Build a model Help

Show me
the math.

Cost-benefit analysis for anything you can describe as a flow. Describe the decision — to your own AI assistant, or right here in the browser — and get back a real model: seeded, repeatable, checked knob by knob, instead of a confident guess.

The diagnostics pass doesn't just simulate — it ranks every knob by measured influence, so "add more capacity" gets checked instead of assumed. It has found capacity that hurts the objective as often as capacity that helps: a café's pantry stock, a hospital's ED bays, a software team's engineering headcount.

Operational decisions

Staffing, equipment, inventory — the classic what-if: how many baristas, vans, or ED bays actually move the outcome.

cafe: pantry stock is inert, staffing isn't

Software decisions

What to build next is a cost-benefit question too: a backlog gated by evaluation, capacity-constrained engineering, telemetry that validates or kills.

feature-lab: more engineers can hurt the objective

Diagnose finds what helps

Every model gets the same automated knob-ranking pass — no bespoke code, no guessing. It checks "add more" instead of assuming it.

ward-flow: 2 more ED bays don't move the needle

Not sure where to start? Ask something like…

Hand any of these to your AI assistant once it's connected below, or describe your own in the browser — no Petri-net vocabulary required, the model gets built from the conversation.

Should I hire a babysitter three days a week, or is daycare actually cheaper once you count sick days? Is a second car worth it, or would ride-share cover the gap for less? We're a two-person shop — does bringing on a contractor actually pay for itself? My team's feature backlog is gated by review — does hiring another engineer help, or just add noise?

Connect an MCP client

Point any MCP-capable AI assistant at the hosted server — no install, no API key to copy. Public tools (sim_list_models, sim_get_model, sim_scenario, sim_diagnose, sim_dataset, sim_verify, …) work signed out; creating, licensing, calibrating or publishing a model opens PFlow OAuth 2.1 with PKCE the first time you use one.

Then just describe the decision: "My team's feature backlog is gated by cost-benefit review — tell me whether adding engineers actually helps."

Or point any client that takes JSON config at the hosted server:

{
  "mcpServers": {
    "sim": {
      "type": "http",
      "url": "https://sim.pflow.xyz/mcp"
    }
  }
}

Streamable HTTP, OAuth 2.1 with dynamic client registration — full tool list and the guide at /llms.txt and /llms-full.txt.

Bring your own model

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

How it works

Petri nets, honestly enforced. Places hold tokens, transitions fire, and the engine honors what most simulators quietly relax: read arcs gate without consuming, inhibitors block above thresholds, capacities bound post-firing, and a queue is a prerequisite — never an accelerant.
Seeded stochastic comparison. Scenarios in one comparison share one seed, enforced server-side — so the difference you see is the staffing, not the dice. Contended-time accounting names what the run actually waited on, classified structurally.
Datasets that survive mining. The synthetic event logs replay cleanly against their own generating net, and process-mining them recovers the rates the model declared — data, not decoration.
Sheets as a first-class surface. A published spreadsheet carries the model itself, the scenario trajectory, contention analysis, native charts — and, for models honest to solve in cells, a live formula tab you can re-solve by editing a rate.

Browse the model catalog

Every model built so far, including the ones behind the examples above. Most people get here by asking their assistant a question, not by browsing — this is for exploring what other decisions have already been modeled, or poking at the raw Petri net behind one.

Loading…

Fetching /api/catalog.