# Rule cluster_network¶

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

## Outputs¶

• resources/regions_onshore_elec_s{simpl}_{clusters}.geojson:

• resources/regions_offshore_elec_s{simpl}_{clusters}.geojson:

• resources/busmap_elec_s{simpl}_{clusters}.csv: Mapping of buses from networks/elec_s{simpl}.nc to networks/elec_s{simpl}_{clusters}.nc;

• resources/linemap_elec_s{simpl}_{clusters}.csv: Mapping of lines from networks/elec_s{simpl}.nc to networks/elec_s{simpl}_{clusters}.nc;

• networks/elec_s{simpl}_{clusters}.nc:

## 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:

Exemplary unsolved network clustered to 256 nodes:

Exemplary unsolved network clustered to 128 nodes:

Exemplary unsolved network clustered to 37 nodes:

cluster_network.distribute_clusters`(n, n_clusters, focus_weights=None, solver_name=None)

Determine the number of clusters per country