Warning
This model has not been updated since the last revision of the 223P ontology, and it may not pass validation. 223P was last updated on 2025-06-24 17:37:14. The model file was last updated on 2024-09-14 12:12:25
PNNL Example Building 1 Model 2#
Example Building 1 is a simplistic, reference tiny office building consisting of a single story with 5 rooms spanning 5 space types.
This reference building was developed for and first described in the journal article “Metadata Schemas and Ontologies for Building Energy Applications: A Critical Review and Use Case Analysis”.
Example Building 1 Model 2 is provided by Pacific Northwest National Laboratory. See NIST Example Building 1 Model 1 for a different modeling approach for the same building.
Schematic view#
Contents#
This model contains a representation of the building architecture and electrical/lighting system.
In addition to the s223 ontology, the model uses the Real Estate Core ontology to describe space types. The Real Estate Core ontology is extended by defining 2 subclasses for rec:Office.
recx:OpenOffice rdfs:subClassOf rec:Office;
rdfs:label "Open Office".
recx:PrivateOffice rdfs:subClassOf rec:Office;
rdfs:label "Private Office".
Source#
The model was created from source data consisting of a building information model (BIM) created using Autodesk Revit, and exported via a Speckle interface.
Speckle view of rooms and lighting fixtures#
Model instance data have a prefix that is resolvable to a Speckle URL.
@prefix bdg1: <http://speckle.xyz/streams/59e5e3c6a8/objects/>
For example, the following luminaire resolves to http://speckle.xyz/streams/59e5e3c6a8/objects/e2164e3d14db5fcb6915a4a2c8474579 :
bdg1:e2164e3d14db5fcb6915a4a2c8474579 a s223:Luminaire
Downloads#
What are these files?
Turtle file (original): This is the original source Turtle file that was provided to
models.open223.info
, usually as the output of some model creation tool.Turtle file (compiled): This is the original Turtle file with all inferred relationships and values added through SHACL inference against the 223P ontology and other dependencies. You should use this file for any further processing. It does not contain any of the ontologies.
Turtle file (with all imports): This is the compiled Turtle file with all imports included in the file (223P ontology, QUDT ontology, and others). This is helpful when you do not want to deal with downloading and managing ontology dependencies. It is also much larger than the compiled file.
JSON-LD file (original): This is the original Turtle file converted to the JSON-LD format.
Turtle is a syntax for RDF (Resource Description Framework) that is easy to read and write. It is a popular format for representing linked data. Parsers and serializers are available in many programming languages. JSON-LD is a JSON-based format for linked data that is easy to use with JavaScript and other web technologies.
Queries#
Description |
Query URL |
---|---|
Select all triples from model. |
Model Components#
Parent Class |
Class |
Instances |
---|---|---|
12 |
||
6 |
||
2 |
||
14 |
||
26 |
||
26 |
||
12 |
||
8 |
||
23 |
||
6 |
Load and Validate Model#
This code uses the BuildingMOTIF library to load the 223P ontology and the model file into a temporary in-memory instance. It then validates the model against the ontology. If the model is invalid, it will print the validation report.
To run this code, you need to have Java installed on your system. If you do not have Java installed, you can remove the shacl_engine='topquadrant'
parameter from the BuildingMOTIF
constructor.
Be warned that without the shacl_engine='topquadrant'
parameter, the validation process will be slower.
Note
BuildingMOTIF installation
To install the buildingmotif
library, you can use the following command:
pip install 'buildingmotif[topquadrant] @ git+https://github.com/NREL/buildingmotif.git@develop'
If you do not have Java installed, you can use the following command to install the library:
pip install 'buildingmotif @ git+https://github.com/NREL/buildingmotif.git@develop'
from buildingmotif import BuildingMOTIF
from buildingmotif.dataclasses import Library, Model
import ontoenv
import logging
# Create a BuildingMOTIF object. If you do not have Java installed, remove the "shacl_engine" parameter
bm = BuildingMOTIF('sqlite://', shacl_engine='topquadrant', log_level=logging.ERROR)
# load 223P library. We will load a recent copy from the models.open223.info
# git repository; later, we will load this from the location of the actual standard
s223 = Library.load(ontology_graph="https://open223.info/223p.ttl")
unit = Library.load(ontology_graph="http://qudt.org/3.1.1/vocab/unit")
quantitykind = Library.load(ontology_graph="http://qudt.org/3.1.1/vocab/quantitykind")
# load the model into the BuildingMOTIF instance
model = Model.create("urn:pnnl-bdg1-2")
model.graph.parse("https://models.open223.info/pnnl-bdg1-2.ttl")
# validate the model against 223P ontology
ctx = model.validate([s223.get_shape_collection(),
unit.get_shape_collection(),
quantitykind.get_shape_collection()],
error_on_missing_imports=False)
# print the validation result
print(f"Model is valid: {ctx.valid}")
# if the model is invalid, print the validation report
if not ctx.valid:
print(ctx.report_string[:1000]) # first 1000 characters of the report
# BuildingMOTIF can also interpret the report to provide recommendations on fixes
for focus_node, diffs in ctx.get_reasons_with_severity("Violation").items():
if len(diffs) == 0:
continue
print(focus_node)
for diff in diffs:
print(" - " + diff.reason())
Model is valid: 0
@prefix ns2: <http://data.ashrae.org/standard223#> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
[] a sh:ValidationReport ;
sh:conforms false ;
sh:result [ a sh:ValidationResult ;
sh:focusNode <urn:anon:hash:8831795277718232770.19> ;
sh:resultMessage "s223: `ConnectionPoint` <urn:anon:hash:8831795277718232770.19> probably needs an association with a `Connection`, or use of `hasOptionalConnectionPoint` or `hasBoundaryConnectionPoint` qualifiers." ;
sh:resultPath ns2:connectsThrough ;
sh:resultSeverity sh:Info ;
sh:sourceConstraint _:nc7a9c85352644bab841a25b824365b45b4 ;
sh:sourceConstraintComponent sh:SPARQLConstraintComponent ;
sh:sourceShape <urn:well-known/a6b04d81> ],
[ a sh:ValidationResult ;
sh:focusNode <urn:anon:hash:8831795277718232770.20> ;
sh:resultMessage "s223: `ConnectionPoint` <urn:anon:hash:8831795
http://speckle.xyz/streams/59e5e3c6a8/objects/bd58478e25040be5137eeed1f1e2f622
- http://speckle.xyz/streams/59e5e3c6a8/objects/8aa694885f0bc783d007c24a0a81c3b4 on http://speckle.xyz/streams/59e5e3c6a8/objects/bd58478e25040be5137eeed1f1e2f622 needs to be a http://data.ashrae.org/standard223#PhysicalSpace
- http://speckle.xyz/streams/59e5e3c6a8/objects/1157c123ff14a75b9beadab2f8c0180f on http://speckle.xyz/streams/59e5e3c6a8/objects/bd58478e25040be5137eeed1f1e2f622 needs to be a http://data.ashrae.org/standard223#PhysicalSpace
- http://speckle.xyz/streams/59e5e3c6a8/objects/73dd5a752ff6dd1b77b259564949bc98 on http://speckle.xyz/streams/59e5e3c6a8/objects/bd58478e25040be5137eeed1f1e2f622 needs to be a http://data.ashrae.org/standard223#PhysicalSpace
- http://speckle.xyz/streams/59e5e3c6a8/objects/3ec4d54f9cd50310bd26d2bbb594b11d on http://speckle.xyz/streams/59e5e3c6a8/objects/bd58478e25040be5137eeed1f1e2f622 needs to be a http://data.ashrae.org/standard223#PhysicalSpace
- http://speckle.xyz/streams/59e5e3c6a8/objects/f9e99ac2c98b799f695df5c1e1aca159 on http://speckle.xyz/streams/59e5e3c6a8/objects/bd58478e25040be5137eeed1f1e2f622 needs to be a http://data.ashrae.org/standard223#PhysicalSpace
http://speckle.xyz/streams/59e5e3c6a8/objects/d35dfa3a711c8827da4ebe2c6c4daeaf
- http://speckle.xyz/streams/59e5e3c6a8/objects/1157c123ff14a75b9beadab2f8c0180f on http://speckle.xyz/streams/59e5e3c6a8/objects/d35dfa3a711c8827da4ebe2c6c4daeaf needs to be a http://data.ashrae.org/standard223#PhysicalSpace
http://speckle.xyz/streams/59e5e3c6a8/objects/c01317fdfcfe26384d44f515b3dd2400
- http://speckle.xyz/streams/59e5e3c6a8/objects/1157c123ff14a75b9beadab2f8c0180f on http://speckle.xyz/streams/59e5e3c6a8/objects/c01317fdfcfe26384d44f515b3dd2400 needs to be a http://data.ashrae.org/standard223#PhysicalSpace
http://speckle.xyz/streams/59e5e3c6a8/objects/82310afe7be18795e744d3829d8c5b02
- http://speckle.xyz/streams/59e5e3c6a8/objects/73dd5a752ff6dd1b77b259564949bc98 on http://speckle.xyz/streams/59e5e3c6a8/objects/82310afe7be18795e744d3829d8c5b02 needs to be a http://data.ashrae.org/standard223#PhysicalSpace
http://speckle.xyz/streams/59e5e3c6a8/objects/6b94d2f45496e556bbfe5020cd805a56
- http://speckle.xyz/streams/59e5e3c6a8/objects/73dd5a752ff6dd1b77b259564949bc98 on http://speckle.xyz/streams/59e5e3c6a8/objects/6b94d2f45496e556bbfe5020cd805a56 needs to be a http://data.ashrae.org/standard223#PhysicalSpace
http://speckle.xyz/streams/59e5e3c6a8/objects/83a72b8eb42e0a6295fcccd3b21ff40e
- http://speckle.xyz/streams/59e5e3c6a8/objects/3ec4d54f9cd50310bd26d2bbb594b11d on http://speckle.xyz/streams/59e5e3c6a8/objects/83a72b8eb42e0a6295fcccd3b21ff40e needs to be a http://data.ashrae.org/standard223#PhysicalSpace
http://speckle.xyz/streams/59e5e3c6a8/objects/87dfeb5fa9182df28ee465465f416594
- http://speckle.xyz/streams/59e5e3c6a8/objects/3ec4d54f9cd50310bd26d2bbb594b11d on http://speckle.xyz/streams/59e5e3c6a8/objects/87dfeb5fa9182df28ee465465f416594 needs to be a http://data.ashrae.org/standard223#PhysicalSpace
http://speckle.xyz/streams/59e5e3c6a8/objects/11c04c42e073d0d0b9c2a00aadf4901b
- http://speckle.xyz/streams/59e5e3c6a8/objects/11c04c42e073d0d0b9c2a00aadf4901b expected 1 instance(s) of ns2:Connectable on path ns2:isConnectionPointOf
http://speckle.xyz/streams/59e5e3c6a8/objects/4ea70f2ce314f6256af73903cd711f94
- http://speckle.xyz/streams/59e5e3c6a8/objects/8aa694885f0bc783d007c24a0a81c3b4 on http://speckle.xyz/streams/59e5e3c6a8/objects/4ea70f2ce314f6256af73903cd711f94 needs to be a http://data.ashrae.org/standard223#PhysicalSpace
http://speckle.xyz/streams/59e5e3c6a8/objects/27967fc224f4ffd94032c8a851862769
- http://speckle.xyz/streams/59e5e3c6a8/objects/f9e99ac2c98b799f695df5c1e1aca159 on http://speckle.xyz/streams/59e5e3c6a8/objects/27967fc224f4ffd94032c8a851862769 needs to be a http://data.ashrae.org/standard223#PhysicalSpace
http://speckle.xyz/streams/59e5e3c6a8/objects/44531f11cb0626bac97aa43d6732fdf2
- http://speckle.xyz/streams/59e5e3c6a8/objects/44531f11cb0626bac97aa43d6732fdf2 expected 1 instance(s) of ns2:Connectable on path ns2:isConnectionPointOf
http://speckle.xyz/streams/59e5e3c6a8/objects/7ce038437255ca97816f40fafc85d5e5
- http://speckle.xyz/streams/59e5e3c6a8/objects/73dd5a752ff6dd1b77b259564949bc98 on http://speckle.xyz/streams/59e5e3c6a8/objects/7ce038437255ca97816f40fafc85d5e5 needs to be a http://data.ashrae.org/standard223#PhysicalSpace
http://speckle.xyz/streams/59e5e3c6a8/objects/9db8a11163a3cf15cdf724157a148128
- http://speckle.xyz/streams/59e5e3c6a8/objects/73dd5a752ff6dd1b77b259564949bc98 on http://speckle.xyz/streams/59e5e3c6a8/objects/9db8a11163a3cf15cdf724157a148128 needs to be a http://data.ashrae.org/standard223#PhysicalSpace
http://speckle.xyz/streams/59e5e3c6a8/objects/d0c443539805854ca2e06d22972810cb
- http://speckle.xyz/streams/59e5e3c6a8/objects/73dd5a752ff6dd1b77b259564949bc98 on http://speckle.xyz/streams/59e5e3c6a8/objects/d0c443539805854ca2e06d22972810cb needs to be a http://data.ashrae.org/standard223#PhysicalSpace
http://speckle.xyz/streams/59e5e3c6a8/objects/98b4ba93290fb58ad5c44f8c47df60db
- http://speckle.xyz/streams/59e5e3c6a8/objects/1157c123ff14a75b9beadab2f8c0180f on http://speckle.xyz/streams/59e5e3c6a8/objects/98b4ba93290fb58ad5c44f8c47df60db needs to be a http://data.ashrae.org/standard223#PhysicalSpace
http://speckle.xyz/streams/59e5e3c6a8/objects/69a3c94b6051eef9648c4a51b61fef2d
- http://speckle.xyz/streams/59e5e3c6a8/objects/3ec4d54f9cd50310bd26d2bbb594b11d on http://speckle.xyz/streams/59e5e3c6a8/objects/69a3c94b6051eef9648c4a51b61fef2d needs to be a http://data.ashrae.org/standard223#PhysicalSpace
http://speckle.xyz/streams/59e5e3c6a8/objects/e2164e3d14db5fcb6915a4a2c8474579
- http://speckle.xyz/streams/59e5e3c6a8/objects/73dd5a752ff6dd1b77b259564949bc98 on http://speckle.xyz/streams/59e5e3c6a8/objects/e2164e3d14db5fcb6915a4a2c8474579 needs to be a http://data.ashrae.org/standard223#PhysicalSpace
http://speckle.xyz/streams/59e5e3c6a8/objects/989a49980114d3ad1b7cd8174b4fbb3e
- http://speckle.xyz/streams/59e5e3c6a8/objects/8aa694885f0bc783d007c24a0a81c3b4 on http://speckle.xyz/streams/59e5e3c6a8/objects/989a49980114d3ad1b7cd8174b4fbb3e needs to be a http://data.ashrae.org/standard223#PhysicalSpace
http://speckle.xyz/streams/59e5e3c6a8/objects/0afb7c8e9477410024492f1cf1a1cbd4
- http://speckle.xyz/streams/59e5e3c6a8/objects/8aa694885f0bc783d007c24a0a81c3b4 on http://speckle.xyz/streams/59e5e3c6a8/objects/0afb7c8e9477410024492f1cf1a1cbd4 needs to be a http://data.ashrae.org/standard223#PhysicalSpace
http://speckle.xyz/streams/59e5e3c6a8/objects/623d78727293db6754a53c99d74131fb
- http://speckle.xyz/streams/59e5e3c6a8/objects/f9e99ac2c98b799f695df5c1e1aca159 on http://speckle.xyz/streams/59e5e3c6a8/objects/623d78727293db6754a53c99d74131fb needs to be a http://data.ashrae.org/standard223#PhysicalSpace
http://speckle.xyz/streams/59e5e3c6a8/objects/2369b84e845898237f185679a49455f3
- http://speckle.xyz/streams/59e5e3c6a8/objects/f9e99ac2c98b799f695df5c1e1aca159 on http://speckle.xyz/streams/59e5e3c6a8/objects/2369b84e845898237f185679a49455f3 needs to be a http://data.ashrae.org/standard223#PhysicalSpace