Compare assessments
lca_compare_assessmentsSave a comparison across 2–8 saved assessments. Each target is an a<N> ref (listable with lca_get(kind='assessments')); every lca_run_assessment call already saves one, so there is no separate save step. Two preconditions are enforced (400): all targets share one LCIA method, and all are one product at one amount unless function states the function they all deliver. Differences in allocation, database or provider linking are not refused; they are returned as equivalence warnings alongside the result. The comparison is saved into the workspace named by workspace and returned as primary_ref (c<N>), which holds the full matrix. The matrix does not rank the targets; it reports each impact category separately. nw_set adds the targets' stored single scores for that set beside the matrix; every target must already carry it (lca_apply_nw_set). The assessment_interpretation skill (load_skill) documents comparison discipline.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| nw_set | No | Compare by the single score of this normalization/weighting set (its name, or a unique part of it); every target must carry it, see `lca_apply_nw_set`. A target missing it, or carrying a different copy, is refused with what to do. Omit for the characterized matrix only. | |
| targets | Yes | Saved-assessment refs to compare, e.g. ['a1', 'a2']. Must have ≥2 items. | |
| function | No | The function every target delivers, quantified — e.g. 'packaging for 1 L of beverage'. Needed when the targets are not the same product at the same amount: take it from the user's stated goal, or ask them. Saved with the comparison and shown wherever it is read. | |
| 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. |