Skip to content
Documentation navigation +
implemented

Compare conditional resource costs

Use this guide after running a synthetic world. You need a repository checkout with uv; run commands from its root.

The example prices completed navigator contacts, using an illustrative USD cost per contact. The rate is a synthetic assumption, not a published wage or evidence of savings. Counts exclude unfinished contacts; they do not represent total staff time. The example does not estimate demand, revenue or a payment mechanism.

Run the example

uv run alive world validate fixtures/worlds/rural-clinic-economics.json
uv run alive run --world fixtures/worlds/rural-clinic-economics.json --output /tmp/alive-economics.zip

Read evaluation/operational-economics.json in the ZIP. It contains low/base/high rate cases, costs for each variant, paired treatment-minus-baseline cost differences and simulation intervals.

uv run python - <<'PY'
import json
import zipfile
with zipfile.ZipFile('/tmp/alive-economics.zip') as archive:
    result = json.loads(archive.read('evaluation/operational-economics.json'))[0]
print(result['currency'], result['horizon_days'], result['scenario']['rate']['provenance'])
for point in result['sensitivity']:
    print(point['case'], point['rate_usd_per_event'], point['total_costs'][0]['mean'])
PY
USD 90.0 synthetic_assumption
low 10.0 None
base 15.0 None
high 25.0 None

Totals are undefined because integration, maintenance and Alive run costs are unknown. Supply explicit inputs, including an explicit zero when justified, to calculate totals. Credits are not USD and are never converted automatically.

Change an assumption

Copy the fixture and change cost_scenarios[0].rate.value from 15 to 20, keeping it within low and high. Update the source pointer and note to describe your assumption. Run the copy: base resource costs change by a factor of 20 / 15; the event trace digests stay the same. There is no extrapolation beyond the simulated population or run horizon.

In the app choose Rural clinic cost scenario in the world builder. The advanced JSON editor accepts rate and additional cost inputs. Validate, save, estimate and approve the run as usual. The run page displays rates, provenance, source pointers, arithmetic, sensitivity, cost comparisons and unknown additional costs. The API exposes the same operational_economics array at GET /v1/runs/{run_id}/results; existing run authentication and project access rules apply. This arithmetic calls no AI provider and adds no separately metered operation.

Limits and errors

Only registered alive.metric.count metrics can be priced in this version. Ratios, averages, queue delays and utilization cannot be multiplied by a per-event rate. Invalid metric references, missing variants, negative/nonfinite rates, unsupported units and unordered sensitivity ranges fail WorldSpec validation (WORLD_INVALID over the API). Partial runs carry status: partial and use only matching completed replication IDs for comparisons.

Rate sensitivity is an assumption range. Student-t intervals reflect simulation noise with a fixed rate, and do not include uncertainty in rates or model validity. A lower modeled resource cost is not a realized saving, clinical benefit or evidence that the buyer receives the value. Source pointers record supplied provenance; Alive does not independently verify cost inputs.

See the operational economics reference for all fields and business questions for the concept path.