Hierarchy
polars_ts.energy_agents.hierarchy
Grid hierarchy for energy/demand forecasting agents.
Represents the region -> grid -> household topology and exposes it in the
child -> parent tree form consumed by :func:polars_ts.reconciliation.reconcile.
GridHierarchy
Three-level energy grid topology: region -> grids -> households.
Parameters
region
Name of the top-level region node.
structure
Mapping grid_name -> [household_name, ...].
grids
property
Grid (mid-level) node names.
households
property
Household (bottom-level) node names.
all_nodes()
All node names, ordered region -> grids -> households.
tree()
Return the child -> parent mapping for reconciliation.
The top (region) node is intentionally omitted, matching the tree form
expected by :func:polars_ts.reconciliation.reconcile.
children(node)
Direct children of node (empty for households).