Commit 4936a100 authored by Jiahang Chen's avatar Jiahang Chen
Browse files

update readme

parent 4e155be0
Pipeline #374026 passed with stages
in 39 seconds
fml40-reference-implementation
fml40 python reference implementation
==============================
Reference implementation of the forest modelling language 4.0 (fml 4.0) which is explained in a [KWH 4.0 white paper](https://www.kwh40.de/wp-content/uploads/2020/03/KWH40-Standpunkt-fml40-Version-1.0.pdf).
To use the fml40 reference implementation package in your own project you can install it using the latest [wheel](https://git.rwth-aachen.de/kwh40/fml40-reference-implementation/-/jobs/artifacts/master/raw/public/ml-0.1-py3-none-any.whl?job=wheel).
To install this wheel, go to the respective directory or switch to your designated virtual environment and install the .whl file, just run pip install https://git.rwth-aachen.de/kwh40/fml40-reference-implementation/-/jobs/artifacts/master/raw/public/ml-0.1-py3-none-any.whl?job=wheel
Reference implementation of the Forest Modelling Language 4.0 (fml40) which is explained in the [KWH ForestML 4.0 white paper](https://www.kwh40.de/wp-content/uploads/2020/03/KWH40-Standpunkt-fml40-Version-1.0.pdf), currently only in German.
To use the fml40 reference implementation package in your own project you need to install it using the latest [wheel](https://git.rwth-aachen.de/kwh40/fml40-reference-implementation/-/jobs/artifacts/master/raw/public/ml-0.1-py3-none-any.whl?job=wheel).
To install this wheel, go to the respective directory or switch to your designated virtual environment and install the `.whl` file, just run
```
pip install https://git.rwth-aachen.de/kwh40/fml40-reference-implementation/-/jobs/artifacts/master/raw/public/ml-0.1-py3-none-any.whl?job=wheel
```
Features
--------
This package provides two different modes to launch your Digital Twins:
- launching digital twins in persistent mode via `fml40s.py`
- extending the capabilities with user defined digital twins
Requirements
------------
Python >= 3.6.6
Installation
------------
Run `pip install -m requirements` in your virtual environment. To create a virtual environment run `mkvirtualenv <ENV_NAME>` and `workon <ENV_NAME>`
- Launching Digital Twin quickly in persistent mode via `fml40s.py`. You need to register a thing identity for your Digital Twin via [S³I Config REST API](https://config.s3i.vswf.dev/apidoc) and prepare a respective config file which describes a ForestML 4.0 conform DT in JSON. For more details refer to the example `MyDigitalTwin.json` in the section `Config files`.
- Extending the capabilities with user defined Digital Twins, which means you can additionally define and insert a function according to ForestML 4.0 into the Digital Twin. We provide an exemplary Digital Twin built in [Jupyter Notebook](https://mybinder.org/v2/gh/kwh40/notebooks/master), refer to notebooks `08a`, `08b`, `08d` and `08e` .
Usage
-----
A digital twin can be launched in persistent mode by executing
A Digital Twin can be launched in persistent mode by executing
```
python fml40s.py launch <CONFIG_FILE>
```
all the config files must be located in the folder `configs`.
Config files for Digital Twin must be located in the folder `configs`.
For more options call just run
```
......@@ -46,9 +40,10 @@
- policyId and
- attributes
MyDigitalTwin.json:
The configuration file must be created in accordance with ForestML 4.0, refer to Cap. 7.1 of the [KWH ForestML 4.0 White Paper](https://www.kwh40.de/wp-content/uploads/2020/03/KWH40-Standpunkt-fml40-Version-1.0.pdf). We provide in addition here an example JSON config file, see below.
``` example
MyDigitalTwin.json:
```
{
"thingId": "s3i:id",
"policyId": "s3i:id",
......@@ -81,21 +76,21 @@
### Configs
This folder contains example configuration files in json format for some digital twins.
This folder contains configuration files in JSON format for Digital Twins.
### ml
This directory includes the implementations of the fml40 python reference implementation as described in the fml40 white paper.
This directory includes the implementations of the fml40 python reference implementation as described in the KWH ForestML 4.0 White Paper.
### demo
Example of creating and launching a harvester. Additionally, a hmi is created to communicate with the harvester using S³I-B protocol.
Example of creating and launching a HMIm which is used to communicate with the permanent Digital Twin using S³I-B protocol.
### logs
is composed of the logging files of the created digital twins.
This folder is composed of the logging files of the created and launched Digital Twins.
### tests
contains all test scripts (currently in development)
\ No newline at end of file
This folder contains all test scripts (currently in development).
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment