Skip to content

Commit

Permalink
feat(ph_equipment): Update PH-Equipment
Browse files Browse the repository at this point in the history
- PH Equipment to use HBE-Process-Loads
- Update tests
- Bump dependencies
- DEPRECATION WARNING: The `honeybee_energy_ph/properties/load/equipment.py` 'ElectricEquipmentPhProperties' should no longer be used to store PhEquipment. More all PhEquipment to the new HB-Process Load object.
  • Loading branch information
ed-p-may committed Jan 26, 2025
1 parent ff4d6fa commit fce3a49
Show file tree
Hide file tree
Showing 18 changed files with 1,906 additions and 168 deletions.
Binary file modified .coverage
Binary file not shown.
10 changes: 9 additions & 1 deletion honeybee_energy_ph/_extend_honeybee_energy_ph.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
ServiceHotWaterProperties,
WindowConstructionProperties,
WindowConstructionShadeProperties,
ProcessProperties,
)
from honeybee_energy.schedule.ruleset import ScheduleRulesetProperties

Expand All @@ -35,6 +36,7 @@
from honeybee_energy_ph.properties.load.equipment import ElectricEquipmentPhProperties
from honeybee_energy_ph.properties.load.lighting import LightingPhProperties
from honeybee_energy_ph.properties.load.people import PeoplePhProperties
from honeybee_energy_ph.properties.load.process import ProcessPhProperties
from honeybee_energy_ph.properties.materials.opaque import (
EnergyMaterialNoMassPhProperties,
EnergyMaterialPhProperties,
Expand Down Expand Up @@ -67,7 +69,7 @@
setattr(ElectricEquipmentProperties, "_ph", None)
setattr(PeopleProperties, "_ph", None)
setattr(LightingProperties, "_ph", None)

setattr(ProcessProperties, "_ph", None)

# -----------------------------------------------------------------------------

Expand Down Expand Up @@ -153,6 +155,11 @@ def lighting_ph_properties(self):
return self._ph


def process_ph_properties(self):
if self._ph is None:
self._ph = ProcessPhProperties(self.host)
return self._ph

# -----------------------------------------------------------------------------

# Step 3)
Expand All @@ -178,3 +185,4 @@ def lighting_ph_properties(self):
setattr(ElectricEquipmentProperties, "ph", property(elec_equip_ph_properties))
setattr(PeopleProperties, "ph", property(people_ph_properties))
setattr(LightingProperties, "ph", property(lighting_ph_properties))
setattr(ProcessProperties, "ph", property(process_ph_properties))
63 changes: 63 additions & 0 deletions honeybee_energy_ph/load/_ph_equip_types.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# -*- Python Version: 2.7 -*-
# -*- coding: utf-8 -*-

"""HB-PH Electric Equipment Types."""

try:
from honeybee_ph_utils import enumerables
except ImportError as e:
raise ImportError("Failed to import honeybee_ph_utils: {}".format(e))


# -----------------------------------------------------------------------------
# - Type Enums


class PhDishwasherType(enumerables.CustomEnum):
allowed = [
"1-DHW CONNECTION",
"2-COLD WATER CONNECTION",
]

def __init__(self, _value=1):
# type: (int | str) -> None
super(PhDishwasherType, self).__init__(_value)


class PhClothesWasherType(enumerables.CustomEnum):
allowed = [
"1-DHW CONNECTION",
"2-COLD WATER CONNECTION",
]

def __init__(self, _value=1):
# type: (int | str) -> None
super(PhClothesWasherType, self).__init__(_value)


class PhClothesDryerType(enumerables.CustomEnum):
allowed = [
"1-CLOTHES LINE",
"2-DRYING CLOSET (COLD!)",
"3-DRYING CLOSET (COLD!) IN EXTRACT AIR",
"4-CONDENSATION DRYER",
"5-ELECTRIC EXHAUST AIR DRYER",
"6-GAS EXHAUST AIR DRYER",
]

def __init__(self, _value=1):
# type: (int | str) -> None
super(PhClothesDryerType, self).__init__(_value)


class PhCookingType(enumerables.CustomEnum):
allowed = [
"1-ELECTRICITY",
"2-NATURAL GAS",
"3-LPG",
]

def __init__(self, _value=1):
# type: (int | str) -> None
super(PhCookingType, self).__init__(_value)

Loading

0 comments on commit fce3a49

Please sign in to comment.