Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Inputs:
- **RMD**

Returns:
- **swh_uses_dict**: A dictionary where the keys are all the building segment ids and the value is `service_water_heating_uses` object under the `service_water_heating_uses`.
- **swh_uses_dict**: A dictionary where the keys are all the building segment ids and the value is a list `service_water_heating_uses` objects.

Function Call:
- get_obj_by_id
Expand All @@ -15,9 +15,15 @@ Data Lookup: None

Logic:
- define `swh_uses_dict`: `swh_uses_dict = {}`
- look at each swh use: `for bldg_seg in find_all("$.buildings[*].building_segments[*]", rmd)`
- append the use to the list: `swh_uses_dict = {bldg_seg["id"]: find_all("$.zones[*].spaces[*].service_water_heating_uses[*]", rmd)}`

- look at each building segment in the building: `for bldg_seg in find_all("$.buildings[*].building_segments[*]", rmd):`
- create the list for this building segment: `swh_uses_dict[bldg_seg.id] = []`
- look at each swh use in the building segment: `for swh_use in bldg_seg.service_water_heating_uses:`
- append the swh use id to the bldg_seg list: `swh_uses[bldg_seg.id].append(swh_use.id)`
- look at each space in the building segment: `for space in build_seg...spaces:`
Copy link
Collaborator

@yunjoonjung-PNNL yunjoonjung-PNNL May 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@KarenWGard Here are my understanding of this change.

  1. The description in line 9 says a list service_water_heating_uses objects, but what this implementation does is to have a list of swh_use ids, which is different from what the description says.
  2. If we make this change, the 11-11, 11-12 rules have an error. How would you handle this?

- look at each service water heating use in the space - note to DEV team - we are only interested in actual objects, not references: `for swh_use in space.service_water_heating_uses:`
- append the swh use id to the bldg_seg list: `swh_uses[bldg_seg.id].append(swh_use.id)`


**Returns** swh_uses_dict

**[Back](../_toc.md)**
Expand Down
Loading