Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keep existing conventional generation in sector network #1366

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

martacki
Copy link
Member

@martacki martacki commented Oct 16, 2024

Closes # (if applicable).

Changes proposed in this Pull Request

The sector coupled network currently removes existing conventional generators. This PR adds them back (in the traditional sectoral setup with EU Generators + Links)

Checklist

  • I tested my contribution locally and it works as intended.
  • Code and workflow changes are sufficiently documented.
  • Changed dependencies are added to envs/environment.yaml.
  • Changes in configuration options are added in config/config.default.yaml.
  • Changes in configuration options are documented in doc/configtables/*.csv.
  • Sources of newly added data are documented in doc/data_sources.rst.
  • A release note doc/release_notes.rst is added.

Copy link
Contributor

github-actions bot commented Oct 16, 2024

Validator Report

I am the Validator. Download all artifacts here.
I'll be back and edit this comment for each new commit.

General

Plots comparison
Main branch Feature branch
Image not available Image not available
Image not available Image not available
Image not available Image not available
Image not available Image not available
Image not available Image not available
Image not available Image not available
Files comparison
Status NRMSE MAE (norm)
weighted_prices.csv ⚠️Changed 0.514 0.50
price_statistics.csv ⚠️Changed 0.001 0.21
metrics.csv ⚠️Changed 0.000 0.06
nodal_cfs.csv ⚠️ NaN mismatch
nodal_supply_energy.csv ⚠️ NaN mismatch
nodal_capacities.csv ⚠️ NaN mismatch
prices.csv ⚠️ NaN mismatch
supply.csv ⚠️ NaN mismatch
nodal_costs.csv ⚠️ NaN mismatch
market_values.csv ⚠️ NaN mismatch
capacities.csv ⚠️ NaN mismatch
curtailment.csv ⚠️ NaN mismatch
costs.csv ⚠️ NaN mismatch
cfs.csv ⚠️ NaN mismatch
supply_energy.csv ⚠️ NaN mismatch
energy.csv ⚠️ NaN mismatch

NRMSE: Normalized (combined-min-max) Root Mean Square Error
MAE (norm): Mean Absolute Error on normalized data (min-max)
Status Threshold: MAE (norm) > 0.05 and NRMSE > 0.3

Model Metrics

Benchmarks Image not available Image not available Image not available

Comparing keep_conventionals_in_sector (37c6093) with master (52b8179).
Branch is 8 commits ahead and 0 commits behind.
Last updated on 2024-11-05 11:03:42 CET.

@martacki
Copy link
Member Author

martacki commented Oct 16, 2024

Except for typos (my specialty), there seems to be only the same bug as in master, which is why Windows OS is failing (nut sure about why).

Remaining discussion points could be:

  • I designed the same setup for nuclear as for fossil generation (Generator uranium connected with a nuclear link). I think that makes more sense, currently it simply remained a "nuclear generator", but this was a bit confusing
  • Currently, if existing capacities are kept and the carrier is expandable, only the existing locations can be expanded. The same carrier can not be expanded at a different site, if that site has no existing capacity. Could be potentially fixed, but wasn't needed in our case

Otherwise, seems to work.
Nuclear / coal generation in power only model:
image

Nuclear/coal generation at sectoral model:
image
image
image

Sectoral model dispatch (in links_t.p1) (Co2L0.5 for whole EU, 121H, 59 clusters)
nuclear
image
coal
image

default config settings don't change the current default output (except that nuclear is not kept anymore in the generators)

Comment on lines +519 to 520
fossils = ["coal", "gas", "oil", "lignite", "uranium"]
if options["fossil_fuels"] and carrier in fossils:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
fossils = ["coal", "gas", "oil", "lignite", "uranium"]
if options["fossil_fuels"] and carrier in fossils:
fossils = ["coal", "gas", "oil", "lignite"]
if (options["fossil_fuels"] and carrier in fossils) or (carrier == "uranium"):

As uranium is not a fossil fuel, this would be less misleading.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment on lines +1142 to +1144
p_max_pu=(
0.7 if carrier == "uranium" else 1
), # be conservative for nuclear (maintenance or unplanned shut downs)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For consistency, it would be good to use this value in add_existing_baseyearas well.

if generator != "urban central solid biomass CHP":
n.add(
"Link",
new_capacity.index,
suffix=name_suffix,
bus0=bus0,
bus1=new_capacity.index,
bus2="co2 atmosphere",
carrier=generator,
marginal_cost=costs.at[generator, "efficiency"]
* costs.at[generator, "VOM"], # NB: VOM is per MWel
capital_cost=costs.at[generator, "efficiency"]
* costs.at[generator, "fixed"], # NB: fixed cost is per MWel
p_nom=new_capacity / costs.at[generator, "efficiency"],
efficiency=costs.at[generator, "efficiency"],
efficiency2=costs.at[carrier[generator], "CO2 intensity"],
build_year=grouping_year,
lifetime=lifetime_assets.loc[new_capacity.index],
)

It would be even better to use the country specific values from data/nuclear_p_max_pu.csv.

@daniel-rdt

@@ -4538,6 +4590,17 @@ def add_enhanced_geothermal(n, egs_potentials, egs_overlap, costs):
)
pop_weighted_energy_totals.update(pop_weighted_heat_totals)

if options.get("keep_existing_capacities", False):
Copy link
Contributor

@daniel-rdt daniel-rdt Nov 29, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if options.get("keep_existing_capacities", False):
if options.get("keep_existing_capacities", False) and snakemake.params.foresight not in ["myopic", "perfect"]:

It would make sense to limit this functionality to overnight, as for myopic and perfect optimization existing caps are added later on. fyi @martacki

@@ -4551,7 +4614,7 @@ def add_enhanced_geothermal(n, egs_potentials, egs_overlap, costs):

spatial = define_spatial(pop_layout.index, options)

if snakemake.params.foresight in ["myopic", "perfect"]:
if snakemake.params.foresight in ["overnight", "myopic", "perfect"]:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these not all the cases, i.e. we could leave the if condition out completely now?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants