Skip to content

Elements

Elements are the core building blocks of HAEO's energy network model. They represent physical devices that produce, consume, store, or route power.

Kinds of element

Elements come in two kinds:

  • Network elements produce, consume, or store power themselves. Connections join them, and each balances its own power and carries tags for tagged power.
  • Flow readers produce and consume nothing. They read the planned flows of other elements to price or constrain them, so they are added once those flows exist.

Each element type has its own page describing its variables, constraints, and costs.

Common characteristics

All elements share these properties:

  • Decision variables: Track power flows at each time step
  • Parameters: Define element behavior (capacities, limits, prices)
  • Constraints: Define operational limits and physical laws
  • Cost contributions: Optional terms added to the objective function
  • Outputs: Provide optimization results for sensors

Elements connect to each other through Connection objects, which handle power transfer between elements.

Constraint and cost aggregation

Each element declares the constraints it requires and any costs it contributes. The network collects these declarations from all elements to form the complete optimization problem:

  • Constraint set: \(\mathcal{C}_e\) for element \(e\)
  • Cost contribution: \(\text{Cost}_e\) for element \(e\)

The network aggregates these into the complete problem (see Model Layer overview).

Parameter updates

Element parameters can be updated between optimization runs without reconstructing the entire network. When a parameter changes (such as an updated forecast or modified capacity), only the constraints that depend on that parameter are rebuilt. This selective rebuilding enables efficient re-optimization when forecasts update frequently.

Design philosophy

Elements are intentionally simple mathematical primitives. Complex device behavior (multi-section batteries, cost incentives, efficiency losses) is achieved by:

  1. Composing multiple elements together
  2. Configuring Connections with appropriate parameters
  3. Mapping user configuration through the Device Layer

This separation keeps the Model Layer focused on optimization mathematics while the Device Layer handles user-facing complexity.

Next steps