Skip to content

Commit

Permalink
breaking(eplus):change function signature names
Browse files Browse the repository at this point in the history
  • Loading branch information
TammieYu committed Oct 26, 2023
1 parent c70a274 commit fd14e11
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions frads/eplus.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,11 +224,11 @@ def actuate_heating_setpoint(self, zone: str, value: float):
value=value,
)

def actuate_lighting_power(self, light_name: str, value: float):
def actuate_lighting_power(self, light: str, value: float):
"""Set lighting power for a zone.
Args:
light_name: The name of the lighting object to set the lighting power for.
light: The name of the lighting object to set the lighting power for.
value: The value to set the lighting power to.
Example:
Expand All @@ -237,25 +237,25 @@ def actuate_lighting_power(self, light_name: str, value: float):
self.actuate(
component_type="Lights",
name="Electricity Rate",
key=light_name,
key=light,
value=value,
)

def actuate_cfs_state(self, surface: str, construction_state: str):
def actuate_cfs_state(self, window: str, cfs_state: str):
"""Set construction state for a surface.
Args:
surface: The name of the surface to set the cfs state for.
construction_state: The name of the cfs state to set the surface to.
window: The name of the surface to set the cfs state for.
cfs_state: The name of the complex fenestration system (CFS) state to set the surface to.
Example:
>>> epsetup.actuate_construction_state("window1", "cfs1")
"""
self.actuate(
component_type="Surface",
name="Construction State",
key=surface,
value=self.construction_handles[construction_state],
key=window,
value=self.construction_handles[cfs_state],
)

def get_variable_value(self, name: str, key: str) -> float:
Expand Down Expand Up @@ -559,11 +559,11 @@ def get_diffuse_horizontal_irradiance(self) -> float:
"Site Diffuse Solar Radiation Rate per Area", "Environment"
)

def calculate_wpi(self, zone_name: str, cfs_name: Dict[str, str]):
def calculate_wpi(self, zone: str, cfs_name: Dict[str, str]):
"""Calculate workplane illuminance in a zone.
Args:
zone_name: Name of the zone.
zone: Name of the zone.
cfs_name: Name of the complex fenestration state.
Returns:
Expand All @@ -580,16 +580,16 @@ def calculate_wpi(self, zone_name: str, cfs_name: Dict[str, str]):
date_time = self.get_datetime()
dni = self.get_direct_normal_irradiance()
dhi = self.get_diffuse_horizontal_irradiance()
sensor_name = next(iter(self.rconfigs[zone_name].model.sensors.keys()))
return self.rworkflows[zone_name].calculate_sensor(
sensor_name = next(iter(self.rconfigs[zone].model.sensors.keys()))
return self.rworkflows[zone].calculate_sensor(
sensor_name, cfs_name, date_time, dni, dhi
)

def calculate_edgps(self, zone_name: str, cfs_name: Dict[str, str]):
def calculate_edgps(self, zone: str, cfs_name: Dict[str, str]):
"""Calculate enhanced simplified daylight glare probability in a zone.
Args:
zone_name: Name of the zone.
zone: Name of the zone.
cfs_name: Dictionary of windows and their complex fenestration state.
Returns:
Expand All @@ -604,8 +604,8 @@ def calculate_edgps(self, zone_name: str, cfs_name: Dict[str, str]):
date_time = self.get_datetime()
dni = self.get_direct_normal_irradiance()
dhi = self.get_diffuse_horizontal_irradiance()
view_name = next(iter(self.rconfigs[zone_name].model.views.keys()))
return self.rworkflows[zone_name].calculate_edgps(
view_name = next(iter(self.rconfigs[zone].model.views.keys()))
return self.rworkflows[zone].calculate_edgps(
view_name, cfs_name, date_time, dni, dhi
)

Expand Down

0 comments on commit fd14e11

Please sign in to comment.