-
Notifications
You must be signed in to change notification settings - Fork 5
Description
Currently I find that the behaviour of removeIED for LNodes is to replace the IED name with None when the IED is removed.
This behaviour is problematic for me when removing a number of IEDs in the Remove IEDs plugin in Transpower's distribution.
It leaves a large number of dangling LNode elements.
For various reasons we often map an LPHD node for each IED against a busbar bay.
After removing several IEDs this section looks like this:
<Function name="BusPhysConnection">
<LNode iedName="None" lnClass="LPHD" lnInst="0"/>
<LNode iedName="XAT_242_C1" ldInst="CFG" lnClass="LPHD" lnInst="0"/>
<LNode iedName="None" lnClass="LPHD" lnInst="0"/>
<LNode iedName="None" prefix="DevID" lnClass="LPHD" lnInst="1"/>
<LNode iedName="None" prefix="DevID" lnClass="LPHD" lnInst="1"/>
<LNode iedName="None" lnClass="LPHD" lnInst="1"/>
<LNode iedName="None" prefix="DevID" lnClass="LPHD" lnInst="1"/>
<LNode iedName="None" prefix="DevID" lnClass="LPHD" lnInst="1"/>
<LNode iedName="None" lnClass="LPHD" lnInst="1"/>
<LNode iedName="None" lnClass="LPHD" lnInst="1"/>
<LNode iedName="None" lnClass="LPHD" lnInst="1"/>
<LNode iedName="None" lnClass="LPHD" lnInst="1"/>
<LNode iedName="None" lnClass="LPHD" lnInst="0"/>
<LNode iedName="None" lnClass="LPHD" lnInst="0"/>
<LNode iedName="None" lnClass="LPHD" lnInst="0"/>
<LNode iedName="None" lnClass="LPHD" lnInst="0"/>
<LNode iedName="None" lnClass="LPHD" lnInst="0"/>
<LNode iedName="None" lnClass="LPHD" lnInst="0"/>
</Function>This however becomes a schema violation:
The reason for this is spelt out in Table 8 of IEC 61850 Ed 2.1 and the subsequent text:
For specifications where iedName=”None” everywhere, the combination of the other attributes
must be unique within the same level. This means e.g. that the prefix or lnInst should be
different if several LNs with identical lnClass are used within the same substation part (i.e.
same bay). This should also be the case for IED names, if application related naming (see
8.5.4) shall be used. This is NOT checked by the SCL schema, therefore it is the
responsibility of the project engineer or system tool, if application related naming shall be
used additionally to product (IED)-related naming.
What should the behaviour of the removeIED function be here?
In my view at the least we need to provide an option to allow removal of LNodes to allow a bulk delete of IEDs without dangling, unnecessary schema non-compliance which is at least one common workflow option. I am confident it is also a valid workflow to sometimes retain the LNodes so I think it is a good case for an optional argument.
@JakobVogelsang WDYT?
Would you accept:
export type RemoveIedOptions = {
removeLNodes: boolean;
};
function removeIED(remove: Remove,
options: RemoveIedOptions = { removeLNodes: false }): (Update | Remove)[] {
...
}If you are happy with this call signature I can prepare a PR.
