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

L200 up to 6.2.1.6 #37

Merged
merged 81 commits into from
Oct 23, 2020
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
81 commits
Select commit Hold shift + click to select a range
20ec678
feat(L200): add envelope roof tests
macintoshpie Sep 14, 2020
c2cfa4e
feat(L200): add envelope wall tests
macintoshpie Sep 14, 2020
b98ee18
feat(L200): add envelope fenestration tests
macintoshpie Sep 15, 2020
ec6509d
feat(L200): add foundation system tests
macintoshpie Sep 15, 2020
64210c4
feat(L200): add tightness tests
macintoshpie Sep 15, 2020
355272e
fix(exemplary): fix MMBtu units for NG ResourceUse
macintoshpie Sep 17, 2020
583e82e
feat(L200): test HVAC systems year installed
macintoshpie Sep 17, 2020
0cb1a35
feat(L200): add capacity and condition tests
macintoshpie Sep 18, 2020
11b5f74
feat(L200): add central plant tests
macintoshpie Sep 18, 2020
8a07c2e
feat(L200): add air distribution tests
macintoshpie Sep 22, 2020
fcb1d48
feat(L200): add outdoor air delivery tests
macintoshpie Sep 22, 2020
8bc4759
feat(L200): add duct condition tests
macintoshpie Sep 22, 2020
7f3f6e2
feat(L200): add plant pump tests
macintoshpie Sep 23, 2020
90456bc
feat(L200): add hvac controls tests
macintoshpie Sep 23, 2020
ae07352
feat(L200): add hvac zone controls test
macintoshpie Sep 23, 2020
89821b3
feat(L200): add BAS tests
macintoshpie Sep 23, 2020
dd42891
feat(L200): tie up remaining HVAC loose ends
macintoshpie Sep 23, 2020
705fe6c
feat(L200): break out EnvelopeSystems test
corymosiman12 Sep 24, 2020
2d791ae
feat(L200): EnvelopeSystems - add test to check Whole Building sectio…
corymosiman12 Sep 24, 2020
ab7af1e
feat(L200): EnvelopeSystems - add test to check a Roof exists as part…
corymosiman12 Sep 24, 2020
a3031f4
feat(L200): EnvelopeSystem - ensure warning fired for each auc:Side n…
corymosiman12 Sep 24, 2020
144bafc
feat(L200): EnvelopeSystem - add assertion if auc:Side has no auc:Wall
corymosiman12 Sep 24, 2020
9d181f2
feat(L200): EnvelopeSystem - ensure foundation exists under section w…
corymosiman12 Sep 24, 2020
daeaf8f
refactor(L200): add predicate for selecting external doors
macintoshpie Sep 24, 2020
20423b9
feat(L200): add excluded section id tests
macintoshpie Sep 24, 2020
3ca7b50
feat(L200): add utility billpayer test
macintoshpie Sep 24, 2020
2f3b068
feat(L200): add occupancy schedule test
macintoshpie Sep 24, 2020
63723ad
feat(L200): add HVAC schedule tests
macintoshpie Sep 24, 2020
5cdcd9b
feat(L200): test overall door to wall ratio
macintoshpie Sep 24, 2020
75f250b
feat(L200): DHW system type
macintoshpie Sep 25, 2020
84091df
feat(L200): add operating conditions and general condition tests
macintoshpie Sep 25, 2020
b4b0914
feat(L200): add lighting tests
macintoshpie Sep 25, 2020
c720a9d
feat(L200): add load and conveyance tests
macintoshpie Sep 25, 2020
6bfcc84
feat(L200): copy L100 historical monthly energy use
macintoshpie Sep 25, 2020
4861065
feat(L200): add peak type test
macintoshpie Sep 25, 2020
bb18b4d
feat(L200): add elec load factor test
macintoshpie Sep 25, 2020
fda4b78
feat(L200): add submetering test
macintoshpie Sep 25, 2020
5460a9e
feat(L200): add initial EEM tests
macintoshpie Sep 25, 2020
fe8eecb
feat(L200): Update IntervalDuration to match dates; Update LoadFactor…
corymosiman12 Sep 28, 2020
f3f4b96
chore: address pr comments on example bsync files
macintoshpie Sep 30, 2020
7b064b5
refactor(L200): don't require Central fan to be linked to duct system
macintoshpie Sep 30, 2020
ba273fc
feat(L200): finish Measure requirements
macintoshpie Sep 30, 2020
20f3e2f
feat(L200): finish EEM tests
macintoshpie Sep 30, 2020
94e2a78
feat(L200): test heating and cooling sources
macintoshpie Sep 30, 2020
484ea72
feat(L200): add checks for heating and cooling source tests
macintoshpie Oct 1, 2020
d5c3ec7
fix(L200): if AirSideEconomizer=None must include EconomizerControl
macintoshpie Oct 2, 2020
a5279af
fix(L200): require Central fan to be linked to Duct
macintoshpie Oct 8, 2020
95ae962
feat(L200): add Section linked System requirements
macintoshpie Oct 8, 2020
91f6824
feat(L200): add submeter requirements
macintoshpie Oct 8, 2020
296b1d6
refactor(L200): add more submeter examples
macintoshpie Oct 8, 2020
6d72a05
Merge branch 'develop' into feat/L200-6.2.1.6
macintoshpie Oct 9, 2020
f8621eb
feat(L200): add capacity requirements for condenser plants
macintoshpie Oct 9, 2020
6d3a4d9
refactor(L200): change plant requirement from output capacity to capa…
macintoshpie Oct 9, 2020
0a83394
feat(L200): require lighting systems to be linked to schedule
macintoshpie Oct 9, 2020
c9f0959
feat(L200): require scenarios linked to building
macintoshpie Oct 13, 2020
ab6c31b
feat: add clean_all arg to CLI tool; enable consistent xml file forma…
corymosiman12 Oct 15, 2020
a4e1cc4
style: run cleanup
corymosiman12 Oct 15, 2020
af97fac
fix: add back content to deleted file, tests passing
corymosiman12 Oct 15, 2020
5197247
fix: doctype declaration in generate_sch function
corymosiman12 Oct 15, 2020
0033e68
refactor(tools): add clean_file to pre-commit
macintoshpie Oct 15, 2020
3ae85f7
chore: delete empty example xml file
macintoshpie Oct 15, 2020
f8dcab0
refactor: add pre-commit to tox
macintoshpie Oct 15, 2020
7159c48
style: fix for pre-commit
macintoshpie Oct 15, 2020
f71903c
Merge pull request #49 from BuildingSync/feat/xml-file-clean
corymosiman12 Oct 15, 2020
66d147c
Merge branch 'develop' into feat/L200-6.2.1.6
corymosiman12 Oct 19, 2020
803b643
Merge branch 'develop' into feat/L200-6.2.1.6
corymosiman12 Oct 19, 2020
1339ae2
style: run clean_all
corymosiman12 Oct 19, 2020
0da60a8
fix: update XSD to v2.2.0 in L200 file
corymosiman12 Oct 19, 2020
af8c8dd
feat(eems): update L200 file measures
corymosiman12 Oct 19, 2020
69e1c2f
fix: remove requirement that every window and door must be linked to …
corymosiman12 Oct 19, 2020
3c5ab04
text(fix): envelope tests passing
corymosiman12 Oct 19, 2020
2b65b4a
Merge pull request #51 from BuildingSync/feat/eems
macintoshpie Oct 20, 2020
a99187d
feat(L200): add AnnualHeatingEfficiency reqs
macintoshpie Oct 21, 2020
ffa31a1
refactor(L200): dont require Capacity for Delivery
macintoshpie Oct 21, 2020
b0bb041
refactor(L200)!: generalize linked delivery for all CentralAirDistrib…
macintoshpie Oct 21, 2020
2cbc6ac
refactor(L200)!: require AnnualFuelUse for submeters
macintoshpie Oct 21, 2020
baedd9e
refactor(L200): change Delivery requirement to XOR
macintoshpie Oct 21, 2020
06c85b5
fix(L200): fix section type in exemplary file
macintoshpie Oct 23, 2020
ca9a4ca
refactor(L200): update fan and pump requirements
macintoshpie Oct 23, 2020
6e234e8
refactor(L200): update section system requirements
macintoshpie Oct 23, 2020
4fb1834
fix(L200): fix exemplary file DHW
macintoshpie Oct 23, 2020
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
65 changes: 65 additions & 0 deletions schematron/v2.2.0/exemplary_files/L200_Audit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,10 @@
</auc:FloorArea>
</auc:FloorAreas>

