Solve Network

(solve-network)

Solve Network#

Rule prepare_network#

Prepare PyPSA network for solving according to The {opts} wildcard and The {ll} wildcard, such as.

  • adding an annual limit of carbon-dioxide emissions,

  • adding an exogenous price per tonne emissions of carbon-dioxide (or other kinds),

  • setting an N-1 security margin factor for transmission line capacities,

  • specifying an expansion limit on the cost of transmission expansion,

  • specifying an expansion limit on the volume of transmission expansion, and

  • reducing the temporal resolution by averaging over multiple hours or segmenting time series into chunks of varying lengths using tsam.

Relevant Settings

costs:
    year:
    version:
    fill_values:
    emission_prices:
    marginal_cost:
    capital_cost:

electricity:
    co2limit:
    max_hours:

See also

Documentation of the configuration file config/config.yaml at costs, electricity

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.

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

Outputs

  • networks/elec_s{simpl}_{clusters}_ec_l{ll}_{opts}.nc: Complete PyPSA network that will be handed to the solve_network rule.

Description

Tip

The rule prepare_elec_networks runs for all scenario s in the configuration file the rule prepare_network.

Rule solve_network#

Directly uses PyPSA-Eur Implementation

Solves optimal operation and capacity for a network with the option to iteratively optimize while updating line reactances.

This script is used for optimizing the electrical network as well as the sector coupled network.

Description

Total annual system costs are minimised with PyPSA. The full formulation of the linear optimal power flow (plus investment planning is provided in the) documentation of PyPSA.

The optimization is based on the network.optimize() function. Additionally, some extra constraints specified in solve_network are added.

Note

The rules solve_elec_networks and solve_sector_networks run the workflow for all scenarios in the configuration file (scenario:) based on the rule solve_network.