From ea8fc31a30fd158dede9255c8a542d707acc25d9 Mon Sep 17 00:00:00 2001 From: Fabian Neumann Date: Wed, 15 May 2024 15:15:09 +0200 Subject: [PATCH] link_thresholds as dictionary, not float, more logging messages --- config/config.default.yaml | 7 +++++-- doc/configtables/solving.csv | 7 ++++--- scripts/solve_network.py | 1 + 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/config/config.default.yaml b/config/config.default.yaml index e04ac2a3..b26e73ce 100644 --- a/config/config.default.yaml +++ b/config/config.default.yaml @@ -778,12 +778,15 @@ solving: post_discretization: enable: false line_unit_size: 1700 + line_threshold: 0.3 link_unit_size: DC: 2000 H2 pipeline: 1200 gas pipeline: 1500 - line_threshold: 0.3 - link_threshold: 0.3 + link_threshold: + DC: 0.3 + H2 pipeline: 0.3 + gas pipeline: 0.3 constraints: CCL: false diff --git a/doc/configtables/solving.csv b/doc/configtables/solving.csv index 1fb2c692..ad8778a3 100644 --- a/doc/configtables/solving.csv +++ b/doc/configtables/solving.csv @@ -17,10 +17,11 @@ options,,, -- post_discretization,,, -- -- enable,bool,"{'true','false'}",Switch to enable post-discretization of the network. Disabled by default. -- -- line_unit_size,MW,float,Discrete unit size of lines in MW. --- -- link_unit_size,MW,float,Discrete unit size of links in MW by carrier (given in dictionary style. +-- -- line_threshold,,float,The threshold relative to the discrete line unit size beyond which to round up to the next unit. +-- -- link_unit_size,MW,float,Discrete unit size of links in MW by carrier (given in dictionary style). +-- -- -- {carrier},,, +-- -- link_threshold,,float,The threshold relative to the discrete link unit size beyond which to round up to the next unit by carrier (given in dictionary style). -- -- -- {carrier},,, --- -- line_threshold,,float,The threshold relative to the discrete line unit size beyond which to round up to the next unit. Defaults to 0.3. --- -- link_threshold,,float,The threshold relative to the discrete link unit size beyond which to round up to the next unit. Defaults to 0.3. constraints ,,, -- CCL,bool,"{'true','false'}",Add minimum and maximum levels of generator nominal capacity per carrier for individual countries. These can be specified in the file linked at ``electricity: agg_p_nom_limits`` in the configuration. File defaults to ``data/agg_p_nom_minmax.csv``. -- EQ,bool/string,"{'false',`n(c| )``; i.e. ``0.5``-``0.7c``}",Require each country or node to on average produce a minimal share of its total consumption itself. Example: ``EQ0.5c`` demands each country to produce on average at least 50% of its consumption; ``EQ0.5`` demands each node to produce on average at least 50% of its consumption. diff --git a/scripts/solve_network.py b/scripts/solve_network.py index 67c5e805..6438d275 100644 --- a/scripts/solve_network.py +++ b/scripts/solve_network.py @@ -923,6 +923,7 @@ def solve_network(n, config, solving, **kwargs): kwargs["min_iterations"] = cf_solving["min_iterations"] kwargs["max_iterations"] = cf_solving["max_iterations"] if cf_solving["post_discretization"].pop("enable"): + logger.info("Add post-discretization parameters.") kwargs.update(cf_solving["post_discretization"]) status, condition = n.optimize.optimize_transmission_expansion_iteratively( **kwargs