Skip to content

NetworkComponentsMixin ¶

NetworkComponentsMixin()

Mixin class for network components methods.

Class inherits to pypsa.Network. All attributes and methods can be used within any Network instance.

Methods:

  • df –

    Alias for n.static.

  • static –

    Return the DataFrame of static components for component_name.

  • pnl –

    Alias for n.dynamic.

  • dynamic –

    Return the dictionary of DataFrames of varying components.

Attributes:

pypsa.Network.components property ¶

components: ComponentsStore

Network components store.

Access all components of the network via n.components.<component>.

Examples:

>>> n.components
PyPSA Components Store
======================
- 9 'Bus' Components
- 6 'Carrier' Components
...

Access a single component:

>>> n.components.generators
'Generator' Components
----------------------
Attached to PyPSA Network 'AC-DC-Meshed'
Components: 6

Which is the same reference when accessing the component directly:

>>> n.generators
                                bus control  ... weight    p_nom_opt
name                                 ...
Manchester Wind  Manchester   Slack  ...    1.0  4090.809778
Manchester Gas   Manchester      PQ  ...    1.0    -0.000000
Norway Wind          Norway      PQ  ...    1.0  1533.599858
Norway Gas           Norway      PQ  ...    1.0    -0.000000
Frankfurt Wind    Frankfurt   Slack  ...    1.0  1667.724420
Frankfurt Gas     Frankfurt      PQ  ...    1.0   982.034483

[6 rows x 38 columns]
>>> n.generators is n.components.generators.static
True

Returns:

  • ComponentsStore –

pypsa.Network.c property ¶

c: ComponentsStore

Network components store.

Access all components of the network via n.c.<component>. Alias for n.components.

Returns:

  • ComponentsStore –

pypsa.Network.sub_networks property writable ¶

sub_networks: Any

Access to static data of pypsa.components.SubNetworks.

pypsa.Network.buses property writable ¶

buses: Any

Access to static data of pypsa.components.Buses.

pypsa.Network.carriers property writable ¶

carriers: Any

Access to static data of pypsa.components.Carriers.

pypsa.Network.global_constraints property writable ¶

global_constraints: Any

Access to static data of pypsa.components.GlobalConstraints.

pypsa.Network.lines property writable ¶

lines: Any

Access to static data of pypsa.components.Lines.

pypsa.Network.line_types property writable ¶

line_types: Any

Access to static data of pypsa.components.LineTypes.

pypsa.Network.transformers property writable ¶

transformers: Any

Access to static data of pypsa.components.Transformers.

pypsa.Network.transformer_types property writable ¶

transformer_types: Any

Access to static data of pypsa.components.TransformerTypes.

links: Any

Access to static data of pypsa.components.Links.

pypsa.Network.loads property writable ¶

loads: Any

Access to static data of pypsa.components.Loads.

pypsa.Network.generators property writable ¶

generators: Any

Access to static data of pypsa.components.Generators.

pypsa.Network.storage_units property writable ¶

storage_units: Any

Access to static data of pypsa.components.StorageUnits.

pypsa.Network.stores property writable ¶

stores: Any

Access to static data of pypsa.components.Stores.

pypsa.Network.shunt_impedances property writable ¶

shunt_impedances: Any

Access to static data of pypsa.components.ShuntImpedances.

pypsa.Network.shapes property writable ¶

shapes: Any

Access to static data of pypsa.components.Shapes.

pypsa.Network.sub_networks_t property writable ¶

sub_networks_t: Dict

Access to dynamic data of pypsa.components.SubNetworks.

pypsa.Network.buses_t property writable ¶

buses_t: Dict

Access to dynamic data of pypsa.components.Buses.

pypsa.Network.carriers_t property writable ¶

carriers_t: Dict

Access to dynamic data of pypsa.components.Carriers.

pypsa.Network.global_constraints_t property writable ¶

global_constraints_t: Dict

Access to dynamic data of pypsa.components.GlobalConstraints.

pypsa.Network.lines_t property writable ¶

lines_t: Dict

Access to dynamic data of pypsa.components.Lines.

pypsa.Network.line_types_t property writable ¶

line_types_t: Dict

Access to dynamic data of pypsa.components.LineTypes.

pypsa.Network.transformers_t property writable ¶

transformers_t: Dict

Access to dynamic data of pypsa.components.Transformers.

pypsa.Network.transformer_types_t property writable ¶

transformer_types_t: Dict

Access to dynamic data of pypsa.components.TransformerTypes.

links_t: Dict

Access to dynamic data of pypsa.components.Links.

pypsa.Network.loads_t property writable ¶

loads_t: Dict

Access to dynamic data of pypsa.components.Loads.

pypsa.Network.generators_t property writable ¶

