WST-AGGR
Waste Generation Aggregation
1. Identity
Depends on module:
Purpose
Aggregates waste generated into canonical totals and structured breakdowns aligned with ESRS E5.
This engine is the anchor for all Waste KPIs (intensity, hazardous share, diversion rate, YoY deltas).
It focuses strictly on waste generated, not treatment outcomes (recycling, disposal), which are handled downstream.
Typical usage
- Total waste generated (tonnes)
- Waste by type (hazardous / non-hazardous)
- Waste by category (if provided)
- Input to intensity and share engines
2. Contract References (ZAR)
2.1 Input Schema
ZAR Address: schema.compute.waste.generated.inputs.v1_0_0
Required conceptual fields:
waste_items: list of waste generation recordsalignment:BY_YEAR|BY_INDEX(defaultBY_YEAR)
Each waste_item conceptually includes:
period(typically year)valueunit(e.g.kg,tonne)hazard_class:HAZARDOUS|NON_HAZARDOUS- optional:
ewc_code(EWC code or internal taxonomy)site_idprocess_idis_estimate(boolean)regulatory_ref(e.g. EWC / Basel reference)
2.2 Options Schema
ZAR Address: schema.compute.waste.generated.options.v1_0_0
Common options:
unit_output: defaulttonnehazard_normalization:STRICT|LENIENT(defaultSTRICT)unknown_hazard_policy:ERROR|ASSIGN_NON_HAZARDOUS|ASSIGN_UNKNOWN(defaultERROR)negative_values_policy:ERROR|ALLOW_WITH_FLAGmissing_policy:ERROR|SKIProunding: optional digits
2.3 Output Schema
ZAR Address: schema.compute.waste.generated.output.v1_0_0
Outputs include:
- optional
metadata(unit conversions, hazard handling, completeness)
3. Accepted Input Shapes
A. Flat waste item list (preferred)
{
"waste_items": [
{ "period": 2025, "value": 1200, "unit": "tonne", "hazard_class": "NON_HAZARDOUS" },
{ "period": 2025, "value": 85, "unit": "tonne", "hazard_class": "HAZARDOUS" }
],
"alignment": "BY_YEAR"
}
B. Mixed units
{
"waste_items": [
{ "period": 2025, "value": 850000, "unit": "kg", "hazard_class": "NON_HAZARDOUS" },
{ "period": 2025, "value": 12000, "unit": "kg", "hazard_class": "HAZARDOUS" }
]
}
C. With waste categories (EWC-style)
{
"waste_items": [
{ "period": 2025, "value": 500, "unit": "tonne", "hazard_class": "NON_HAZARDOUS", "ewc_code": "17 01 07" },
{ "period": 2025, "value": 40, "unit": "tonne", "hazard_class": "HAZARDOUS", "ewc_code": "13 02 05*" }
]
}
All supported shapes MUST be normalized internally to:
Map<period, { hazardous_t, non_hazardous_t }> (+ optional category dimension)
4. Hazard Classification Rules (Normative)
4.1 Canonical hazard classes
Input MUST normalize to:
HAZARDOUSNON_HAZARDOUS
If hazard_normalization = STRICT:
- missing or unknown
hazard_classMUST error
If LENIENT:
- unknown handled per
unknown_hazard_policy
4.2 Unknown hazard handling
ERROR: failASSIGN_NON_HAZARDOUS: assign to non-hazardous (discouraged for audit-grade)ASSIGN_UNKNOWN: retain but exclude from totals (v1 discouraged)
Metadata MUST record:
- unknown hazard count
- any assignments performed
5. Compute Semantics (Normative)
Let be waste generated of hazard class at time (after unit normalization).
5.1. Waste by hazard class
5.2. Total waste generated
5.3. Optional category breakdown
If ewc_code is provided:
Where are items with category in period .
6. Completeness & Coverage Metadata (Normative)
This engine MUST compute a structural completeness measure:
- : hazard classes present
Metadata MUST include:
hazard_classes_presentcoverage_ratiounknown_hazard_countnegative_value_count(if allowed)
7. Validation & Error Model
Invariants
- Values must be finite
- Units must be convertible to unit_output
- Negative values rejected unless explicitly allowed
- Hazard class must resolve under policy
Error codes (suggested)
WASTE_AGGR_INVALID_HAZARD_CLASSWASTE_AGGR_UNIT_CONVERSION_FAILEDWASTE_AGGR_NEGATIVE_VALUEWASTE_AGGR_NON_FINITE_VALUEWASTE_AGGR_ALIGNMENT_MISMATCH
Errors MUST include:
- engine
cmi_short_code - hazard class and period context
8. Dependencies
MEID_CALC_WASTE_AGGR depends on:
- schema resolver (ZAR)
- unit conversion capability (delegated)
- canonical hazard classification reference (EWC / regulatory)
Declared via ZAR dependencies.
9. Federation & Audit Requirements
To reproduce waste aggregation externally, the export MUST include:
- engine identity (
cmiorzar_code) - engine build proof (
execution_ref+build_hash) - input/options/output schemas used
- raw waste items
- hazard normalization policy
- unit conversion reference/version used
Provenance chain MUST show:
… → MEID_CALC_WASTE_AGGR → …
with cmi_short_code recorded in USO tail arrays.
10. Performance Notes
- Complexity:
- Memory:
- Suitable for batch reporting and KPI analytics
11. Methods Served (v1)
Waste.generated.absWaste.generated.by_hazard.absWaste.generated.by_category.absWaste.generated.total.abs