Skip to content

Commit

Permalink
feat: clip and round values in curtailment data frames
Browse files Browse the repository at this point in the history
  • Loading branch information
rouille committed Sep 22, 2020
1 parent 1a80dda commit 086226a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion postreise/analyze/generation/curtailment.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ def calculate_curtailment_time_series(scenario, resources=None):
curtailment = {}
for r in resources:
ren_plants = grid.plant.groupby("type").get_group(r).index
curtailment[r] = relevant_profiles[ren_plants] - pg[ren_plants]
curtailment[r] = (
(relevant_profiles[ren_plants] - pg[ren_plants]).clip(lower=0).round(6)
)

return curtailment

Expand Down

0 comments on commit 086226a

Please sign in to comment.