pypsa.Network.merge

Contents

pypsa.Network.merge#

Network.merge(other, components_to_skip=None, inplace=False, with_time=True)#

Merge the components of two networks.

Requires disjunct sets of component indices and, if time-dependent data is merged, identical snapshots and snapshot weightings.

If a component in other does not have values for attributes present in network, default values are set.

If a component in other has attributes which are not present in network these attributes are ignored.

Parameters:
  • network (pypsa.Network) – Network to add to.

  • other (pypsa.Network) – Network to add from.

  • components_to_skip (list-like, default None) – List of names of components which are not to be merged e.g. “Bus”

  • inplace (bool, default False) – If True, merge into network in-place, otherwise a copy is made.

  • with_time (bool, default True) – If False, only static data is merged.

Returns:

receiving_n – Merged network, or None if inplace=True

Return type:

pypsa.Network