Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rds/kjw/function get swh uses associated with each building segment #1401

Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions docs/_toc.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ These conventions are used in all RDS below, and the logic of evaluating rules f
* [get_zone_target_baseline_system](ruleset_functions/get_zone_target_baseline_system.md): Following G3.1.1, determines the baseline system type for each zone in a building
* [get_lab_zone_hvac_systems](ruleset_functions/get_lab_zone_hvac_systems.md): returns a list of HVAC systems serving only lab zones.
* [get_SWH_bats_and_SWH_use](ruleset_functions/get_SWH_bats_and_SWH_use.md): This function gets all the SWH Uses and the SWH space types and sorts them into a dictionary where the keys are the ServiceWaterHeatingBuildingAreaOptions2019ASHRAE901 and values are a list if ServiceWaterHeatingUse.ids
* [get_SWH_uses_associated_with_each_building_segment](ruleset_functions/get_SWH_uses_associated_with_each_building_segment.md): This function gets all the SWH uses connected to a building segment. This function is primarily to encapsulate getting service water heating uses in one function so that if a change is made in the schema as to how service water heating use is specified, the RCT only needs to change in one place.

### G3.1.1 Exception Check Functions
* [does_zone_meet_G3_1_1c](ruleset_functions/G311_exceptions/does_zone_meet_G3_1_1d.md): Determines whether a given zone meets the G3_1_1c exception "If the baseline HVAC system type is 5, 6, 7, 8 use separate single-zone systems conforming with the requirements of system 3 or system 4 (depending on building heating source) for any spaces that have occupancy or process loads or schedules that differ significantly from the rest of the building. Peak thermal loads that differ by 10 Btu/h·ft2 (2.930710 W/sf) or more from the average of other spaces served by the system, or schedules that differ by more than 40 equivalent full-load hours per week from other spaces served by the system, are considered to differ significantly. Examples where this exception may be applicable include but are not limited to natatoriums and continually occupied security areas. This exception does not apply to computer rooms."
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
## get_SWH_uses_associated_with_each_building_segment

Description: This function gets all the SWH uses connected to a building segment. This function is primarily to encapsulate getting service water heating uses in one function so that if a change is made in the schema as to how service water heating use is specified, the RCT only needs to change in one place.
Copy link
Collaborator

Choose a reason for hiding this comment

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

I see, so you are saying you would just have to update this function?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yes


Inputs:
- **RMD**
- **building_segment_id** - the id of the building segment

Returns:
- **swh_uses**: A list containing the ids of all service water heating uses associated with a building segment

Function Call:
- get_obj_by_id

Data Lookup: None

Logic:
- get the building segment: `building_segment = get_obj_by_id(RMD, building_segment_id)`
- create a blank list: `swh_uses = []`
- look at each swh use: `for swh_use in building_segment.service_water_heating_uses:`
- append the use to the list: `swh_uses.append(swh_use)`


**Returns** swh_uses

**[Back](../_toc.md)**

**Notes:**
Loading