Rule cluster_network

digraph snakemake_dag {
    graph [bgcolor=white,
        margin=0,
        size="8,5"
    ];
    node [fontname=sans,
        fontsize=10,
        penwidth=2,
        shape=box,
        style=rounded
    ];
    edge [color=grey,
        penwidth=2
    ];
    1        [color="0.50 0.6 0.85",
        label=prepare_network];
    2        [color="0.36 0.6 0.85",
        fillcolor=gray,
        label=cluster_network,
        style=filled];
    2 -> 1;
    3        [color="0.14 0.6 0.85",
        label=simplify_network];
    3 -> 2;
}

Creates networks clustered to {cluster} number of zones with aggregated buses, generators and transmission corridors.

Relevant Settings

focus_weights:

renewable: (keys)
    {technology}:
        potential:

solving:
    solver:
        name:

lines:
    length_factor:

See also

Documentation of the configuration file config.yaml at Top-level configuration, renewable, solving, lines

Inputs

Outputs

  • resources/regions_onshore_{network}_s{simpl}_{clusters}.geojson:

    ../_images/regions_onshore_elec_s_X.png
  • resources/regions_offshore_{network}_s{simpl}_{clusters}.geojson:

    ../_images/regions_offshore_elec_s_X.png
  • resources/clustermaps_{network}_s{simpl}_{clusters}.h5: Mapping of buses and lines from networks/elec_s{simpl}.nc to networks/elec_s{simpl}_{clusters}.nc; has keys [‘/busmap’, ‘/busmap_s’, ‘/linemap’, ‘/linemap_negative’, ‘/linemap_positive’]

  • networks/{network}_s{simpl}_{clusters}.nc:

    ../_images/elec_s_X.png

Description

Note

Why is clustering used both in simplify_network and cluster_network ?

Consider for example a network networks/elec_s100_50.nc in which simplify_network clusters the network to 100 buses and in a second step cluster_network` reduces it down to 50 buses.

In preliminary tests, it turns out, that the principal effect of changing spatial resolution is actually only partially due to the transmission network. It is more important to differentiate between wind generators with higher capacity factors from those with lower capacity factors, i.e. to have a higher spatial resolution in the renewable generation than in the number of buses.

The two-step clustering allows to study this effect by looking at networks like networks/elec_s100_50m.nc. Note the additional m in the {cluster} wildcard. So in the example network there are still up to 100 different wind generators.

In combination these two features allow you to study the spatial resolution of the transmission network separately from the spatial resolution of renewable generators.

Is it possible to run the model without the simplify_network rule?

No, the network clustering methods in the PyPSA module pypsa.networkclustering do not work reliably with multiple voltage levels and transformers.

Tip

The rule cluster_all_networks runs for all scenario s in the configuration file the rule cluster_network.

Exemplary unsolved network clustered to 512 nodes:

../_images/elec_s_512.png

Exemplary unsolved network clustered to 256 nodes:

../_images/elec_s_256.png

Exemplary unsolved network clustered to 128 nodes:

../_images/elec_s_128.png

Exemplary unsolved network clustered to 37 nodes:

../_images/elec_s_37.png