ForestML 4.0 (fml40) reference implementation - Python
Overview
ForestML 4.0 (fml40) reference implementation provides Software Development Kit (SDK) to build a Digital Twin based on the Forest Modeling Language 4.0 (fml40), as specified in the fml40 white paper (Only in German).
Additionally, the SDK supports the use of Smart Systems Service Infrastructure (S³I) to enable an inter-twin interconnection with other Digital Twins, making data and service identifiable, available, and accessible.
The developed Digital Twin using this SDK is technically structured as below:
- An entry contains all ForestML 4.0 conform models (incl. services, properties and events), which are stored under the ml folder and can be serialized as JSON
- A function mapper that maps user-defined methods to concretize ForestML 4.0 service functions.
- A value synchronization module that collects the value (e.g., sensor data) from physical assets to Digital Twins and maps to ForestML 4.0 properties.
- A connector to establish an connection with the S³I.
Docs
A documentation, which introduces basic classes and methods of this SDK, can be found under this link.
Getting Started
Installation
The use the ForestML 4.0 (fml40) reference implementation requires an installation of the SDK on your local device. Currently, the SDK is available via Pypi:
python -m pip install fml40-reference-implementation
Example - Quickly develop a Digital Twin of Harvester (DT Harvester)
Here, we provide a brief guide on how to develop a DT Harvester, which consists of a location property, a property representing operation hours, and a service for accepting felling orders. All these features can be modeled using ForestML 4.0.
Step 1: Serialize JSON file
The model of Harvester (and also its Digital Twin) can be serialized as JSON, as shown below:
{
"thingId": "",
"policyId": "",
"attributes": {
"class": "ml40::Thing",
"name": "Demo Harvester",
"features": [
{
"class": "fml40::AcceptsFellingJobs"
},
{
"class": "ml40::OperatingHours",
"total": 0
},
{
"class": "ml40::Location",
"longitude": 0,
"latitude": 0,
"orientation": 0
}
]
}
}
Step 2: Registration
Identity ensures global identification of DT Harvester and is necessary for connecting to the S³I. The S³I Manager is a web-based service supporting configuration of identities which can be assigned to users and their Digital Twin. Using the S³I manager, identities can be created, which is required to log in the S³I Manager. After logging in, Thing identity can be registered by clicking Create Thing. The returned identifier and secret should be kept locally. Afterwards, a message queue and a cloud copy should be created to DT Harvester under Create, such that DT Harvester is reachable via the S³I Broker and the current state of DT Harvester can be stored in the S³I Repository.
Step 3: Runs demo_harvester.py
The from Step 2 obtained identifier and secret used to launch demo_harvester.py
python demo_harvester.py -i OAUTH2_ID -s OAUTH2_SECRET
Step 4: Check the state update
To verify whether DT Harvester is currently running, one can use Explore in the S³I Manager to check the current state of DT Harvester. There, the continuous changes in operation hours will be shown.
Metadata
Release files for fml40-reference-implementation 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| fml40_reference_implementation-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for fml40_reference_implementation-1.0.0-py3-none-any.whl |
Release files / fml40_reference_implementation-1.0.0-py3-none-any.whl
| Download URL | fml40_reference_implementation-1.0.0-py3-none-any.whl |
|---|---|
| Size | 227.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
80869f5b77a2018485976a7660bd11f3284d7017ff8ed9fcedc2fe1b3fd0b841
|
|
BLAKE2b-256 checksum How to use checksums |
df4b137eb9407481daead625a84a76020152fd096b95e418b48e2db9bf323b86
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.7.17
|
Security for fml40-reference-implementation 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.