Merge pull request #664 from PyPSA/add-loss-approximation
add option for piecewise linear transmission loss approximation
This commit is contained in:
commit
3487482c72
@ -623,9 +623,9 @@ clustering:
|
||||
solving:
|
||||
#tmpdir: "path/to/tmp"
|
||||
options:
|
||||
formulation: kirchhoff
|
||||
clip_p_max_pu: 1.e-2
|
||||
load_shedding: false
|
||||
transmission_losses: 0
|
||||
noisy_costs: true
|
||||
skip_iterations: true
|
||||
track_iterations: false
|
||||
|
@ -1,7 +1,7 @@
|
||||
,Unit,Values,Description
|
||||
options,,,
|
||||
-- formulation,--,"Any of {'angles', 'kirchhoff', 'cycles', 'ptdf'}","Specifies which variant of linearized power flow formulations to use in the optimisation problem. Recommended is 'kirchhoff'. Explained in `this article <https://arxiv.org/abs/1704.01881>`_."
|
||||
-- load_shedding,bool/float,"{'true','false', float}","Add generators with very high marginal cost to simulate load shedding and avoid problem infeasibilities. If load shedding is a float, it denotes the marginal cost in EUR/kWh."
|
||||
-- transmission_losses,int,"[0-9]","Add piecewise linear approximation of transmission losses based on n tangents. Defaults to 0, which means losses are ignored."
|
||||
-- noisy_costs,bool,"{'true','false'}","Add random noise to marginal cost of generators by :math:`\mathcal{U}(0.009,0,011)` and capital cost of lines and links by :math:`\mathcal{U}(0.09,0,11)`."
|
||||
-- min_iterations,--,int,"Minimum number of solving iterations in between which resistance and reactence (``x/r``) are updated for branches according to ``s_nom_opt`` of the previous run."
|
||||
-- max_iterations,--,int,"Maximum number of solving iterations in between which resistance and reactence (``x/r``) are updated for branches according to ``s_nom_opt`` of the previous run."
|
||||
|
|
@ -25,6 +25,10 @@ Upcoming Release
|
||||
|
||||
* Remove ``vresutils`` dependency.
|
||||
|
||||
* Add option to include a piecewise linear approximation of transmission losses,
|
||||
e.g. by setting ``solving: options: transmission_losses: 2`` for an
|
||||
approximation with two tangents.
|
||||
|
||||
PyPSA-Eur 0.8.0 (18th March 2023)
|
||||
=================================
|
||||
|
||||
|
@ -10,7 +10,7 @@ dependencies:
|
||||
- python>=3.8
|
||||
- pip
|
||||
|
||||
- pypsa>=0.21.3
|
||||
- pypsa>=0.23
|
||||
- atlite>=0.2.9
|
||||
- dask
|
||||
|
||||
|
@ -600,6 +600,7 @@ def solve_network(n, config, opts="", **kwargs):
|
||||
track_iterations = cf_solving.get("track_iterations", False)
|
||||
min_iterations = cf_solving.get("min_iterations", 4)
|
||||
max_iterations = cf_solving.get("max_iterations", 6)
|
||||
transmission_losses = cf_solving.get("transmission_losses", 0)
|
||||
|
||||
# add to network for extra_functionality
|
||||
n.config = config
|
||||
@ -613,6 +614,7 @@ def solve_network(n, config, opts="", **kwargs):
|
||||
if skip_iterations:
|
||||
status, condition = n.optimize(
|
||||
solver_name=solver_name,
|
||||
transmission_losses=transmission_losses,
|
||||
extra_functionality=extra_functionality,
|
||||
**solver_options,
|
||||
**kwargs,
|
||||
@ -623,6 +625,7 @@ def solve_network(n, config, opts="", **kwargs):
|
||||
track_iterations=track_iterations,
|
||||
min_iterations=min_iterations,
|
||||
max_iterations=max_iterations,
|
||||
transmission_losses=transmission_losses,
|
||||
extra_functionality=extra_functionality,
|
||||
**solver_options,
|
||||
**kwargs,
|
||||
|
Loading…
Reference in New Issue
Block a user