Skip to content

Commit

Permalink
fix: Correct profile name creation for reading cf_data
Browse files Browse the repository at this point in the history
  • Loading branch information
pesap committed Oct 23, 2024
1 parent 5b9e4c6 commit 9cb02be
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/r2x/parser/reeds.py
Original file line number Diff line number Diff line change
Expand Up @@ -525,10 +525,9 @@ def _construct_cf_time_series(self):
# BA instead of attaching one per generator. We would need to invert
# the order of the loop and just use that to attach it to the different
for generator in self.system.get_components(RenewableDispatch, RenewableNonDispatch):
if "|" in generator.name:
profile_name = "|".join(generator.name.rsplit("_", 1))
else:
profile_name = generator.name # .rsplit("_", 1)[0]
profile_name = generator.name # .rsplit("_", 1)[0]
if "|" in cf_data.columns[1]:
profile_name = "|".join(profile_name.rsplit("_", 1))
if profile_name not in cf_data.columns:
msg = (
f"{generator.__class__.__name__}:{generator.name} do not "
Expand Down

0 comments on commit 9cb02be

Please sign in to comment.