heat_pump3-more clean code

edit2
Shahla Huseynova 1 year ago
parent 70ea412c2e
commit fac891052d

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -210,8 +210,7 @@ class Heatpump(Asset):
return func
# return cop_curve
return 2.5
return cop_curve
@lru_cache(maxsize=None)
def get_cop(self, heat_output, Tsink=None, Tsource=None):
@ -246,11 +245,9 @@ class Heatpump(Asset):
f"Chosen heat output is out of range [{self.min_th_power} - {self.max_th_power}]. "
"Heat output is being limited to the closest boundary."
)
# heat_output = min(max(heat_output, self.min_th_power), self.max_th_power)
heat_output = 1
heat_output = min(max(heat_output, self.min_th_power), self.max_th_power)
# cop = self.get_cop(heat_output=heat_output, Tsink=Tsink, Tsource=Tsource)
cop = 2.5
cop = self.get_cop(heat_output=heat_output, Tsink=Tsink, Tsource=Tsource)
return -heat_output / cop
def set_load(self, *args, **kwargs):
@ -560,7 +557,7 @@ class HotWaterStorage(Battery):
def charging_power_limit(self):
max_charging_energy = self.max_chargelevel - self.chargelevel
# return min(self.MWh_to_MW(max_charging_energy), -self.min_power)
return 0.4
return 0.5
@property
def discharging_power_limit(self):

Loading…
Cancel
Save