generators_t: Dict

Access to dynamic data of pypsa.components.Generators.

pypsa.Network.storage_units_t property writable ¶

storage_units_t: Dict

Access to dynamic data of pypsa.components.StorageUnits.

pypsa.Network.stores_t property writable ¶

stores_t: Dict

Access to dynamic data of pypsa.components.Stores.

pypsa.Network.shunt_impedances_t property writable ¶

shunt_impedances_t: Dict

Access to dynamic data of pypsa.components.ShuntImpedances.

pypsa.Network.shapes_t property writable ¶

shapes_t: Dict

Access to dynamic data of pypsa.components.Shapes.

pypsa.Network.controllable_branch_components property ¶

controllable_branch_components: set[str]

Controllable branch components of the network as set of strings.

Examples:

>>> sorted(n.controllable_branch_components)
['Link']

pypsa.Network.controllable_one_port_components property ¶

controllable_one_port_components: set[str]

Controllable one port components of the network as set of strings.

Examples:

>>> sorted(n.controllable_one_port_components)
['Generator', 'Load', 'StorageUnit', 'Store']

pypsa.Network.passive_branch_components property ¶

passive_branch_components: set[str]

Passive branch components of the network as set of strings.

Examples:

>>> sorted(n.passive_branch_components)
['Line', 'Transformer']

pypsa.Network.passive_one_port_components property ¶

passive_one_port_components: set[str]

Passive one port components of the network as set of strings.

Examples:

>>> sorted(n.passive_one_port_components)
['ShuntImpedance']

pypsa.Network.standard_type_components property ¶

standard_type_components: set[str]

Standard type components of the network as set of strings.

Examples:

>>> sorted(n.standard_type_components)
['LineType', 'TransformerType']

pypsa.Network.one_port_components property ¶

one_port_components: set[str]

One port components of the network as set of strings.

Examples:

>>> sorted(n.one_port_components)
['Generator', 'Load', 'ShuntImpedance', 'StorageUnit', 'Store']

pypsa.Network.branch_components property ¶

branch_components: set[str]

Branch components of the network as set of strings.

Examples:

>>> sorted(n.branch_components)
['Line', 'Link', 'Transformer']

pypsa.Network.all_components property ¶

all_components: set[str]

All components of the network as set of strings.

Examples:

>>> sorted(n.all_components)
['Bus', 'Carrier', 'Generator', 'GlobalConstraint', 'Line', 'LineType', 'Link', 'Load', 'Shape', 'ShuntImpedance', 'StorageUnit', 'Store', 'SubNetwork', 'Transformer', 'TransformerType']

pypsa.Network.component_attrs property ¶

component_attrs: DataFrame

Component attributes.

Deprecated in v1.0.0

Use the Components Class to access components attributes. As a drop in replacement you can use either n.components[<component>].defaults or n.components.<component>.defaults. You can also use the alias n.c for n.components.

Parameters:

  • component_name (string) –

Returns:

  • DataFrame –

    Component attributes informations.

pypsa.Network.df ¶

df(component_name: str) -> DataFrame

Alias for n.static.

Deprecated in v1.0.0

Use the Components Class to access components attributes. As a drop in replacement you can use either n.components[<component>].static or n.components.<component>.static. You can also use the alias n.c for n.components.

Parameters:

  • component_name (string) –

    Name of the component.

Returns:

  • DataFrame –

    Static data of the component.

pypsa.Network.static ¶

static(component_name: str) -> DataFrame

Return the DataFrame of static components for component_name.

Deprecated in v1.0.0

Use the Components Class to access components attributes. As a drop in replacement you can use either n.components[<component>].static or n.components.<component>.static. You can also use the alias n.c for n.components.

Parameters:

  • component_name (string) –

    Name of the component.

Returns:

  • DataFrame –

    Static data of the component.

pypsa.Network.pnl ¶

pnl(component_name: str) -> Dict

Alias for n.dynamic.

Deprecated in v1.0.0

Use the Components Class to access components attributes. As a drop in replacement you can use either n.components[<component>].dynamic or n.components.<component>.dynamic. You can also use the alias n.c for n.components.

Parameters:

  • component_name (string) –

    Name of the component.

Returns:

  • dict of pandas.DataFrame –

    Dynamic data of the component.

pypsa.Network.dynamic ¶

dynamic(component_name: str) -> Dict

Return the dictionary of DataFrames of varying components.

Deprecated in v1.0.0

Use the Components Class to access components attributes. As a drop in replacement you can use either n.components[<component>].dynamic or n.components.<component>.dynamic. You can also use the alias n.c for n.components.

Parameters:

  • component_name (string) –

    Name of the component.

Returns:

  • dict of pandas.DataFrame –

    Dynamic data of the component.