Connections¶
Connections model power flow paths between elements. They define how power moves through the network and apply constraints, efficiency losses, and costs through ordered segments.
Connection composition¶
HAEO uses a single Connection class that composes segment building blocks. Connections define an ordered segment chain that transforms power as it moves between elements.
Composition rules:
- Segment configuration is an ordered mapping; keys become segment names.
- The segment chain is linked by equality constraints between adjacent segments.
- Segment outputs are grouped under the
segmentsoutput using the configured names. - A passthrough segment is created when no segments are provided.
classDiagram
Connection *-- Segment
Segment <|-- EfficiencySegment
Segment <|-- PowerLimitSegment
Segment <|-- PricingSegment
Segment <|-- SocPricingSegment
Segment <|-- PassthroughSegment
Connection type¶
Connection: Composable bidirectional connection with ordered segments. Use segments to apply limits, efficiency losses, pricing, or SOC penalties.
Segment types¶
- SOC pricing segment applies SOC penalty costs.
- Efficiency segment applies direction-specific efficiency multipliers.
- Power limit segment enforces directional limits and time-slice coupling.
- Pricing segment adds directional cost terms to the objective.
- Passthrough segment provides lossless flow with no constraints.
Common interface¶
All connection types provide these properties for node power balance calculations:
| Property | Description |
|---|---|
source |
Name of the source element |
target |
Name of the target element |
power_into_source |
Effective power flowing into source element |
power_into_target |
Effective power flowing into target element |
The power_into_* properties include efficiency losses from the segment chain.
Elements do not need to account for segment details directly.
Design philosophy¶
Connections are kept separate from elements to enable flexible network topologies:
- Elements define what they do (store energy, generate power, consume power).
- Connections define how elements interact (limits, efficiency, cost).
This separation allows the same element types to be connected in different ways depending on the physical system being modeled.
Next Steps¶
-
Connection model
Segment-based connection formulation.
-
Segments
Segment catalog and formulations.
-
Elements
Battery and Node model elements.