Rule solve_network#
![digraph snakemake_dag {
graph [bgcolor=white,
margin=0,
size="3,3"
];
node [fontname=sans,
fontsize=10,
penwidth=2,
shape=box,
style=rounded
];
edge [color=grey,
penwidth=2
];
0 [color="0.64 0.6 0.85",
fillcolor=gray,
label=solve_network,
style=filled];
1 [color="0.33 0.6 0.85",
label=prepare_network];
1 -> 0;
}](../_images/graphviz-8bd0790d3b9d3bbb4577c5403265be9cd7af22a2.png)
Solves linear optimal power flow for a network iteratively while updating reactances.
Relevant Settings#
solving:
tmpdir:
options:
formulation:
clip_p_max_pu:
load_shedding:
noisy_costs:
nhours:
min_iterations:
max_iterations:
skip_iterations:
track_iterations:
solver:
name:
See also
Documentation of the configuration file config.yaml at
electricity, solving, plotting
Inputs#
networks/elec_s{simpl}_{clusters}_ec_l{ll}_{opts}.nc: confer Rule prepare_network
Outputs#
results/networks/elec_s{simpl}_{clusters}_ec_l{ll}_{opts}.nc: Solved PyPSA network including optimisation results
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 prepare_network and solve_network are added.
Solving the network in multiple iterations is motivated through the dependence of transmission line capacities and impedances on values of corresponding flows. As lines are expanded their electrical parameters change, which renders the optimisation bilinear even if the power flow equations are linearized. To retain the computational advantage of continuous linear programming, a sequential linear programming technique is used, where in between iterations the line impedances are updated. Details (and errors introduced through this heuristic) are discussed in the paper
Fabian Neumann and Tom Brown. Heuristics for Transmission Expansion Planning in Low-Carbon Energy System Models), 16th International Conference on the European Energy Market, 2019. arXiv:1907.10548.
Warning
Capital costs of existing network components are not included in the objective function, since for the optimisation problem they are just a constant term (no influence on optimal result).
Therefore, these capital costs are not included in network.objective!
If you want to calculate the full total annual system costs add these to the objective value.
Tip
The rule solve_all_networks runs
for all scenario s in the configuration file
the rule solve_network.