Skip to content

Commit

Permalink
updated pv_validation for tilt defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
bpulluta committed Apr 19, 2024
1 parent 7619053 commit 4fb3adb
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions reoptjl/validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,12 +203,14 @@ def cross_clean(self):
"""
PV validation
"""
def cross_clean_pv(pvmodel):
if pvmodel.__getattribute__("tilt") == None:
if pvmodel.__getattribute__("array_type") == pvmodel.ARRAY_TYPE_CHOICES.ROOFTOP_FIXED:
pvmodel.__setattr__("tilt", 10)
else:
def cross_clean_pv(pvmodel):
if pvmodel.__getattribute__("tilt") is None:
if pvmodel.__getattribute__("array_type") in (pvmodel.ARRAY_TYPE_CHOICES.GROUND_MOUNT_FIXED_OPEN_RACK,
pvmodel.ARRAY_TYPE_CHOICES.ROOFTOP_FIXED):
pvmodel.__setattr__("tilt", 20)
else:
pvmodel.__setattr__("tilt", 0)


if pvmodel.__getattribute__("azimuth") == None:
if self.models["Site"].__getattribute__("latitude") >= 0:
Expand Down

0 comments on commit 4fb3adb

Please sign in to comment.