Skip to main content

cwright run

cwright run <model> [--replications N] [--out FILE] [--store DIR] [--flow DIR]

Runs the model for N independent replications, determines one common warm-up truncation across all of them (see Experiments), and produces a full results document — every KPI as a confidence interval, plus the manifest needed to reproduce the run. See The results document for the exact shape.

Flags​

FlagDefaultMeaning
--replications N10Number of independent replications. Must be at least 2 — a single run cannot bound anything, and run refuses to proceed with fewer.
--out FILEstdoutWhere to write the result document.
--store DIR—Record the run in a run catalogue at DIR (see ls), and reuse a previously recorded result for the same model hash and replication count instead of re-running it.
--flow DIR—Also write one Parquet flow-record file per replication: DIR/r0.parquet, DIR/r1.parquet, and so on. See The results document for the schema.

Caching via --store​

When --store is given, run checks the catalogue before simulating anything: if this exact model (by content hash) has already been run at this exact replication count, the recorded result is read back and returned instead of repeating the work — printed as a note on stderr so it is visible that no new simulation happened. This is what makes a search loop that revisits the same candidate cheap rather than merely fast.

Example​

cwright run model.yaml --replications 20 --store runs --flow flow

writes the result document to stdout, records it under runs/, and leaves 20 Parquet files under flow/ — one per replication — ready to be read with trace or opened directly with pandas, Polars, or DuckDB.