<auc:TotalExteriorAboveGradeWallArea>123</auc:TotalExteriorAboveGradeWallArea>
<auc:TotalExteriorBelowGradeWallArea>123</auc:TotalExteriorBelowGradeWallArea>
<auc:OverallWindowToWallRatio>0.2</auc:OverallWindowToWallRatio>

macintoshpie marked this conversation as resolved.
Show resolved Hide resolved
<!-- 6.1.1.1.i -->
<auc:YearOfConstruction>1993</auc:YearOfConstruction>
<!-- 6.1.1.1.l (recommended) -->
Expand Down Expand Up @@ -145,6 +149,53 @@

</auc:FloorAreas>
</auc:Section>

<auc:Section>
<auc:SectionType>Whole building</auc:SectionType>
<auc:FootprintShape>Rectangular</auc:FootprintShape>
<auc:Sides>
<auc:Side>
<auc:SideNumber>A1</auc:SideNumber>
<auc:WallIDs>
<auc:WallID IDref="Wall-A">
<auc:WallArea>123</auc:WallArea>
</auc:WallID>
</auc:WallIDs>
</auc:Side>
<auc:Side>
<auc:SideNumber>B1</auc:SideNumber>
<auc:WallIDs>
<auc:WallID IDref="Wall-A">
<auc:WallArea>123</auc:WallArea>
</auc:WallID>
</auc:WallIDs>
</auc:Side>
<auc:Side>
<auc:SideNumber>C1</auc:SideNumber>
<auc:WallIDs>
<auc:WallID IDref="Wall-A">
<auc:WallArea>123</auc:WallArea>
</auc:WallID>
</auc:WallIDs>
</auc:Side>
<auc:Side>
<auc:SideNumber>D1</auc:SideNumber>
<auc:WallIDs>
<auc:WallID IDref="Wall-A">
<auc:WallArea>123</auc:WallArea>
</auc:WallID>
</auc:WallIDs>
</auc:Side>
</auc:Sides>
<auc:Roofs>
<auc:Roof>
<auc:RoofID IDref="Roof-A">
<auc:RoofArea>123</auc:RoofArea>
<auc:RoofCondition>Excellent</auc:RoofCondition>
</auc:RoofID>
</auc:Roof>
</auc:Roofs>
</auc:Section>
</auc:Sections>

</auc:Building>
Expand Down Expand Up @@ -184,6 +235,20 @@
</auc:LightingSystem>
</auc:LightingSystems>

<auc:WallSystems>
<auc:WallSystem ID="Wall-A">
<auc:ExteriorWallConstruction>Concrete poured</auc:ExteriorWallConstruction>
<auc:WallRValue>1</auc:WallRValue>
</auc:WallSystem>
</auc:WallSystems>

<auc:RoofSystems>
<auc:RoofSystem ID="Roof-A">
<auc:RoofConstruction>Wood frame</auc:RoofConstruction>
<auc:RoofRValue>1</auc:RoofRValue>
</auc:RoofSystem>
</auc:RoofSystems>

<auc:PlugLoads>
<!-- 6.1.1.1.g/5.3.4.e (for every space function) -->
<auc:PlugLoad ID="PlugLoad-A">
Expand Down
84 changes: 82 additions & 2 deletions schematron/v2.2.0/tests/test_v2-2-0_L200_Audit.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,51 @@
import os

from lxml import etree
import pytest

from tools.constants import BSYNC_NSMAP
from tools.constants import BSYNC_NSMAP, BSYNC_NS
from tools.validate_sch import validate_schematron

from schematron.conftest import AssertFailureRolesMixin, v2_2_0_SCH_DIR, exemplary_tree
from schematron.conftest import AssertFailureRolesMixin, v2_2_0_SCH_DIR, exemplary_tree, replace_element, remove_element


def qname(tag):
return etree.QName(BSYNC_NS, tag)


sides_by_footprint = {
'Rectangular': ['A1', 'B1', 'C1', 'D1'],
'L-Shape': ['A1', 'B1', 'A2', 'B2', 'C1', 'D1'],
'U-Shape': ['A1', 'B1', 'A2', 'D1', 'A3', 'B2', 'C1', 'D2'],
'T-Shape': ['A1', 'B1', 'C1', 'B2', 'C2', 'D1', 'C3', 'D2'],
'H-Shape': ['A1', 'B1', 'A2', 'D1', 'A3', 'B2', 'C1', 'D2', 'C2', 'B3', 'C3', 'D3'],
'O-Shape': ['A1', 'B1', 'C1', 'D1', 'A2', 'B2', 'C2', 'D2'],
}


def _sides_factory(footprint_shape, wall_id='Wall-A'):
"""
Returns an auc:Sides element containing valid auc:Sides all pointing to the same auc:WallSystem ID
"""

side_names = sides_by_footprint.get(footprint_shape)
if side_names is None:
raise Exception(f'Invalid footprint shape: "{footprint_shape}"')

sides_elem = etree.Element(qname('Sides'), nsmap=BSYNC_NSMAP)
for side_name in side_names:
side_elem = etree.SubElement(sides_elem, qname('Side'), nsmap=BSYNC_NSMAP)

side_num_elem = etree.SubElement(side_elem, qname('SideNumber'), nsmap=BSYNC_NSMAP)
side_num_elem.text = side_name

wall_ids_elem = etree.SubElement(side_elem, qname('WallIDs'), nsmap=BSYNC_NSMAP)
wall_id_elem = etree.SubElement(wall_ids_elem, qname('WallID'), nsmap=BSYNC_NSMAP, IDref=wall_id)

wall_area_elem = etree.SubElement(wall_id_elem, qname('WallArea'), nsmap=BSYNC_NSMAP)
wall_area_elem.text = '123'

return sides_elem


class TestL200Audit(AssertFailureRolesMixin):
Expand Down Expand Up @@ -55,3 +96,42 @@ def test_runs_generation_storage_systems_tests_when_they_exist(self):

# -- Assert
self.assert_failure_messages(failures, {})

@pytest.mark.parametrize("footprint_shape", [
("Rectangular"),
("L-Shape"),
("U-Shape"),
("T-Shape"),
("H-Shape"),
("O-Shape")])
def test_footprint_shape_and_number_of_sides_tests_work_as_expected(self, footprint_shape):
# -- Setup
tree = exemplary_tree('L200_Audit', 'v2.2.0')

# replace auc:FootprintShape and auc:Sides
section_elem = tree.xpath('//auc:Building/auc:Sections/auc:Section[auc:SectionType = "Whole building"]', namespaces=BSYNC_NSMAP)
assert len(section_elem) == 1
section_elem = section_elem[0]

footprint_elem = section_elem.xpath('auc:FootprintShape', namespaces=BSYNC_NSMAP)
assert len(footprint_elem) == 1
footprint_elem = footprint_elem[0]
footprint_elem.text = footprint_shape

replace_element(section_elem, 'auc:Sides', _sides_factory(footprint_shape))

# make sure it's valid with substituted elements
failures = validate_schematron(self.schematron, tree)
self.assert_failure_messages(failures, {})

# remove an auc:Side to make it invalid
remove_element(section_elem, 'auc:Sides/auc:Side[1]')

# -- Act
failures = validate_schematron(self.schematron, tree)

# -- Assert
expected_sides = len(sides_by_footprint[footprint_shape])
self.assert_failure_messages(failures, {
'ERROR': [f'Incorrect number of auc:Side elements for footprint shape "{footprint_shape}" (found {expected_sides - 1})']
})
24 changes: 23 additions & 1 deletion schematron/v2.2.0/v2-2-0_L200_Audit.csv
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,26 @@
"","","","","","/auc:BuildingSync/auc:Facilities/auc:Facility/auc:Systems/auc:OnsiteStorageTransmissionGenerationSystems/auc:OnsiteStorageTransmissionGenerationSystem/auc:EnergyConversionType/auc:Generation/auc:OnsiteGenerationType/auc:Other","false","","","auc:OtherEnergyGenerationTechnology","","",""
"","","","","","","","","","auc:OutputResourceType","","",""
"","","","","","/auc:BuildingSync/auc:Facilities/auc:Facility/auc:Systems/auc:OnsiteStorageTransmissionGenerationSystems/auc:OnsiteStorageTransmissionGenerationSystem[auc:EnergyConversionType/auc:Storage/auc:EnergyStorageTechnology]","false","","","auc:Capacity","","",""
"","","","","","","","","","auc:CapacityUnits","","",""
"","","","","","","","","","auc:CapacityUnits","","",""
"Building Envelope","ASHRAE 211 6.2.1.2","Roof","ASHRAE 211 6.2.1.2 (a)","","/auc:BuildingSync/auc:Facilities/auc:Facility/auc:Systems/auc:RoofSystems/auc:RoofSystem","true","","","auc:RoofConstruction","","",""
"","","","","","","","","","auc:RoofRValue or auc:RoofUFactor","","",""
"","","","","","/auc:BuildingSync/auc:Facilities/auc:Facility/auc:Sites/auc:Site/auc:Buildings/auc:Building/auc:Sections/auc:Section[auc:SectionType = ""Whole building""]/auc:Roofs/auc:Roof","true","","","//auc:RoofSystem[@ID = current()/auc:RoofID/@IDref]","Every auc:RoofID within auc:SectionType of ""Whole building"" must link to a valid auc:RoofSystem's ID","",""
"","","","","","","","","","auc:RoofID/auc:RoofArea","","",""
"","","","","","","","","","auc:RoofID/auc:RoofCondition","","",""
"","","Walls - General Requirements","ASHRAE 211 6.2.1.2 (b)","","/auc:BuildingSync/auc:Facilities/auc:Facility/auc:Sites/auc:Site/auc:Buildings/auc:Building","true","","","auc:TotalExteriorAboveGradeWallArea","","",""
"","","","","","","","","","auc:TotalExteriorBelowGradeWallArea","","",""
"","","","","","","","","","auc:OverallWindowToWallRatio","","",""
"","","","","","/auc:BuildingSync/auc:Facilities/auc:Facility/auc:Systems/auc:WallSystems/auc:WallSystem","true","","","auc:ExteriorWallConstruction","","",""
"","","","","","","","","","auc:WallRValue or auc:WallUFactor","","",""
"","","","","","/auc:BuildingSync/auc:Facilities/auc:Facility/auc:Sites/auc:Site/auc:Buildings/auc:Building/auc:Sections/auc:Section[auc:SectionType/text() = ""Whole building""]","true","","","auc:FootprintShape","","",""
"","","Walls - Building Sides","","","/auc:BuildingSync/auc:Facilities/auc:Facility/auc:Sites/auc:Site/auc:Buildings/auc:Building/auc:Sections/auc:Section[auc:SectionType/text() = ""Whole building"" and auc:FootprintShape/text() = 'Other']","false","","","auc:NumberOfSides","Must provide auc:NumberOfSides if auc:FootprintShape is Other","",""
"","","","","","","","","","auc:NumberOfSides = count(auc:Sides/auc:Side)","","",""
"","","","","","/auc:BuildingSync/auc:Facilities/auc:Facility/auc:Sites/auc:Site/auc:Buildings/auc:Building/auc:Sections/auc:Section[auc:SectionType/text() = ""Whole building"" and auc:FootprintShape/text() = 'Rectangular']","false","","","count(auc:Sides/auc:Side) = 4","Incorrect number of auc:Side elements for footprint shape ""Rectangular"" (found <value-of select=""count(auc:Sides/auc:Side)""/>)","",""
"","","","","","/auc:BuildingSync/auc:Facilities/auc:Facility/auc:Sites/auc:Site/auc:Buildings/auc:Building/auc:Sections/auc:Section[auc:SectionType/text() = ""Whole building"" and auc:FootprintShape/text() = 'L-Shape']","false","","","count(auc:Sides/auc:Side) = 6","Incorrect number of auc:Side elements for footprint shape ""L-Shape"" (found <value-of select=""count(auc:Sides/auc:Side)""/>)","",""
"","","","","","/auc:BuildingSync/auc:Facilities/auc:Facility/auc:Sites/auc:Site/auc:Buildings/auc:Building/auc:Sections/auc:Section[auc:SectionType/text() = ""Whole building"" and auc:FootprintShape/text() = 'U-Shape']","false","","","count(auc:Sides/auc:Side) = 8","Incorrect number of auc:Side elements for footprint shape ""U-Shape"" (found <value-of select=""count(auc:Sides/auc:Side)""/>)","",""
"","","","","","/auc:BuildingSync/auc:Facilities/auc:Facility/auc:Sites/auc:Site/auc:Buildings/auc:Building/auc:Sections/auc:Section[auc:SectionType/text() = ""Whole building"" and auc:FootprintShape/text() = 'T-Shape']","false","","","count(auc:Sides/auc:Side) = 8","Incorrect number of auc:Side elements for footprint shape ""T-Shape"" (found <value-of select=""count(auc:Sides/auc:Side)""/>)","",""
"","","","","","/auc:BuildingSync/auc:Facilities/auc:Facility/auc:Sites/auc:Site/auc:Buildings/auc:Building/auc:Sections/auc:Section[auc:SectionType/text() = ""Whole building"" and auc:FootprintShape/text() = 'H-Shape']","false","","","count(auc:Sides/auc:Side) = 12","Incorrect number of auc:Side elements for footprint shape ""H-Shape"" (found <value-of select=""count(auc:Sides/auc:Side)""/>)","",""
"","","","","","/auc:BuildingSync/auc:Facilities/auc:Facility/auc:Sites/auc:Site/auc:Buildings/auc:Building/auc:Sections/auc:Section[auc:SectionType/text() = ""Whole building"" and auc:FootprintShape/text() = 'O-Shape']","false","","","count(auc:Sides/auc:Side) = 8","Incorrect number of auc:Side elements for footprint shape ""O-Shape"" (found <value-of select=""count(auc:Sides/auc:Side)""/>)","",""
"","","","","","/auc:BuildingSync/auc:Facilities/auc:Facility/auc:Sites/auc:Site/auc:Buildings/auc:Building/auc:Sections/auc:Section[auc:SectionType/text() = ""Whole building""]/auc:Sides/auc:Side","true","","","auc:WallIDs","","",""
corymosiman12 marked this conversation as resolved.
Show resolved Hide resolved
"","","","","","/auc:BuildingSync/auc:Facilities/auc:Facility/auc:Sites/auc:Site/auc:Buildings/auc:Building/auc:Sections/auc:Section[auc:SectionType/text() = ""Whole building""]/auc:Sides/auc:Side/auc:WallIDs/auc:WallID","true","","","//auc:WallSystem[@ID = current()/@IDref]","auc:WallID in auc:Side should link to an auc:WallSystem's ID","",""
"","","","","","","","","","auc:WallArea","","",""
Loading