-
Notifications
You must be signed in to change notification settings - Fork 5
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
Changes from 2 commits
cf0b8ec
d6cb177
c2b73d1
891524c
e82e3b4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
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. | ||
|
||
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_component_by_ID | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is this different from get_obj_by_id? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. no... I'm not sure which is correct, but my understanding is that the RCT team understood either way what's going on There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm sure they would understand. I think I am just advocating for cleanliness more now because I am also currently going through every single TCD description and making revisions to have consistent wording and formatting. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. consistency is definitely better when possible! |
||
|
||
Data Lookup: None | ||
|
||
Logic: | ||
- get the building segment: `building_segment = get_component_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:** |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes