Virtual - ptidejteam/tools4cities-metamenth GitHub Wiki

Virtual has classes that models the Lighting and HVAC zones of a building.

Classes and Their Relationships

All classes (entities) have auto-generated IDs (UID) to uniquely identify objects created from them.

Zone

This class defines zones in a building, e.g., HVAC and Lighting zones.

Parent Class

None

Relationships

  • Zone has a one-to-many relationship with another Zone, e.g., a zone can be adjacent to another zone or overlap with another zone
  • Zone has a one-to-many relationship with AbstractSpace, e.g., a room and open space can be part of a zone

Attributes

  • description: string (optional), the description of the zone
  • name: string, the name of the zone
  • zone_type: ZoneType, the type of zone, e.g., HVAC
  • hvac_type: HVACType (default is None), the type of HVAC zone, e.g., INTERIOR
  • adjacent_zones: List[Zone], zones that may be adjacent to the current zone
  • overlapping_zones: List[Zone], zones that may overlap with the current zone
  • spaces: List[AbstractSpace], the spaces, e.g., rooms, that are part of the zone

Behaviours (Methods)

  • add_adjacent_zones(adjacent_zones: List[Zone]): adds adjacent zones to the current zone
  • remove_adjacent_zone(adjacent_zone: Zone): removes adjacent zone from the current zone
  • add_overlapping_zones(overlapping_zones: List[Zone]): adds overlapping zones to the current zone
  • remove_overlapping_zone(overlapping_zone: Zone): removes overlapping zone from the current zone
  • add_spaces(spaces: List[AbstractSpace]): adds spaces, e.g., open space to the zone
  • remove_space(spaces: AbstractSpace): remove a space, e.g., open space from the zone
  • get_adjacent_zone_by_name(name: str) -> Zone: searches for an adjacent zone by name
  • get_adjacent_zone_by_uid(uid: str) -> Zone: searches for an adjacent zone by unique identifier
  • get_adjacent_zones(search_terms: Dict) -> [Zone]: searches for adjacent zones based on attributes and their values
  • get_overlapping_zone_by_name(name: str) -> Zone: searches for an overlapping zone by name
  • get_overlapping_zone_by_uid(uid: str) -> Zone: searches for an overlapping zone by unique identifier
  • get_overlapping_zones(search_terms: Dict) -> [Zone]: searches for overlapping zones based on attributes and their values
  • get_space_by_uid(uid: str) -> AbstractSpace: searches for spaces in a zone by unique identifier
  • get_spaces(search_terms: Dict) -> [AbstractSpace]: searches for spaces, e.g., rooms, in a zones based on attributes and their values

AbstractZonalEntity

None

Parent Class

None

Relationships

  • AbstractZonalEntity has a one-to-many relationship with Zone

Attributes

  • zones: List[Zone], a list of zones that an entity may be part of

Behaviours (Methods)

  • add_zone(zone: Zone, building: Building): adds a zone to any entity that has AbstractZonalEntity as a parent class
  • remove_zone(zone: Zone): removes a zone from, any entity that has AbstractZonalEntity as a parent class
  • get_zone_by_name(name: str) -> Zone: searches for zone by name from any entity that has AbstractZonalEntity as a parent class
  • get_zone_by_uid(name: str) -> Zone: searches for zone by unique identifier from any entity that has AbstractZonalEntity as a parent class
  • get_zones(search_terms: Dict) -> [Zone]: searches for zone based on attributes and values from any entity that has AbstractZonalEntity as a parent class