Closed SpicyYeol closed 3 months ago
I modified AssetAdministrationShell.Submodel set to List and solbed my issue
@SpicyYeol FYI, neither submodel nor submodel elements within a submodel don't have any order. It is wrong to rely on any specific order.
Hi @SpicyYeol, thanks for asking your question here.
@mhrimaz is correct, an AssetAdministrationShell
only has a "soft" reference to its Submodel
s, as by the specification. That means, an AssetAdministrationShell
does not contain Submodel
s, which is a common misconception.
These references to the Submodel
don't have any order, however each Submodel
must have a globally unique Identifier
(Submodel.id
).
The suggested way to identify the correct Submodel
you want to deal with is using that Identifier
.
Changing the AssetAdministrationShell.submodel
to a List may have lots of unforseen consequences, but most importantly, you will break the resolving of Submodels
. (Also your AAS won't be interoperable with anyone else anymore)
I want to specify the order of submodels under Adminshell.
However, if you add a submodel using Modelreference, this order gets messed up and the result changes every time.
What function should I use to specify the order?
I am using the following code