- Put the model's
.ttlfile in themodels/directory - Create a
.mdfile with the same base name as the.ttlfile in theexamples/directory:- This
.mdfile should have at least the following 3 empty sections, in this order: ## Downloads## Queries## Model Components- there should also be a "header" section at the top of the file which allows executable code to be embedded in the markdown file (see below)
- This
- Add this
.mdfile to the_toc.ymlfile under the appropriate section (Building or System) - If you want to add queries to the model, add them in
queries.toml. The section name should have the same base name as the.ttland.mdfile.
For a model called mybuilding.ttl, the following files would be created:
models/mybuilding.ttlexamples/mybuilding.md
The examples/mybuilding.md file would look like this:
---
jupytext:
formats: md:myst
text_representation:
extension: .md
format_name: myst
kernelspec:
display_name: Python 3
language: python
name: python3
---
# My Example Building
<description of the building>
## Downloads
## Queries
## Model Components
The queries.toml file might look like this:
[[mybuilding]]
description="Zone/room temperature sensors"
query="""
SELECT ?location ?sensor WHERE {
?sensor rdf:type/rdfs:subClassOf* s223:Sensor .
?sensor s223:observes ?property .
?property qudt:hasQuantityKind quantitykind:Temperature .
?sensor s223:hasObservationLocation ?location
}
"""