diff --git a/reoptjl/models.py b/reoptjl/models.py index f0ccbe808..36a1485ca 100644 --- a/reoptjl/models.py +++ b/reoptjl/models.py @@ -5465,6 +5465,9 @@ class ASHPSpaceHeaterInputs(BaseModel, models.Model): def clean(self): error_messages = {} + if self.dict.get("min_allowable_ton") in [None, "", []] and self.dict.get("min_allowable_peak_capacity_fraction") in [None, "", []]: + self.min_allowable_peak_capacity_fraction = 0.5 + if self.dict.get("min_allowable_ton") not in [None, "", []] and self.dict.get("min_allowable_peak_capacity_fraction") not in [None, "", []]: error_messages["bad inputs"] = "At most one of min_allowable_ton and min_allowable_peak_capacity_fraction may be input to model {}".format(self.key) @@ -5732,6 +5735,9 @@ class ASHPWaterHeaterInputs(BaseModel, models.Model): def clean(self): error_messages = {} + if self.dict.get("min_allowable_ton") in [None, "", []] and self.dict.get("min_allowable_peak_capacity_fraction") in [None, "", []]: + self.min_allowable_peak_capacity_fraction = 0.5 + if self.dict.get("min_allowable_ton") not in [None, "", []] and self.dict.get("min_allowable_peak_capacity_fraction") not in [None, "", []]: error_messages["bad inputs"] = "At most one of min_allowable_ton and min_allowable_peak_capacity_fraction may be input to model {}".format(self.key)