8. Metamodel-Constraints

Here is a quick reference of the constraints as defined in Details of the AssetAdministrationShell Part 1 and how they are implemented in the Eclipse BaSyx Python SDK.

The status information means the following:

  • ✅: the Constraint is enforced in the current version

  • ❌: the Constraint cannot be enforced in the current version

  • WIP: The Constraint enforcement will be implemented in the future

In most cases, if a constraint violation is detected, an AASConstraintViolation will be raised

Constraint

Description

Status

Comment

AASd-002

idShort of Referable s shall only feature letters, digits, underscore (“_”); starting mandatory with a letter, i.e. [a-zA-Z][a-zA-Z0-9_]* .

AASd-005

If AdministrativeInformation/version is not specified, AdministrativeInformation/revision shall also be unspecified. This means that a revision requires a version. If there is no version, there is no revision. Revision is optional.

AASd-006

If both, the value and the valueId of a Qualifier are present, the value needs to be identical to the value of the referenced coded value in Qualifier/valueId.

Uncheckable; cannot check the value of what value_id points to

AASd-007

If both the Property/value and the Property/valueId are present, the value of Property/value needs to be identical to the value of the referenced coded value in Property/valueId.

Uncheckable; cannot check the value of what value_id points to

AASd-012

if both the MultiLanguageProperty/value and the MultiLanguageProperty/valueId are present, the meaning must be the same for each string in a specific language, as specified in MultiLanguageProperty/valueId.

Uncheckable

AASd-014

Either the attribute globalAssetId or specificAssetId of an Entity must be set if Entity/entityType is set to “SelfManagedEntity”. Otherwise, they do not exist.

AASd-020

The value of Qualifier/value shall be consistent with the data type as defined in Qualifier/valueType.

AASd-021

Every qualifiable can only have one qualifier with the same Qualifier/type.

AASd-022

idShort of non-identifiable referables within the same name space shall be unique (case-sensitive).

AASd-077

The name of an extension (Extension/name) within HasExtensions needs to be unique.

AASd-080

In case Key/type == GlobalReference idType shall not be any LocalKeyType (IdShort, FragmentId).

AASd-081

In case Key/type==AssetAdministrationShell Key/idType shall not be any LocalKeyType (IdShort, FragmentId).

AASd-090

for data elements, category (inherited by Referable) shall be one of the following values: CONSTANT, PARAMETER or VARIABLE. Default: VARIABLE

AASd-107

If a first level child element in a SubmodelElementList has a semanticId, it shall be identical to SubmodelElementList/semanticIdListElement.

AASd-108

All first level child elements in a SubmodelElementList shall have the same submodel element type as specified in SubmodelElementList/typeValueListElement.

AASd-109

If SubmodelElementList/typeValueListElement is equal to Property or Range, SubmodelElementList/valueTypeListElement shall be set and all first level child elements in the SubmodelElementList shall have the value type as specified in SubmodelElementList/valueTypeListElement.

AASd-114

If two first level child elements in a SubmodelElementList have a semanticId, they shall be identical.

AASd-115

If a first level child element in a SubmodelElementList does not specify a semanticId, the value is assumed to be identical to SubmodelElementList/semanticIdListElement.

postponed

AASd-116

globalAssetId” (case-insensitive) is a reserved key. If used as value for SpecificAssetId/name, SpecificAssetId/value shall be identical to AssetInformation/globalAssetId.

postponed

AASd-117

idShort of non-identifiable Referable``s not being a direct child of a ``SubmodelElementList shall be specified.

AASd-118

If a supplemental semantic ID (HasSemantics/supplementalSemanticId) is defined, there shall also be a main semantic ID (HasSemantics/semanticId).

AASd-119

If any Qualifier/kind value of a Qualifiable/qualifier is equal to TemplateQualifier and the qualified element inherits from “hasKind", the qualified element shall be of kind Template (HasKind/kind = "Template").

See #119

AASd-120

idShort of submodel elements being a direct child of a SubmodelElementList shall not be specified.

AASd-121

