Skip to content

Rule simplify_network

Workflow Diagram

See the complete workflow in the repository.

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 ]; 2 [color="0.36 0.6 0.85", label=cluster_network]; 3 [color="0.14 0.6 0.85", fillcolor=gray, label=simplify_network, style=filled]; 3 -> 2; 4 [color="0.61 0.6 0.85", label=add_electricity]; 4 -> 3; 5 [color="0.19 0.6 0.85", label=build_bus_regions]; 5 -> 3; }

Script Documentation

Lifts electrical transmission network to a single 380 kV voltage layer, removes dead-ends of the network, and reduces multi-hop HVDC connections to a single link.

Relevant Settings

.. code:: yaml

clustering:
    simplify:
    aggregation_strategies:

costs:
    output_currency:

lines:
    length_factor:

links:
    p_max_pu:

solving:
    solver:
        name:

.. seealso:: Documentation of the configuration file config.yaml at :ref:costs_cf, :ref:electricity_cf, :ref:renewable_cf, :ref:lines_cf, :ref:links_cf, :ref:solving_cf

Inputs

  • resources/costs.csv: The database of cost assumptions for all included technologies for specific years from various sources; e.g. discount rate, lifetime, investment (CAPEX), fixed operation and maintenance (FOM), variable operation and maintenance (VOM), fuel costs, efficiency, carbon-dioxide intensity.
  • resources/regions_onshore.geojson: confer :ref:busregions
  • resources/regions_offshore.geojson: confer :ref:busregions
  • networks/elec.nc: confer :ref:electricity

Outputs

  • resources/regions_onshore_elec_s{simpl}.geojson:

    .. image:: /img/regions_onshore_elec_s.png :width: 33 %

  • resources/regions_offshore_elec_s{simpl}.geojson:

    .. image:: /img/regions_offshore_elec_s .png :width: 33 %

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

  • networks/elec_s{simpl}.nc:

    .. image:: /img/elec_s.png :width: 33 %

Description

The rule :mod:simplify_network does up to four things:

  1. Create an equivalent transmission network in which all voltage levels are mapped to the 380 kV level by the function simplify_network(...).

  2. DC only sub-networks that are connected at only two buses to the AC network are reduced to a single representative link in the function simplify_links(...). The components attached to buses in between are moved to the nearest endpoint. The grid connection cost of offshore wind generators are added to the capital costs of the generator.

  3. Stub lines and links, i.e. dead-ends of the network, are sequentially removed from the network in the function remove_stubs(...). Components are moved along.

  4. Optionally, if an integer were provided for the wildcard {simpl} (e.g. networks/elec_s500.nc), the network is clustered to this number of clusters with the routines from the cluster_network rule with the function cluster_network.cluster(...). This step is usually skipped!

simplify_network_to_base_voltage(n, linetype, base_voltage)

Fix all lines to a voltage level of base voltage level and remove all transformers.

The function preserves the transmission capacity for each line while updating its voltage level, line type and number of parallel bundles (num_parallel). Transformers are removed and connected components are moved from their starting bus to their ending bus. The corresponding starting buses are removed as well.

Simplifies multi-node DC link components into single links between end-points.

n : pypsa.Network The PyPSA network to be simplified. costs : pd.DataFrame DataFrame containing technology costs. renewable_config : dict Configuration dictionary for renewable technologies. hvdc_as_lines : bool Flag indicating whether HVDC lines are treated as lines. config_lines : dict Configuration dictionary for lines. config_links : dict Configuration dictionary for links. output : object Output object containing file paths for saving results. exclude_carriers : list, optional List of carriers to exclude from simplification, by default []. aggregation_strategies : dict, optional Strategies for aggregating components, by default dict().

n : pypsa.Network The simplified PyPSA network.

drop_isolated_networks(n, threshold)

Find isolated subnetworks in the network and drop those of them which don't have load or have a load value lower than a threshold.

Parameters

iso_code : PyPSA.Network Original network threshold: float Load power used as a threshold to drop isolated nodes

Returns

modified network

merge_into_network(n, threshold, aggregation_strategies=dict())

Find isolated AC nodes and sub-networks in the network and merge those of them which have load value and a number of buses below than the specified thresholds into a backbone network.

Parameters

n : PyPSA.Network Original network threshold : float Load power used as a threshold to merge isolated nodes aggregation_strategies: dictionary Functions to be applied to calculate parameters of the aggregated grid

Returns

modified network

merge_isolated_networks(n, threshold, aggregation_strategies=dict())

Find isolated subnetworks in the network and merge those of them which have load value below than a specified threshold into a single isolated node which represents all the remote generation.

Parameters

n : PyPSA.Network Original network threshold : float Load power used as a threshold to merge isolated nodes aggregation_strategies: dictionary Functions to be applied to calculate parameters of the aggregated grid

Returns

modified network