PyPSA / PyPSA/pypsa-usa

Clustering Assertion Error when cluster on `model_topology.include.reeds_ba`

Open
#676 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug good first issue
Dominant language
Python
Stars
148
Forks
55
Avg merge
2d 11h
Merged PRs (30d)
18

Description

Version Checks (indicate both or one)
The Issue

Thanks for the followup, @ktehranchi! Maybe a silly question on the clustering options.

I see now, from the graphics and your example, that I should have put 7 as scenario.clusters when having model_topology.include.reeds_ba be ERCO. I had set it to 1. I guess I was expecting that if I had this set incorrectly for one of these asserts to be triggered? Am I missing something, or is this a bug?

https://github.com/PyPSA/pypsa-usa/blob/bdd1d76dcd6491a8b196f46233168c9eefa14771/workflow/scripts/cluster_network.py#L124-L126

https://github.com/PyPSA/pypsa-usa/blob/bdd1d76dcd6491a8b196f46233168c9eefa14771/workflow/scripts/cluster_network.py#L735-L737

Originally posted by @trevorb1 in #646

Steps To Reproduce

No response

Error Message

Anything else?

No response

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with workflow/scripts/cluster_network.py at the linked lines 124-126 and 735-737. Reproduce clustering with model_topology.include.reeds_ba set to ERCO and scenario.clusters set to 1, then determine whether the assertions should catch this mismatch; done means the invalid configuration is handled consistently and clearly.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data-engineering
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.