aas-specs icon indicating copy to clipboard operation
aas-specs copied to clipboard

Matching Strategy: Outdated equivalence of ModelReference[Submodel] and GlobalReference with same key

Open s-heppner opened this issue 1 year ago • 5 comments

Page 36 of the v3.0 Part 1 specification mentions an equivalence relationship:

(Submodel)https://example.com/aas/1/1/1234859590 is identical to (GlobalReference)https://example.com/aas/1/1/1234859590

At first glance, this is logical in the sense that both References refer to the same (Submodel) object.

However, there is a difference between ModelReference and GlobalReference, as ModelReferences are resolvable in implementations of the AAS (since it references another AAS object), whereas GlobalReference does not necessarily refer to other AAS objects. Furthermore, in the case of AssetAdministrationShell/submodel, the spec requires a ModelReference[Submodel] anyway, making this equivalence relationship confusing and outdated, as far as I can see.

This issue came up due to an AAS wrongly modelled under this assumption in basyx-python-sdk#231

s-heppner avatar Feb 07 '24 12:02 s-heppner

Is it possible to check only the Identifiers?

g1zzm0 avatar Feb 07 '24 13:02 g1zzm0

You are right. In "in the case of AssetAdministrationShell/submodel, the spec requires a ModelReference[Submodel] " in this case it would be a bug to use an external reference. The documentation needs to be clearer on the use cases these "equivalence"-relationship matches hold. It does not mean you can just substitute them in every context.

Proposal: added note

`

Note: Matching in this context means supporting a discovery query against an existing model. 

A typical query would be to find some element with a specific semantic ID. In this case the data consumer only knows the external ID whereas the provider may have created a duplicate of the concept definition as ConceptDescription and a model reference could be used

Matching does not mean to define equivalence classes that allow to overwrite constraints as defined in the specification for  valid instances of the metamodel.

`

and for Submodel Reference examples:

Note: this kind of Submodel matching might occur if a SubmodelElement of type ReferenceElement is matched against a query for this element. It is not allowed to substitute the Submodel references within AssetAdministrationShell/submodels with an external reference!

BirgitBoss avatar Feb 16 '24 11:02 BirgitBoss

@joergneidig: can you please review: https://rwth-iat.github.io/aas-specs-antora/IDTA-01001/snapshot/IDTA-01001_General.html#_matching_algorithm_for_references

BirgitBoss avatar Mar 06 '24 15:03 BirgitBoss

@JoergNeidig: can you please review: https://rwth-iat.github.io/aas-specs-antora/IDTA-01001/snapshot/IDTA-01001_General.html#_matching_algorithm_for_references

The new/changed notes add to the clarity of the matching. I agree on making these changes.

JoergNeidig avatar Apr 08 '24 06:04 JoergNeidig

Worksteam AAS Specs 2024-06-13 accepted to add these clarifying notes

BirgitBoss avatar Jun 13 '24 08:06 BirgitBoss