Skip to content

Commit

Permalink
fixing model_correction file
Browse files Browse the repository at this point in the history
  • Loading branch information
gtfierro committed May 13, 2024
1 parent c76c478 commit 29835a6
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 16 deletions.
5 changes: 4 additions & 1 deletion docs/tutorials/model_correction.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Currently, libraries in `../../buildingmotif/libraries/` are *included* and libr
```{code-cell}
from rdflib import Namespace, URIRef
from buildingmotif import BuildingMOTIF
from buildingmotif.dataclasses import Model, Library
from buildingmotif.dataclasses import Model, Library, Template
from buildingmotif.namespaces import BRICK, RDF # import this to make writing URIs easier
# in-memory instance
Expand Down Expand Up @@ -145,6 +145,9 @@ for templ in generated_templates.get_templates():
param: BLDG[ahu_name + suffix],
}
thing = templ.evaluate(bindings)
if isinstance(thing, Template):
# there might be other parameters on a template. Invent names for them
_, thing = thing.fill(BLDG)
model.add_graph(thing)
```

Expand Down
3 changes: 2 additions & 1 deletion docs/tutorials/tutorial1_manifest.ttl
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@

@prefix brick: <https://brickschema.org/schema/Brick#> .
@prefix constraint: <https://nrel.gov/BuildingMOTIF/constraints#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix constraint: <https://nrel.gov/BuildingMOTIF/constraints#> .
@prefix : <urn:my_site_constraints/> .

: a owl:Ontology ;
Expand Down
30 changes: 16 additions & 14 deletions docs/tutorials/tutorial3_model.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
<urn:bldg/Core_ZN-PSC_AC-Damper>,
<urn:bldg/Core_ZN-PSC_AC-Fan>,
<urn:bldg/Core_ZN-PSC_AC-Htg_Coil>,
<urn:bldg/Core_ZN-PSC_AC-OutsideDamper> ;
<urn:bldg/Core_ZN-PSC_AC-OutsideDamper>,
<urn:bldg/name_fbe04c78> ;
brick:hasPoint <urn:bldg/Core_ZN-PSC_AC-CCmd>,
<urn:bldg/Core_ZN-PSC_AC-FilterDPS>,
<urn:bldg/Core_ZN-PSC_AC-HCmd>,
Expand All @@ -20,26 +21,14 @@
<urn:bldg/Core_ZN-PSC_AC-SAT>,
<urn:bldg/zone-temp> .

bldg:A1 a brick:Air_Handler_Unit .
bldg:Core_ZN-PSC_AC a brick:Air_Handler_Unit .

<urn:bldg/Core_ZN-PSC_AC-CCmd> a brick:Cooling_Command .

<urn:bldg/Core_ZN-PSC_AC-Clg_Coil> a brick:Cooling_Coil .

<urn:bldg/Core_ZN-PSC_AC-Damper> a brick:Damper .

<urn:bldg/Core_ZN-PSC_AC-Fan> a brick:Supply_Fan,
vav48:sa-fan ;
brick:hasPoint <urn:bldg/Core_ZN-PSC_AC-Fan-Freq>,
<urn:bldg/Core_ZN-PSC_AC-Fan-StartStop>,
<urn:bldg/Core_ZN-PSC_AC-Fan-Sts> .

<urn:bldg/Core_ZN-PSC_AC-Fan-Freq> a brick:Frequency_Command .

<urn:bldg/Core_ZN-PSC_AC-Fan-StartStop> a brick:Start_Stop_Command .

<urn:bldg/Core_ZN-PSC_AC-Fan-Sts> a brick:Fan_Status .

<urn:bldg/Core_ZN-PSC_AC-FilterDPS> a brick:Filter_Differential_Pressure_Sensor .

<urn:bldg/Core_ZN-PSC_AC-HCmd> a brick:Heating_Command .
Expand All @@ -59,5 +48,18 @@ bldg:A1 a brick:Air_Handler_Unit .

<urn:bldg/Core_ZN-PSC_AC-SAT> a brick:Supply_Air_Temperature_Sensor .

<urn:bldg/name_fbe04c78> a brick:Supply_Fan,
vav48:sa-fan ;
brick:hasPoint <urn:bldg/Core_ZN-PSC_AC-Fan>,
<urn:bldg/p57_a384fdde>,
<urn:bldg/p59_2f4e2ba5> .

<urn:bldg/p57_a384fdde> a brick:Start_Stop_Command .

<urn:bldg/p59_2f4e2ba5> a brick:Frequency_Command .

<urn:bldg/zone-temp> a brick:Zone_Air_Temperature_Sensor .

<urn:bldg/Core_ZN-PSC_AC-Fan> a brick:Fan_Status,
brick:Supply_Fan .

0 comments on commit 29835a6

Please sign in to comment.