Analyze sensitivity
lca_analyze_sensitivityQuantify which inputs drive a system's result, and by how much. Target: a saved assessment via assessment_ref (a<N>). Composed (bill-of-materials) systems are analysed exactly and instantly; engine-backed tornado uses one cached contribution solve, and engine sweep/scenarios re-solve openLCA param:<name> parameters. Every result states its nature, source and limits. Modes: tornado ranks each variable's ±variation_pct swing; sweep walks one variable over [range_min, range_max] (reference_ref/threshold give a break-even); scenarios compares named overrides (id → multiplier, 1.0 = baseline). Variable ids come from a default tornado run, or a unique name fragment is resolved server-side (an ambiguous or unmatched one returns the valid ids). member:<slug> = composed member; driver:<slug> = engine driver; param:<name> = engine parameter (sweepable); system:amount scales a whole composed system. Returns a durable v<N>, separate from the a<N> it analyses.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | Analysis type. | tornado |
| steps | No | Sweep: number of points. | |
| category | No | Impact category to analyse. Defaults to the method's first. | |
| variable | No | Sweep: the single variable to walk — a composed `member:<slug>` id (analytic), an engine `param:<name>` id (openLCA dataset parameter — re-solves the model, deferred), a unique name fragment (resolved server-side), or `system:amount` (scale the whole system: service-life / replacement-count). An engine `driver:<slug>` is NOT sweepable (tornado only) — use `param:<name>` instead. Unresolvable → 422 with the valid list. | |
| range_max | No | Sweep: upper multiplier. | |
| range_min | No | Sweep: lower multiplier. | |
| scenarios | No | Scenarios: named override sets vs the same baseline, e.g. [{name: 'worst case', overrides: {'member:steel': 1.5}}]. Keys are composed `member:<slug>` / `system:amount` ids (analytic) OR, for an engine target, engine `param:<name>` ids (re-solves the model, deferred) — name fragments resolve server-side either way, but a scenario set may not MIX driver/member and param keys. An unresolvable key 422s. | |
| threshold | No | Sweep: break-even vs a fixed value. Mutually exclusive with `reference_ref`. | |
| variables | No | Variables to rank: composed `member:<slug>` ids, engine `driver:<slug>` ids, OR unique name fragments (resolved server-side; a default tornado's rows list every id). Naming ONLY engine `param:<name>` knobs instead re-solves the model under those parameters (deferred) rather than ranking drivers — mixing `driver:`/`param:` ids in one call 422s. Omit for all (composed members, or the E1 driver tornado). `system:amount` is NOT valid here (use sweep/scenarios). | |
| workspace | Yes | Name of the workspace to work in, as `lca_get(kind='workspaces')` lists it (backticks optional). Named on every call: several conversations can share one connection, and each names its own workspace. The connection's default is often an empty sandbox rather than the user's work. | |
| reference_ref | No | Sweep: break-even vs another assessment's total (`a<N>`). Mutually exclusive with `threshold`. | |
| variation_pct | No | Tornado: perturb each variable by ±this percent. | |
| assessment_ref | Yes | Saved-assessment ref in the form `a<N>` (e.g. `a3`) — study the setup this composed assessment captured. List current assessments with `lca_get(kind='assessments')` — never pass UUIDs. |