For Reference``s, the value of ``Key/type of the first key of Reference/keys shall be one of GloballyIdentifiables.

AASd-122

For external references, i.e. Reference``s with ``Reference/type = ExternalReference, the value of Key/type of the first key of Reference/keys shall be one of GenericGloballyIdentifiables.

AASd-123

For model references, i.e. Reference``s with ``Reference/type = ModellReference, the value of Key/type of the first key of Reference/keys shall be one of AasIdentifiables.

AASd-124

For external references, i.e. Reference``s with ``Reference/type = ExternalReference, the last key of Reference/keys shall be either one of GenericGloballyIdentifiables or one of GenericFragmentKeys.

AASd-125

For model references, i.e. Reference``s with ``Reference/type = ModelReference with more than one key in Reference/keys, the value of Key/type of each of the keys following the first key of Reference/keys shall be one of FragmentKeys.

AASd-126

For model references, i.e. Reference``s with ``Reference/type = ModelReference with more than one key in Reference/keys, the value of Key/type of the last Key in the reference key chain may be one of GenericFragmentKeys or no key at all shall have a value out of GenericFragmentKeys.

AASd-127

For model references, i.e. Reference``s with ``Reference/type = ModelReference with more than one key in Reference/keys, a key with Key/type FragmentReference shall be preceded by a key with Key/type File or Blob. All other Asset Administration Shell fragments, i.e. Key/type values out of AasSubmodelElements, do not support fragments.

AASd-128

For model references, i.e. Reference``s with ``Reference/type = ModelReference, the Key/value of a Key preceded by a Key with Key/type=SubmodelElementList is an integer number denoting the position in the array of the submodel element list.

AASd-129

If any Qualifier/kind value of a SubmodelElement/qualifier (attribute qualifier inherited via Qualifiable) is equal to TemplateQualifier, the submodel element shall be part of a submodel template, i.e. a Submodel with Submodel/kind (attribute kind inherited via HasKind) value equal to Template.

See #119

AASd-130

an attribute with data type “string” shall consist of these characters only: ^[x09x0Ax0Dx20-uD7FFuE000-uFFFDu00010000-u0010FFFF]*$.

Here a ValueError instead of AASConstraintViolation will be raised.

AASd-131

The globalAssetId or at least one specificAssetId shall be defined for AssetInformation.

AASd-133

SpecificAssetId/externalSubjectId shall be a global reference, i.e. Reference/type = ExternalReference.

Enforced by the typechecker. See #119

AASd-134

For an Operation, the idShort of all inputVariable/value, outputVariable/value, and inoutputVariable/value shall be unique.

AASc-003

For a ConceptDescription with category VALUE using data specification template IEC61360 DataSpecificationIEC61360/value shall be set.

tbd

AASc-004

For a ConceptDescription with category PROPERTY or VALUE using data specification template IEC61360 - DataSpecificationIEC61360/dataType is mandatory and shall be defined.

tbd

AASc-005

For a ConceptDescription with category REFERENCE using data specification template IEC61360 - DataSpecificationIEC61360/dataType is STRING by default.

tbd

AASc-006

For a ConceptDescription with category DOCUMENT using data specification template IEC61360 - DataSpecificationIEC61360/dataType shall be one of the following values: STRING or URL.

tbd

AASc-007

For a ConceptDescription with category QUALIFIER_TYPE using data specification template IEC61360 - DataSpecificationIEC61360/dataType is mandatory and shall be defined.

tbd

AASc-008

For a ConceptDescriptions except for a ConceptDescription of category VALUE using data specification template IEC61360 - DataSpecificationIEC61360/definition is mandatory and shall be defined at least in English.

tbd

AASc-009

If DataSpecificationIEC61360/dataType one of: INTEGER_MEASURE, REAL_MEASURE, RATIONAL_MEASURE, INTEGER_CURRENCY, REAL_CURRENCY, then DataSpecificationIEC61360/unit or DataSpecificationIEC61360/unitId shall be defined.

tbd

AASc-010

If DataSpecificationIEC61360/value is not empty then DataSpecificationIEC61360/valueList shall be empty and vice versa.

tbd