The sample data can be found in the [TestBench/NT-Data/sample.nt](https://gitlab.fi.muni.cz/xkucer16/semanticBMS/raw/master/TestBench/NT-Data/sample.nt) file.
For more information about the data set, see [TestBench readme](https://gitlab.fi.muni.cz/xkucer16/semanticBMS/raw/master/TestBench/README.md).
## How To Install SemanticBMS
This section describes one of the ways to deploy the Semantic BMS APIs. There are certainly many other ways, however this one
Request"1: All information about a DP"$auth($Server+"/sbms/semantics/datapoints/?fields=bmsId%2Ctype%2Csource.bimId%2Csource.type%2Csource.location%2Cscope.bimId%2Cscope.type%2Cscope.location%2Csensing.type%2Csensing.window%2Cproperty.domain%2Cproperty.quality%2Cpublisher.bimId&bmsId=bacnet%3A%2F%2F04010306.AV1")
#Request "1: All information about a DP" $auth ($Server + "/sbms/semantics/datapoints/?fields=bmsId%2Ctype%2Csource.bimId%2Csource.type%2Csource.location%2Cscope.bimId%2Cscope.type%2Cscope.location%2Csensing.type%2Csensing.window%2Cproperty.domain%2Cproperty.quality%2Cpublisher.bimId&bmsId=bacnet%3A%2F%2F04010306.AV1")
Request"2a: All DPs according to strict criteria + grouping"$auth($Server+"/sbms/semantics/datapoints/?fields=bmsId&grouping=scope.floor&type=Input&source.type=TemperatureSensor&source.location=S01B04&scope.type=Room&property.domain=Air&property.quality=temperature")
#Request "2a: All DPs according to strict criteria + grouping" $auth ($Server + "/sbms/semantics/datapoints/?fields=bmsId&grouping=scope.floor&type=Input&source.type=TemperatureSensor&source.location=S01B04&scope.type=Room&property.domain=Air&property.quality=temperature")
Request"2b: The same query as above, different building"$auth($Server+"/sbms/semantics/datapoints/?fields=bmsId&grouping=scope.floor&type=Input&source.type=TemperatureSensor&source.location=S02B04&scope.type=Room&property.domain=Air&property.quality=temperature")
#Request "2b: The same query as above, different building" $auth ($Server + "/sbms/semantics/datapoints/?fields=bmsId&grouping=scope.floor&type=Input&source.type=TemperatureSensor&source.location=S02B04&scope.type=Room&property.domain=Air&property.quality=temperature")
Request"3: Generic query with large number of results + grouping"$auth($Server+"/sbms/semantics/datapoints/?fields=bmsId&grouping=scope.building&source.type=HumiditySensor&property.domain=Air")
#Request "3: Generic query with large number of results + grouping" $auth ($Server + "/sbms/semantics/datapoints/?fields=bmsId&grouping=scope.building&source.type=HumiditySensor&property.domain=Air")
Request"4: Generic query with large number of results + datapoint type + grouping"$auth($Server+"/sbms/semantics/datapoints/?fields=bmsId%2Ctype%2Cscope.bimId&grouping=scope.building&source.type=TemperatureSensor&property.domain=Air&property.quality=temperature")
#Request "4: Generic query with large number of results + datapoint type + grouping" $auth ($Server + "/sbms/semantics/datapoints/?fields=bmsId%2Ctype%2Cscope.bimId&grouping=scope.building&source.type=TemperatureSensor&property.domain=Air&property.quality=temperature")
Request"5: Generic query with large number of results + all available information + grouping"$auth($Server+"/sbms/semantics/datapoints/?fields=bmsId%2Ctype%2Csource.bimId%2Csource.type%2Csource.location%2Cscope.bimId%2Cscope.type%2Cscope.location%2Csensing.type%2Csensing.window%2Cproperty.domain%2Cproperty.quality%2Cpublisher.bimId&grouping=scope.building&source.type=TemperatureSensor&property.domain=Air&property.quality=temperature")
@@ -13,9 +13,9 @@ line utility. For the performance testing, other tools, such as curl or wget, mu
The generated data represent mock-up facility of an organization.
They consist of several sites and buildings. Each building is equipped with an PLC, an energy meter and two data points representing energy consumption - overall and last month.
Each room is equipped with a temperature sensor, a humidity sensor, a motion sensor and a PLC that publishes following data points:
* Air temeprature
* Air temperature
* Air humidity
* Setpoint temperature
* Set-point temperature
* Occupancy
For each of the data points, there are two trends defined - one in the PLC itself, the other in the archive historian database.
...
...
@@ -28,7 +28,7 @@ The benchmarking procedure consist of several API calls to the datapoints endpoi
5. Selecting large number of data points based on loose criteria with all the available information retrieved (all temperature sensors in the database + all attributes)
The aim of the benchmarking is to prove that the qeury performance is sufficent to intended purposes, as the performance was not
The aim of the benchmarking is to prove that the query performance is sufficient for intended purposes, as the performance was not
a primary design goal during the development.
The prerequisites to run this benchmark are:
...
...
@@ -39,10 +39,12 @@ The prerequisites to run this benchmark are:
Generally, the optional parameters are not needed when following the expected workflow - they are used only for special use cases.
The scripts mentioned in the following manual HAVE TO be executed from the directory they are placed in.
If you intend to use the provided pre-generated data, proceed directly to step 3 and use the optional parameter to specify the correct input file.
1. [Optional] Run the script Generate-CSVs.ps1
1. [Optional] Run the script .\Generate-CSVs.ps1
The script generates CSV files into the CSV-Data folder.
Optional parameters:
-Sites [Default: 5] - number of sites in the dataset
...
...
@@ -51,7 +53,7 @@ If you intend to use the provided pre-generated data, proceed directly to step 3
-Rooms [Default: 10] - number of rooms in each floor
-OutFolder [Default: ".\CSV-Data"] - output folder for the generated CSV
2. [Optional] Run the script Generate-Triples.ps1
2. [Optional] Run the script .\Generate-Triples.ps1
The script generates an N-Triples file into the NT-Data folder, based on the CSV files located in the .\CSV-Data folder.
Optional parameters:
-InFolder [Default: .\CSV-Data] - location of the source CSV files generated by Generate-CSVs script
...
...
@@ -61,7 +63,7 @@ If you intend to use the provided pre-generated data, proceed directly to step 3
Pre-generated NT file for the test mock-up with the default size is available in the NT-Data folder as sample.nt.
3. Run the script Create-TDB.ps1
3. Run the script .\Create-TDB.ps1
The script will create the TDB triplestore using the Apache Jena framework.
Optional parameters:
-TDBPath [Default: \apache-tomcat\webapps\sbms\WEB-INF\tdb] - location of the resulting TDB directory