*** Wartungsfenster jeden ersten Mittwoch vormittag im Monat ***

Skip to content
Snippets Groups Projects
Name Last commit Last update
.idea
Ontology
src/main
Dockerfile
Readme.md

GDTA - Generic Digital Twin Architecture Prototype for Industrial Energy Systems

This Prototype implementation is a proof-of-concept of a service in the Generic Digital Twin Architecture (GDTA) proposed in reference [1].

The proof-of-concept shows the application of Semantic Web technologies for instantiating the proposed GDTA for a use case of a Packed-Bed Thermal Energy Storage (PBTES). The focus of the implementation is the Virtual Entity consisting of a Simulation Service in combination with context information, as it is a fundamental service inside a Digital Twin (DT).

Reference

[1] Steindl, G.; Stagl, M.; Kasper, L.; Kastner, W.; Hofmann, R. Generic Digital Twin Architecture for Industrial Energy Systems. Applied Sciences, 2020, 10, 8903. https://doi.org/10.3390/app10248903

Prerequisites

Setup Miniconda:

  • get https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
  • bash Miniconda3-latest-Linux-x86_64.sh
  • conda create -n 5ddt
  • conda activate 5ddt
  • conda env list
  • conda install python=3.6
  • pip install -r ./src/main/SimulationServiceMatlab/requirements.txt

Enable Matlab Python Engine:

  • cd /usr/local/MATLAB/R2020a/extern/engines/python
  • python setup.py build --build-base ~/build install --prefix ~/Prototype/src/main/SimulationServiceMatlab

Shared Knoweldge

  • Holds all instance data and a schema for all service categories defined from the service review
  • Stored in Jena Fuseki 2 using Docker, data persistence is achieved by storing the fuseki data in a Docker volume container named "fuseki-data" (Source:https://hub.docker.com/r/stain/jena-fuseki)
    • docker pull stain/jena-fuseki
    • docker run --name fuseki-data -e TDB=2 -v /fuseki busybox (first time)
    • docker run -d --name fuseki -p 3030:3030 -e TDB=2 --volumes-from fuseki-data stain/jena-fuseki (to rerun)
    • docker stop fuseki

FUSEKI Server in DOCKER:

  • docker pull stain/jena-fuseki
  • docker run -d --name fuseki -p 3030:3030 -e FUSEKI_DATASET1=dummy -e FUSEKI_DATASET_2=ds -v ~/fuseki:/fuseki -v ~/Prototype/src/main/PublicationService:/staging stain/jena-fuseki
  • CREATE Dataset ds manually in http://localhost:3030/manage.html?tab=datasets (username and password can be found under home/username/fuseki/shiro.ini)

One problem still needs to be solved, namely one needs to set the password in the *_service_fuseki_connection.py file accordingly to that of the fuseki servcer.

Service Categories:

Service categories consist of different service definitions which will be merged during runtime and stored in the Shared Knowledge. All service categories inherit from BaseService.owl

Services

Simulation Service

Code:

Code documentation in:

Setup:

  • Go to the simulationServiceMatlab directory and execute:
    • nohup python simulationServiceMatlab.py &
      • Role of nohup: nohup makes your script ignore SIGHUP, and redirects stdout/stderr to a file nohup.out, so that the command can continue running in the background after you log out. If you close the shell/terminal or log off, your command is no longer a child of that shell. It belongs to init process. If you search in pstree you'll see it is now owned by process 1 (init). To see the process again, use in terminal,

API:

  • /service: GET (Retrieve Information):
    • Regularly calculates Qualits of Service Parameters and stores them in SHARED KNOWELDGE
  • /model: GET (Retrieve Information):
  • /train: PUT (Update Information):
    • Create a GLM from the input data based on its implementation by statsmodels.api
    • When train is invoced updates its model information in the SHARED KNOWELDGE
  • /predict: GET (Retrieve Information): Return: new Model instance
  • /upload/data: POST (Create Information)
  • /upload/model: POST (Create Information)

Here a short example Workflow: