open-scd icon indicating copy to clipboard operation
open-scd copied to clipboard

Create virtual IED does not consider multiple instances of a LNType within a function

Open BurTah00 opened this issue 1 year ago • 6 comments

Describe the bug When the user assigns multiple instances of a same LNType (even though instance numbers/prefixes are different) to a Function element; They are visualized just as normal with no problem like below; image

Next, user creates a Virtual IED out of Functions which should turn out to LDs including those LNs within; (expected) image

But at the end, it turns out to only last or first LN is included in the datamodel, and others are ignored.

Expected behavior Expectation is all LNs are part of the datamodel of virtual IED, allocated under LD that is the name of Function element.

Sample SCL below: DigSub 2 (5) (6).zip

BurTah00 avatar Aug 09 '24 13:08 BurTah00

Thanks for the report!

Sander3003 avatar Aug 12 '24 09:08 Sander3003

@DavoodSooran can you take a look at it?

Sander3003 avatar Aug 13 '24 09:08 Sander3003

I just tried it out myself and can confirm it is a bug!

JakobVogelsang avatar Aug 16 '24 06:08 JakobVogelsang

@Sander3003

As Burak explained, I also added some additional explanations to help developers resolve this issue. In the substation plug-in, when a user assigns multiple instances of the same LNType to a Function element, it should be visualized as shown below:

image

After that, when the user creates a Virtual IED from the Functions, the LDs should include all the defined LNs.

image

However, the current issue is that only the last LN is included in the data model, while the others are ignored.

image

Expected behavior As Burak mentioned, the expected result is that all LNs should be included in the data model of the virtual IED, allocated under the LD that corresponds to the name of the Function element. Below is the expected outcome after creating the virtual IED:

image

DavoodSooran avatar Aug 16 '24 15:08 DavoodSooran

Notes for takeover

Done

  • Added lnInst consideration on element string creation (see packages/openscd/src/foundation.ts)

Next steps

  • Take a closer look at the manually adjusted tests. Were they generated automatically using `web/test-runner'? Does it make sense to customize them manually?

illia-solovei-s1 avatar Nov 25 '24 14:11 illia-solovei-s1

Hi Illia, thanks for taking this issue on!

I'm curious: What's the lnInst consideration? And: Can web/test-runner really automatically generate tests?

ca-d avatar Dec 13 '24 04:12 ca-d