PyPSA/pypsa-usa

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

Open

#676 opened on Aug 27, 2025

 (0 comments) (0 reactions) (0 assignees)Python (52 forks)auto 404
buggood first issue

Repository metrics

Stars
 (140 stars)
PR merge metrics
 (PR metrics pending)

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