admin-shell-io / aas-specs

Repository of the Asset Administration Shell Specification IDTA-01001 - Metamodel
https://industrialdigitaltwin.org/en/content-hub/aasspecifications
Creative Commons Attribution 4.0 International
45 stars 26 forks source link

Clarification request regarding usage of SubmodelElementList and cardinality qualifiers #435

Open empwilli opened 1 month ago

empwilli commented 1 month ago

With the introduction of AAS spec v3.0 the additional SubmodelElementList type was introduced, that covers most, if all, cases of collection types. To my understanding, this introduces some ambiguity with the cardinality qualifiers. For example, I would expect the "Markings" digital nameplate to be modeled as a SubmodelElementList, whereas it is modeled there as a SubmodelElementCollection with a Qualifier of [1..*].

Could you please elaborate on when to use SubmodelElementLists and when to use SubmodelElementCollections? How would I model bounds on the number of elements in a SubmodelElementList?

Furthermore, are SubmodelElementLists suitable to model {arbitrary} property fields (as for example in the AssetSpecificProperties in the digital nameplate)? Per AASd-109 a SubmodelElementList with a typeValueListElement of type Property (or Range) must specify the value type of the enclosed Property (or Range). With an {arbitrary} property field this would not be possible at the moment. Do I use cardinality qualifiers for this case?

BirgitBoss commented 1 month ago

If you have a set of equal (but not same) objects and do not know in advance how many there will be then it is a list. A list typically has the cardinality 0.. or 1.. (e.g. Authors, Documents)

If you have quite different kind of information to be described then it is a collection (e.g. Title, Author, Version). If a qualifer is attached to a collection in V3.x then it is just an abbreviated notation to list every element individually. In collections the numbers is always restricted to a specific number. Typical cardinality qualifier for collections are 0..1 and 1.

An update of the guide "How to create a submodel template" is in work.

Note: the current V3.0 SubmodelTemplates (SMT) in https://github.com/admin-shell-io/submodel-templates used the default migration strategy saying that SubmodelElementCollection (old) will be mapped to SubmodelElementCollection (new). For all SMT a new version needs to be done to decide which of the SubmodelElementCollections should be realized as SubmodelElementList.