Multinet

A MultiNet serves as ‘container’ for different pandapipes & pandapower nets and coupling controllers. More precisely, it is an dictionary with attribute properties (ADict).

Usually, a multinet is a multi energy net with one net per energy carrier.

Create Function

An empty multinet is created with this function:

create_empty_multinet(name='')

This function initializes the multinet datastructure.

Parameters:

name (string, default None) – Name for the multi net

Returns:

MultiNet with empty tables

Return type:

MultiNet

Example:
>>> mn = create_empty_multinet("my_first_multinet")

An existing pandapipes gas net or pandapower net can be added with this function:

add_net_to_multinet(multinet, net, net_name='power', overwrite=False)

Add a pandapipes or pandapower net to the multinet structure.

Parameters:
  • multinet (pandapipes.MultiNet) – multinet to which a pandapipes/pandapower net will be added

  • net (pandapowerNet or pandapipesNet) – pandapipes or pandapower net that will be added to the multinet

  • net_name (str) – unique name for the added net, e.g. ‘power’, ‘gas’, or ‘power_net1’

  • overwrite (bool) – whether a net should be overwritten if it has the same net_name

Returns:

net reference is added inplace to the multinet (in multinet[‘nets’])

Return type:

None

The nets are stored with a unique key in a dictionary in multinet[‘nets’]. It is also possible to add multiple nets in a single step to the multinet:

add_nets_to_multinet(multinet, overwrite=False, **networks)

Add multiple nets to a multinet. ‘networks’ is one or more keyword arguments with nets.

Parameters:
  • multinet (pandapipes.MultiNet) – multinet to which several pandapipes/pandapower nets are added

  • overwrite (bool) – whether a net should be overwritten if it has the same net_name

  • networks (kwarg (name=net)) – one or more keyword arguments with pandapipes/pandapower nets as values. The keyword of each net will be set in multinet.nets as the name for the network in the respective argument.

Returns:

nets are added to multinet

Return type:

None

Example:
>>> mn = create_empty_multinet()
>>> add_net_to_multinet(mn, net, "first_net_in_multinet")
>>> add_nets_to_multinet(mn, ("power_net1", net1), ("power_net2", net2), ("gas_net", net3)