From ef66971d2d3e319e913ef40e600c1160f57d626f Mon Sep 17 00:00:00 2001 From: Marco Anarmo Date: Tue, 7 Oct 2025 10:50:22 +0200 Subject: [PATCH 1/3] Add VRES Profiles scaling --- CaseStudy.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CaseStudy.py b/CaseStudy.py index fca9eb9..37457a7 100644 --- a/CaseStudy.py +++ b/CaseStudy.py @@ -201,6 +201,9 @@ def scale_CaseStudy(self): if hasattr(self, "dPower_Inflows") and self.dPower_Inflows is not None: self.scale_dPower_Inflows() + if hasattr(self, "dPower_VRESProfiles") and self.dPower_VRESProfiles is not None: + self.scale_dPower_VRESProfiles() + if self.dPower_Parameters["pEnableVRES"]: self.scale_dPower_VRES() @@ -271,6 +274,9 @@ def scale_dPower_ThermalGen(self): def scale_dPower_Inflows(self): self.dPower_Inflows["value"] *= self.power_scaling_factor + def scale_dPower_VRESProfiles(self): + self.dPower_VRESProfiles["Capacity"] *= self.power_scaling_factor + def scale_dPower_VRES(self): if "MinProd" not in self.dPower_VRES.columns: self.dPower_VRES['MinProd'] = 0 From 8812cec75343701afcc8969c59241905769af595 Mon Sep 17 00:00:00 2001 From: Marco Anarmo Date: Tue, 7 Oct 2025 10:52:22 +0200 Subject: [PATCH 2/3] Allow only positive capacity factors Adds validation to ensure that capacity factors for inflows and VRES profiles are non-negative. --- CaseStudy.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/CaseStudy.py b/CaseStudy.py index 37457a7..537efc7 100644 --- a/CaseStudy.py +++ b/CaseStudy.py @@ -272,9 +272,19 @@ def scale_dPower_ThermalGen(self): self.dPower_ThermalGen['Qmax'] = self.dPower_ThermalGen['Qmax'].fillna(0) * self.reactive_power_scaling_factor def scale_dPower_Inflows(self): + # Allow only positive capacity factors + if (self.dPower_Inflows["value"] < 0).any(): + negative_values = self.dPower_Inflows[self.dPower_Inflows["value"] < 0] + raise ValueError(f"Inflows contains negative values:\n{negative_values}") + self.dPower_Inflows["value"] *= self.power_scaling_factor def scale_dPower_VRESProfiles(self): + # Allow only positive capacity factors + if (self.dPower_VRESProfiles["Capacity"] < 0).any(): + negative_values = self.dPower_VRESProfiles[self.dPower_VRESProfiles["Capacity"] < 0] + raise ValueError(f"VRES_Profiles contains negative values:\n{negative_values}") + self.dPower_VRESProfiles["Capacity"] *= self.power_scaling_factor def scale_dPower_VRES(self): From 2fe14d5a4a5376b4d9cd2daca095e668c0cd74a6 Mon Sep 17 00:00:00 2001 From: Marco Anarmo Date: Thu, 30 Oct 2025 10:50:58 +0100 Subject: [PATCH 3/3] Remove capacity factors scalation for VRESProfiles --- CaseStudy.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/CaseStudy.py b/CaseStudy.py index 537efc7..3b7c2e1 100644 --- a/CaseStudy.py +++ b/CaseStudy.py @@ -285,8 +285,6 @@ def scale_dPower_VRESProfiles(self): negative_values = self.dPower_VRESProfiles[self.dPower_VRESProfiles["Capacity"] < 0] raise ValueError(f"VRES_Profiles contains negative values:\n{negative_values}") - self.dPower_VRESProfiles["Capacity"] *= self.power_scaling_factor - def scale_dPower_VRES(self): if "MinProd" not in self.dPower_VRES.columns: self.dPower_VRES['MinProd'] = 0