Solving Networks#

After generating and simplifying the networks they can be solved through the rule solve_network by using the collection rules solve_elec_networks or solve_sector_networks. Moreover, networks can be solved for dispatch-only analyses on an already solved network with solve_operations_network.

Rule solve_network#

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.


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.


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.

Rule solve_operations_network#

Solves linear optimal dispatch in hourly resolution using the capacities of previous capacity expansion in rule solve_network.

Rule solve_sector_network#


More comprehensive documentation for this rule will be released soon.