Add nuclear repeatedly in add_extra_components.py
Open
Nobody has claimed this yet.
bug
- Dominant language
- Python
- Stars
- 148
- Forks
- 55
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 18
Description
Checklist
- I am using the current
masterbranch - I am running on an up-to-date
pypsa-usaenvironment. Update viaconda env update -f envs/environment.yaml
The Issue
New nuclear is added to the network twice. The 1st time spilts xx nuclear in to xx nuclear and xx nuclear existing:
if snakemake.params.retirement == "economic":
economic_retirement_gens = set(elec_config.get("conventional_carriers", None))
split_retirement_gens(
n,
costs_dict[n.investment_periods[0]],
economic_retirement_gens,
economic=True,
)
The 2nd time adds xx nuclear_year:
new_carriers = list(
set(elec_config["extendable_carriers"].get("Generator", [])) - set(n.generators.carrier.unique())
| set(["nuclear"] if "nuclear" in elec_config["extendable_carriers"].get("Generator", []) else []),
)
for investment_year in n.investment_periods:
costs = costs_dict[investment_year]
attach_storageunits(n, costs, elec_config, investment_year)
attach_multihorizon_existing_generators(n, costs, multi_horizon_gens, investment_year)
attach_multihorizon_egs(n, costs, costs_dict, egs_gens, investment_year)
attach_multihorizon_new_generators(n, costs, new_carriers, investment_year)
attach_stores(n, costs, elec_config, investment_year)
Steps To Reproduce
Run default config with planning_horizons: [2050]
Expected Behavior
No response
Error Message
Anything else?
No response
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in add_extra_components.py and reproduce the issue with the default configuration and planning_horizons: [2050]. Trace the retirement split and new-generator attachment paths shown in the report; done means new nuclear is not added twice or represented by duplicate nuclear variants.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100