sim_create_model
Store a Petri-net model and return its content id and url, plus warnings (omitted when there are none) for a model that stores but probably does not say what was meant: transitions with no rate, which simulations run at the engine default of 1 per hour (each stage of a staged one, in a run without a schedule); a net in which nothing can fire at its declared initial marking; a guard no simulation enforces; an inhibitor arc drawn transition -> place; a pool (staff, machines) one transition takes and gives back in the same firing beside the work it serves, which is never busy, so its headcount multiplies that rate (or, through a "kinetic": false arc, changes nothing) instead of capping work in progress; a pool a transition only reads, through a read arc beside the work it takes, declared above the read arc's weight (staff at 2 read by serve beside queue), which is never taken and stays out of the rate, so every count above the weight runs exactly as the weight does (at the weight, such as an open sign at 1, it is a gate and draws no warning). At most 10 of each per-element warning are listed, the rest counted. The model is JSON with name, places, transitions and arcs; rates are per hour. Read resource sim://docs/authoring once for a worked example and the fields a simulation reads. Refused, with every reason at once: a key the schema does not define, named by its path with the key it most likely meant (unknown field places[0].intial (did you mean "initial"?)) or, when none is close, to be removed, a key repeated across elements written once (arcs[0..6].source); a value of the wrong kind, by its path and the kind wanted (the first one only, and the structure is checked once every value has the right kind); and otherwise every structural defect, leaving out the ones a misspelt key caused. At most 20 of each are listed, the rest counted. Models are immutable; a changed model is a new id. Costs 1 compute token (the account's bucket when signed in, the client address's otherwise); the model JSON is at most 262144 bytes.
Signed in with write scope, the model is yours (mine: true): it appears only in your own listing until you dedicate it to the commons with sim_license_model, and you can remove it with sim_delete_model. An identical model stored before this call keeps the envelope it has, so the reply is then mine: false with a note saying whose it is: another account's, the catalog's, or nobody's (created without sign-in). Without sign-in it is stored unowned, for good (mine: false, and a note saying so): reachable by id, listed for nobody, and nobody can delete, license or supersede it — creating the identical model signed in later returns the same id, still unowned. To own a model, sign in before creating it; a changed model (a new name is enough) is a new id. A call whose token has expired or lacks write scope is asked to sign in, not stored unowned. Anyone you give the id to can use the model either way.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | Yes | the model JSON: name, places, transitions, arcs (sim://docs/authoring has the fields and a worked example) |