admin-shell-io / submodel-templates

Submodel Templates for AAS
Creative Commons Attribution 4.0 International
36 stars 14 forks source link

Multiple Constraint Violations in Time-Series Data Submodel #67

Open zrgt opened 1 month ago

zrgt commented 1 month ago

I encountered several constraint violations when attempting to open the Time-Series Data Submodel template:

Rudra-sandeep commented 1 month ago

@zrgt Please use the latest JSON file of the respective SMT which as been uploaded yesterday

zrgt commented 1 month ago

@Rudra-sandeep the JSON has still problems:

Should be:

                {
                  "category": "VARIABLE",
                  "idShort": "RecordCount",
                  "semanticId": {
                    "type": "ExternalReference",
                    "keys": [
                      {
                        "type": "GlobalReference",
                        "value": "https://admin-shell.io/idta/TimeSeries/Segment/RecordCount/1/1"
                      }
                    ]
                  },
                  "qualifiers": [
                    {
                      "type": "Cardinality",
                      "valueType": "xs:string",
                      "value": "ZeroToOne"
                    }
                  ],
                  "valueType": "xs:long",
                  "modelType": "Property"
                }

Tested with https://github.com/rwth-iat/basyx-python-sdk

zrgt commented 1 month ago

The problem also occures in Range object, as it has min and max values which should be removed or set to valid XSD datetime string

{
                "idShort": "Timespan",
                "description": [
                  {
                    "language": "en",
                    "text": "The valueType of the given timespan must match the valueType of the time properties of the segments."
                  }
                ],
                "semanticId": {
                  "type": "ExternalReference",
                  "keys": [
                    {
                      "type": "GlobalReference",
                      "value": "https://admin-shell.io/idta/TimeSeries/Timespan/1/1"
                    }
                  ]
                },
                "valueType": "xs:dateTime",
                "min": "",
                "max": "",
                "modelType": "Range"
              }

The same proble appears in DataSpecificationIec61360 with value:

{
            "preferredName": [
              {
                "language": "de",
                "text": "Zeitreihen Metadaten"
              },
              {
                "language": "en",
                "text": "time series metadata"
              }
            ],
            "shortName": [
              {
                "language": "de",
                "text": "Metadaten"
              },
              {
                "language": "en",
                "text": "metadata"
              }
            ],
            "definition": [
              {
                "language": "de",
                "text": "Eine Reihe von Daten, welche die Zeitreihe beschreiben und \u00FCber sie Auskunft geben"
              },
              {
                "language": "en",
                "text": "A set of data describing and providing information about the time series"
              }
            ],
            "value": "",
            "modelType": "DataSpecificationIec61360"
          }
zrgt commented 1 month ago

Also a problem in ExternalReference in semantiid of segments. According to Constraint AASd-122 the type of the first key of an ExternalReference must be a GenericGloballyIdentifiable, but "Property" was set:

            {
              "value": {
                "idShort": "Segments",
                "semanticId": {
                  "type": "ExternalReference",
                  "keys": [
                    {
                      "type": "Property",
                      "value": "https://admin-shell.io/idta/TimeSeries/AggregationMethod/1/1"
                    }
                  ]
                },
                "modelType": "SubmodelElementCollection"
              }
            }
Rudra-sandeep commented 1 month ago

@zrgt Thank you for your feedback I will look into this issues.

zrgt commented 1 month ago

@Rudra-sandeep the same problems mentioned in the original issue report also appear in JSON.

zrgt commented 1 month ago

@zrgt Thank you for your feedback, I will look into this issue.

@Rudra-sandeep Please consider that probably all issues mentioned in this problem also exist in all JSON files that have been uploaded recently and the Serializer/SDK you are using is not compliant with the AAS Spec.

Rudra-sandeep commented 1 month ago

@zrgt Thank you for your feedback, I will look into this issue.

@Rudra-sandeep Please consider that probably all issues mentioned in this problem also exist in all JSON files that have been uploaded recently and the Serializer/SDK you are using is not compliant with the AAS Spec.

@zrgt Yes regarding to compliant with the Spec we have already started discussions in the WG's