Skip to content

Segments

Segments are the building blocks that define connection behavior. Each connection composes an ordered segment chain to apply limits, efficiency losses, pricing, or internal balancing.

Composing connections

Connection composition follows a few rules:

  • Segments are provided as an ordered mapping in the connection configuration.
  • Mapping keys become segment names and appear under the segments output.
  • If no segments are provided, a passthrough segment is created automatically.
  • Adjacent segments are linked by equality constraints on their in/out flows.
  • Segments receive references to the source and target elements for context.

This pattern keeps the connection model simple while making behavior explicit and reusable.

Segment types

Next steps