You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CGMES importer looks for _EQ_ or _EQ. string presence in file name to filter for EQ profiles.
Describe the expected behavior
A more robust solution would rather check only the model header md:Model.profile to determine what profile(s) a file contains.
Describe the motivation
Got an issue with non-obvious stack trace with one IGM where files were named (allegedly weirdly):
confidential_EQ_confidential_EQ.xml
confidential_EQ_confidential_SSH.xml
confidential_EQ_confidential_SV.xml
confidential_EQ_confidential_TP.xml
All of them are then considered as EQ. Because they all have same md:Model.modelingAuthoritySet the import then fails with default importer settings.
Workarounds are:
renaming files
changing iidm.import.cgmes.cgm-with-subnetworks-defined-by to FILENAME (consequences may be acceptable or not)
changing iidm.import.cgmes.cgm-with-subnetworks to false (consequences may be acceptable or not)
Extra Information
powsybl-core 6.5.0
DEBUG:powsybl:Duplicate key MAS (attempted merging values [confidential_EQ_confidential_SV.xml] and [confidential_EQ_confidential_TP.xml])
java.lang.IllegalStateException: Duplicate key MAS (attempted merging values [confidential_EQ_confidential_SV.xml] and [confidential_EQ_confidential_TP.xml])
at java.base@17.0.11/java.util.stream.Collectors.duplicateKeyException(Collectors.java:135)
at java.base@17.0.11/java.util.stream.Collectors.lambda$uniqKeysMapAccumulator$1(Collectors.java:182)
at java.base@17.0.11/java.util.stream.ReduceOps$3ReducingSink.accept(ReduceOps.java:169)
at java.base@17.0.11/java.util.stream.Streams$StreamBuilderImpl.forEachRemaining(Streams.java:411)
at java.base@17.0.11/java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:762)
at java.base@17.0.11/java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:276)
at java.base@17.0.11/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
at java.base@17.0.11/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:179)
at java.base@17.0.11/java.util.HashMap$KeySpliterator.forEachRemaining(HashMap.java:1707)
at java.base@17.0.11/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
at java.base@17.0.11/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
at java.base@17.0.11/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:921)
at java.base@17.0.11/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base@17.0.11/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:682)
at com.powsybl.cgmes.conversion.CgmesImport$MultipleGridModelChecker.separateByModelingAuthority(CgmesImport.java:260)
at com.powsybl.cgmes.conversion.CgmesImport$MultipleGridModelChecker.separate(CgmesImport.java:247)
at com.powsybl.cgmes.conversion.CgmesImport.importData(CgmesImport.java:163)
at com.powsybl.iidm.network.Network.read(Network.java:128)
at com.powsybl.iidm.network.Network.read(Network.java:135)
at com.powsybl.python.network.NetworkCFunctions.lambda$loadNetwork$6(NetworkCFunctions.java:171)
at com.powsybl.python.commons.Util.doCatch(Util.java:132)
at com.powsybl.python.network.NetworkCFunctions.loadNetwork(NetworkCFunctions.java:163)
The text was updated successfully, but these errors were encountered:
From the names of your files, EQ should be a businessProcess, which I think is not.
Here we were looking only at the filename to have a fast way of splitting a data source that contained multiple IGMs, trying to avoid reading "inside" each XML. But we have to obtain the modelling authority anyway (by reading the header), so it makes sense to check also the profile.
Describe the current behavior
CGMES importer looks for
_EQ_
or_EQ.
string presence in file name to filter for EQ profiles.Describe the expected behavior
A more robust solution would rather check only the model header
md:Model.profile
to determine what profile(s) a file contains.Describe the motivation
Got an issue with non-obvious stack trace with one IGM where files were named (allegedly weirdly):
confidential_EQ_confidential_EQ.xml
confidential_EQ_confidential_SSH.xml
confidential_EQ_confidential_SV.xml
confidential_EQ_confidential_TP.xml
All of them are then considered as
EQ
. Because they all have samemd:Model.modelingAuthoritySet
the import then fails with default importer settings.Workarounds are:
iidm.import.cgmes.cgm-with-subnetworks-defined-by
toFILENAME
(consequences may be acceptable or not)iidm.import.cgmes.cgm-with-subnetworks
tofalse
(consequences may be acceptable or not)Extra Information
powsybl-core 6.5.0
The text was updated successfully, but these errors were encountered: