Skip to content

Commit

Permalink
Merge pull request #487 from BuildingSync/feat/update-examples-to-2.5
Browse files Browse the repository at this point in the history
Update examples to 2.5
  • Loading branch information
JieXiong9119 committed Sep 29, 2023
2 parents 595a130 + e4b19f2 commit 5717f66
Show file tree
Hide file tree
Showing 28 changed files with 101 additions and 105 deletions.
8 changes: 4 additions & 4 deletions docs/notebooks/bsync_examples/Primary-School-Levels1-2.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ This notebook uses resources from:

- the [DOE Commercial Prorotype buildings](https://www.energycodes.gov/prototype-building-models) repository
- ASHRAE [Standard 211](https://www.ashrae.org/technical-resources/bookstore/standards-180-and-211) for formal guidelines on energy audits
- the [BuildingSync schema documentation](https://buildingsync.net/dictionary/2.4.0/)
- the [BuildingSync schema documentation](https://buildingsync.net/dictionary/2.5.0/)
- the [notebook included in the bsync examples folder](./Small-Office-Level-1.md) for a comprehensive explanation on basic BuildingSync and bsyncpy concepts

## 3. Overview
Expand All @@ -27,7 +27,7 @@ This notebook is broken down into the following sections:

3) Adding the information required for a Level 2 energy audit

4) Generating a BuildingSync file and verifying it against version 2.4.0 of the BuildingSync schema
4) Generating a BuildingSync file and verifying it against version 2.5.0 of the BuildingSync schema


But first, let us import the required libraries and set up some useful functions:
Expand All @@ -52,7 +52,7 @@ def bsync_dump(root_element, file="example1.xml"):


# Have to manually set the version right now. Align release of bsyncpy to this version.
as_etree.set("version", "2.4.0")
as_etree.set("version", "2.5.0")
output = etree.tostring(as_etree, doctype=doctype, pretty_print=True)
with open(file, 'wb+') as f:
f.write(output)
Expand Down Expand Up @@ -8604,7 +8604,7 @@ led_measure += bsync.Recommended(True)
led_measure += bsync.MeasureScaleOfApplication("Entire building")
led_measure += bsync.MeasureMaterialCost(7960.)# 63691 Watts using 32W T8 lights = 1990 tubes to replace @ approx. $100/case of 25 LED bulb
led_measure += bsync.MeasureInstallationCost(995.) # $30/hour labor, assuming 1 minute to replace each bulb
led_measure += bsync.UsefulLife(15.)
led_measure += bsync.UsefulLife(15)

```

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<BuildingSync xmlns="http://buildingsync.net/schemas/bedes-auc/2019" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://buildingsync.net/schemas/bedes-auc/2019 ../BuildingSync.xsd" version="2.4.0">
<BuildingSync xmlns="http://buildingsync.net/schemas/bedes-auc/2019" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://buildingsync.net/schemas/bedes-auc/2019 ../../../BuildingSync.xsd" version="2.5.0">
<Facilities>
<Facility ID="Facility-1">
<Sites>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<BuildingSync xmlns="http://buildingsync.net/schemas/bedes-auc/2019" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://buildingsync.net/schemas/bedes-auc/2019 ../BuildingSync.xsd" version="2.4.0">
<BuildingSync xmlns="http://buildingsync.net/schemas/bedes-auc/2019" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://buildingsync.net/schemas/bedes-auc/2019 ../../../BuildingSync.xsd" version="2.5.0">
<Facilities>
<Facility ID="Facility-1">
<Sites>
Expand Down Expand Up @@ -9897,7 +9897,7 @@
</TechnologyCategories>
<MeasureScaleOfApplication>Entire building</MeasureScaleOfApplication>
<LongDescription>This measure is designed to replace all fluorescent bulbs with LEDs</LongDescription>
<UsefulLife>15.000000</UsefulLife>
<UsefulLife>15</UsefulLife>
<MeasureInstallationCost>995.000000</MeasureInstallationCost>
<MeasureMaterialCost>7960.000000</MeasureMaterialCost>
<Recommended>true</Recommended>
Expand Down
4 changes: 2 additions & 2 deletions docs/notebooks/bsync_examples/Small-Office-Level-1.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ By the end of this notebook, you should:
- Create a minimum viable Level 1 BuildingSync document and verify it validates using the [BuildingSync Use Case Validator](https://buildingsync.net/validator)

## For Reference: Core Concepts and Notation Used
- We will be using BuildingSync version 2.4.0. [Documentation](https://buildingsync.net/documentation/2.4.0). [Github release](https://github.com/BuildingSync/schema/releases/tag/v2.4.0).
- We will be using BuildingSync version 2.5.0. [Documentation](https://buildingsync.net/documentation/2.5.0). [Github release](https://github.com/BuildingSync/schema/releases/tag/v2.5.0).
- BuildingSync is an XML Schema Document (XSD). It defines intended structure. Referring to something as a BuildingSync document typically means the document is intended to conform to the BuildingSync schema.
- An XSD defines a hierarchical or tree-based schema, where elements are 'nested' within other elements. An XML document then looks like nested elements within one another. Similar to HTML, it uses angle brackets `<` and `>` to open and close an element tag. The example below provides a very simple example of an XML document:
```xml
Expand Down Expand Up @@ -49,7 +49,7 @@ def bsync_dump(root_element, file="example1.xml"):
as_etree = root_element.toxml()
# Have to manually set the declaration header right now
as_etree.set("xmlns", "http://buildingsync.net/schemas/bedes-auc/2019")
as_etree.set("version", "2.4.0")
as_etree.set("version", "2.5.0")
output = etree.tostring(as_etree, doctype=doctype, pretty_print=True)
with open(file, "wb+") as f:
f.write(output)
Expand Down
10 changes: 5 additions & 5 deletions docs/notebooks/bsync_examples/Small-Office-Level-2.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ By the end of this notebook, you should:
- Create a minimum viable Level 2 BuildingSync document and verify it validates using the [BuildingSync Use Case Validator](https://buildingsync.net/validator)

## For Reference: Core Concepts and Notation Used
- We will be using BuildingSync version 2.4.0. [Documentation](https://buildingsync.net/documentation/2.4.0). [Github release](https://github.com/BuildingSync/schema/releases/tag/v2.4.0).
- We will be using BuildingSync version 2.5.0. [Documentation](https://buildingsync.net/documentation/2.5.0). [Github release](https://github.com/BuildingSync/schema/releases/tag/v2.5.0).
- BuildingSync is an XML Schema Document (XSD). It defines intended structure. Referring to something as a BuildingSync document typically means the document is intended to conform to the BuildingSync schema.
- An XSD defines a hierarchical or tree-based schema, where elements are 'nested' within other elements. An XML document then looks like nested elements within one another. Similar to HTML, it uses angle brackets `<` and `>` to open and close an element tag. The example below provides a very simple example of an XML document:
```xml
Expand Down Expand Up @@ -51,7 +51,7 @@ def bsync_dump(root_element, file="example1.xml"):
as_etree = root_element.toxml()
# Have to manually set the declaration header right now
as_etree.set("xmlns", "http://buildingsync.net/schemas/bedes-auc/2019")
as_etree.set("version", "2.4.0")
as_etree.set("version", "2.5.0")
output = etree.tostring(as_etree, doctype=doctype, pretty_print=True)
with open(file, "wb+") as f:
f.write(output)
Expand Down Expand Up @@ -2009,7 +2009,7 @@ hvac_schedule_measure = bsync.Measure(
bsync.CustomMeasureName("Update HVAC schedule"),
bsync.LongDescription("The current HVAC schedule is set to be at fully ON fan operation during weekday from 7am - 8pm. This measure would implement a modified schedule to enable pre-cooling/pre-heating from 6am - 7am, and reduce output to 80 percent during peak time 12pm - 1pm."),
bsync.MeasureScaleOfApplication("Individual system"),
bsync.UsefulLife(1.),
bsync.UsefulLife(1),
bsync.MeasureInstallationCost(0.),
bsync.MeasureMaterialCost(0.),
bsync.StartDate(date(2021,1,1)),
Expand Down Expand Up @@ -2038,7 +2038,7 @@ led_measure = bsync.Measure(
),
bsync.LongDescription("This measure is designed to replace all fluorescent bulbs with LEDs"),
bsync.MeasureScaleOfApplication("Individual system"),
bsync.UsefulLife(1.),
bsync.UsefulLife(1),
bsync.MeasureInstallationCost(50.),
bsync.MeasureMaterialCost(774.),
bsync.StartDate(date(2021,1,1)),
Expand Down Expand Up @@ -2072,7 +2072,7 @@ vsd_measure = bsync.Measure(
),
bsync.LongDescription("This measure is designed to retrofit all RTU fans with a VSD"),
bsync.MeasureScaleOfApplication("Individual system"),
bsync.UsefulLife(1.),
bsync.UsefulLife(1),
bsync.MeasureInstallationCost(750.),
bsync.MeasureMaterialCost(1250.), # assume $200~300 per fan
bsync.StartDate(date(2021,1,1)),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<BuildingSync xmlns="http://buildingsync.net/schemas/bedes-auc/2019"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://buildingsync.net/schemas/bedes-auc/2019 ../../../BuildingSync.xsd"
version="2.4.0">
version="2.5.0">
<Facilities>
<Facility ID="Facility-1">
<Sites>
Expand Down
6 changes: 3 additions & 3 deletions docs/notebooks/bsync_examples/example-smalloffice-level2.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<BuildingSync xmlns="http://buildingsync.net/schemas/bedes-auc/2019"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://buildingsync.net/schemas/bedes-auc/2019 ../../../BuildingSync.xsd"
version="2.4.0">
version="2.5.0">
<Facilities>
<Facility ID="Facility-1">
<Sites>
Expand Down Expand Up @@ -1405,7 +1405,7 @@
</TechnologyCategories>
<MeasureScaleOfApplication>Individual system</MeasureScaleOfApplication>
<LongDescription>This measure is designed to replace all fluorescent bulbs with LEDs</LongDescription>
<UsefulLife>1.000000</UsefulLife>
<UsefulLife>1</UsefulLife>
<MeasureInstallationCost>50.000000</MeasureInstallationCost>
<MeasureMaterialCost>774.000000</MeasureMaterialCost>
<Recommended>true</Recommended>
Expand All @@ -1431,7 +1431,7 @@
</TechnologyCategories>
<MeasureScaleOfApplication>Individual system</MeasureScaleOfApplication>
<LongDescription>This measure is designed to retrofit all RTU fans with a VSD</LongDescription>
<UsefulLife>1.000000</UsefulLife>
<UsefulLife>1</UsefulLife>
<MeasureInstallationCost>750.000000</MeasureInstallationCost>
<MeasureMaterialCost>1250.000000</MeasureMaterialCost>
<Recommended>true</Recommended>
Expand Down
Loading

0 comments on commit 5717f66

Please sign in to comment.