pypsa.SubNetwork.iterate_components#
- SubNetwork.iterate_components(components: Collection[str] | None = None, skip_empty: bool = True) Iterator[Component] #
Iterate over components of the sub-network and extract corresponding data.
- Parameters:
components (list-like, optional) – List of components (‘Generator’, ‘Line’, etc.) to iterate over, by default None
skip_empty (bool, optional) – Whether to skip a components with no assigned assets, by default True
- Yields:
Component – Container for component data. See Component class for details.