DistributionSystem is the network model for distribution-level connectivity
and analysis. It owns buses, feeders, lines and other branches, loads,
distributed energy resources, voltage sources, and distribution time series.
It is the right starting point when the question is about how power flows
through a feeder or network, rather than how equipment is arranged inside a
station.
from gdm.systems.distribution import DistributionSystem
system = DistributionSystem(name="north-feeder")Distribution components reference one another through typed bus, feeder, and
substation fields. A DistributionSubstation groups distribution components;
it is not the detailed station model. For station buses, bays, switching
equipment, protection, or SCADA, use SubstationSystem.
Working With Distribution Models¶
Import and export: load and persist supported distribution data.
Connectivity graphs: inspect network connectivity and traverse buses and branches.
Time series: attach and query time-series data.
Network reduction: create reduced distribution models for analysis.
Distribution component API: browse buses, feeders, branches, loads, transformers, DER, and other component types.
When aggregating loads, solar systems, batteries, capacitors, or generators, out-of-service
components are logged and excluded. An aggregate call with no in-service
components raises ValueError; reducers skip such aggregates instead.
Capacitor aggregation retains the installed capacity and bank states of the
included capacitors. Generator aggregates sum power, ratings, and reactive
limits, and require matching phases, operating controls, voltage ratings,
connections, and machine parameters. Reducers keep incompatible generators in
separate aggregates. Generator time-series aggregation is unsupported;
aggregation during primary or three-phase reduction raises an error when time
series are requested. This does not filter out-of-service network branches
from the reducers’ connectivity graphs.
reduce_to_minimal_system_with_sw omits time series by default. Pass
agg_time_series=True to retain the selected time_series_type and aggregate
load and solar profiles through primary, switch-boundary, and optional series
reduction. agg_timeseries is an alias that overrides agg_time_series when
provided. Aggregation requires matching profile names and features (apart from
use_actual) and compatible timestamps; multiplier profiles are converted to
actual values. Unsupported or mismatched profiles raise an error instead of
being discarded when their components must be removed. Profiled branches and
other protected components remain boundaries during series reduction.
Set retain_out_of_service=True to keep out-of-service components individually,
along with their original buses and connecting paths, instead of including them
in active aggregates. This can retain additional secondary buses, transformers,
and disconnected islands. Their selected time series are retained when
agg_time_series=True. The default is False.
The primary, three-phase, radial, trivial-node, and minimal reducers remove unreferenced distribution equipment from their results automatically. To clean another system explicitly, create a cleaned copy with:
from gdm.hashing_utils import remove_unreferenced_equipment
cleaned = remove_unreferenced_equipment(reduced_system)The original system is unchanged. Equipment referenced by retained components, including shared and nested equipment, is kept. Supplemental attributes and time series attached exclusively to removed equipment are omitted; those on retained components are copied.
When a station contains several feeder boundaries, a larger distribution model
can be filtered to the matching outfeeds with
DistributionSystem.get_substation_feeder_subsystem(). To connect those
feeders back to the station, see Connecting Systems.