diff --git a/cgmes/cgmes-completion/pom.xml b/cgmes/cgmes-completion/pom.xml new file mode 100644 index 00000000000..b457b441d24 --- /dev/null +++ b/cgmes/cgmes-completion/pom.xml @@ -0,0 +1,103 @@ + + + + 4.0.0 + + + com.powsybl + powsybl-cgmes + 5.4.0-SNAPSHOT + + + powsybl-cgmes-completion + CGMES network model completion + CGMES (Common Grid Model Exchange Specification). Complete missing data in input instance files + + + + + + org.apache.maven.plugins + maven-jar-plugin + + + + com.powsybl.cgmes.completion + + + + + + + + + + + org.slf4j + slf4j-api + + + ${project.groupId} + powsybl-cgmes-conversion + ${project.version} + + + + + ch.qos.logback + logback-classic + test + + + com.google.jimfs + jimfs + test + + + org.junit.jupiter + junit-jupiter + test + + + org.slf4j + log4j-over-slf4j + test + + + ${project.groupId} + powsybl-config-test + ${project.version} + test + + + ${project.groupId} + powsybl-cgmes-conformity + ${project.version} + test + + + ${project.groupId} + powsybl-iidm-impl + ${project.version} + test + + + + + ${project.groupId} + powsybl-triple-store-impl-rdf4j + ${project.version} + test + + + diff --git a/cgmes/cgmes-completion/src/main/java/com/powsybl/cgmes/completion/CreateMissingContainersPreProcessor.java b/cgmes/cgmes-completion/src/main/java/com/powsybl/cgmes/completion/CreateMissingContainersPreProcessor.java new file mode 100644 index 00000000000..1f4e2fc10ee --- /dev/null +++ b/cgmes/cgmes-completion/src/main/java/com/powsybl/cgmes/completion/CreateMissingContainersPreProcessor.java @@ -0,0 +1,263 @@ +/** + * Copyright (c) 2023, RTE (http://www.rte-france.com) + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * SPDX-License-Identifier: MPL-2.0 + */ +package com.powsybl.cgmes.completion; + +import com.google.auto.service.AutoService; +import com.powsybl.cgmes.conversion.CgmesImportPreProcessor; +import com.powsybl.cgmes.conversion.export.CgmesExportContext; +import com.powsybl.cgmes.conversion.export.CgmesExportUtil; +import com.powsybl.cgmes.conversion.export.elements.*; +import com.powsybl.cgmes.extensions.CgmesTopologyKind; +import com.powsybl.cgmes.extensions.CimCharacteristicsAdder; +import com.powsybl.cgmes.model.CgmesModel; +import com.powsybl.cgmes.model.CgmesNames; +import com.powsybl.cgmes.model.triplestore.CgmesModelTripleStore; +import com.powsybl.commons.PowsyblException; +import com.powsybl.commons.config.PlatformConfig; +import com.powsybl.commons.datasource.ZipFileDataSource; +import com.powsybl.commons.parameters.Parameter; +import com.powsybl.commons.parameters.ParameterDefaultValueConfig; +import com.powsybl.commons.parameters.ParameterType; +import com.powsybl.commons.reporter.Reporter; +import com.powsybl.commons.xml.XmlUtil; +import com.powsybl.iidm.network.Network; +import com.powsybl.iidm.network.NetworkFactory; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import javax.xml.stream.XMLStreamException; +import javax.xml.stream.XMLStreamWriter; +import java.io.IOException; +import java.net.URI; +import java.net.URISyntaxException; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.Objects; +import java.util.Optional; +import java.util.Set; +import java.util.stream.Collectors; +import java.util.zip.ZipEntry; +import java.util.zip.ZipOutputStream; + +/** + *

+ * A CGMES pre-processor that defines missing containers in input data. + *

+ * + *

+ * The pre-processor will analyze the input data and check if there are missing container definitions. + * It will then create a CIM-XML file with all required objects (voltage levels, substations, regions, ...) + * that will be used during CGMES import to allow the conversion to PowSyBl Network. + *

+ * + *

+ * It is assumed that all containers missing are voltage levels. + * The user can specify the location folder of the output files using the parameter iidm.import.cgmes.fixes-for-missing-containers-folder. + * The CIM version of the output file will be the same detected for the input data. + * Because no information about voltage level is available, a default arbitrary value for nominal voltage is used. + * The user may edit the generated files and reuse them in successive imports. + *

+ * + * @author Luma Zamarreño + */ +@AutoService(CgmesImportPreProcessor.class) +public class CreateMissingContainersPreProcessor implements CgmesImportPreProcessor { + + public static final String NAME = "createMissingContainers"; + public static final String FIXES_FOLDER_NAME = "iidm.import.cgmes.fixes-for-missing-containers-folder"; + public static final double DEFAULT_NOMINAL_VALUE_FOR_MISSING_VOLTAGE_LEVELS = 100.0; + + private static final Logger LOG = LoggerFactory.getLogger(CreateMissingContainersPreProcessor.class); + private static final Parameter FIXES_FOLDER_NAME_PARAMETER = new Parameter(FIXES_FOLDER_NAME, + ParameterType.STRING, + "Folder where zip files containing fixes will be created: one zip for each imported network missing data", + null); + + private final PlatformConfig platformConfig; + private final ParameterDefaultValueConfig defaultValueConfig; + + public CreateMissingContainersPreProcessor(PlatformConfig platformConfig) { + Objects.requireNonNull(platformConfig); + this.platformConfig = platformConfig; + defaultValueConfig = new ParameterDefaultValueConfig(platformConfig); + } + + public CreateMissingContainersPreProcessor() { + this(PlatformConfig.defaultConfig()); + } + + private static String nameFor(CgmesModel cgmes) { + try { + return new URI(cgmes.getBasename()).getAuthority(); + } catch (URISyntaxException e) { + return cgmes.modelId(); + } + } + + private static void prepareAndReadFixesUsingFolder(CgmesModel cgmes, String basename, Path fixesFolder) { + if (!Files.isDirectory(fixesFolder)) { + LOG.error("Output folder is not a directory {}. Skipping post processor.", fixesFolder); + return; + } + Path fixesFile = fixesFolder.resolve(basename + ".zip"); + // Check the file will be writable + try { + Files.deleteIfExists(fixesFile); + Files.createFile(fixesFile); + } catch (IOException e) { + LOG.error("Output file {} is not writable. Skipping post processor.", fixesFile); + return; + } + if (LOG.isInfoEnabled()) { + LOG.info("Execute {} pre processor on CGMES model {}. Output to file {}", NAME, cgmes.modelId(), fixesFile); + } + prepareAndReadFixesUsingZipFile(cgmes, basename, fixesFile); + } + + private static void prepareAndReadFixesUsingZipFile(CgmesModel cgmes, String basename, Path fixesFile) { + // Assume all containers missing are voltage levels and create proper objects for them (substation, regions, ...) + Set missingVoltageLevels = findMissingVoltageLevels(cgmes); + LOG.info("Missing voltage levels: {}", missingVoltageLevels); + if (!missingVoltageLevels.isEmpty()) { + buildZipFileWithFixes(cgmes, missingVoltageLevels, fixesFile, basename); + cgmes.read(new ZipFileDataSource(fixesFile), Reporter.NO_OP); + } + Set missingVoltageLevelsAfterFix = findMissingVoltageLevels(cgmes); + if (!missingVoltageLevelsAfterFix.isEmpty()) { + throw new IllegalStateException("Missing voltage levels after fix: " + missingVoltageLevelsAfterFix); + } + // The only containers without voltage level must be of type line + LOG.info("After the fixes have been applied, the only node containers without voltage level must be of type Line."); + LOG.info("Containers without voltage level that are not Lines will be reported as errors."); + cgmes.connectivityNodeContainers().stream() + .filter(c -> c.getId(CgmesNames.VOLTAGE_LEVEL) == null) + .filter(c -> !c.getLocal("connectivityNodeContainerType").equals("Line")) + .forEach(c -> LOG.error(c.getId(CgmesNames.CONNECTIVITY_NODE_CONTAINER))); + } + + private static Set findMissingVoltageLevels(CgmesModel cgmes) { + // check missing CN containers + Set defined = cgmes.connectivityNodeContainers().stream().map(c -> c.getId(CgmesNames.CONNECTIVITY_NODE_CONTAINER)).collect(Collectors.toSet()); + Set referred = cgmes.connectivityNodes().stream().map(c -> c.getId(CgmesNames.CONNECTIVITY_NODE_CONTAINER)).collect(Collectors.toSet()); + return referred.stream().filter(c -> !defined.contains(c)).collect(Collectors.toSet()); + } + + private static void buildZipFileWithFixes(CgmesModel cgmes, Set missingVoltageLevels, Path fixesFile, String basename) { + Network network = prepareEmptyNetworkForExport(cgmes); + CgmesExportContext context = new CgmesExportContext(network); + try (ZipOutputStream zout = new ZipOutputStream(Files.newOutputStream(fixesFile))) { + zout.putNextEntry(new ZipEntry(basename + "_EQ.xml")); + XMLStreamWriter writer = XmlUtil.initializeWriter(true, " ", zout); + writeHeader(writer, context); + RegionContainers regionContainers = writeRegionContainers(writer, context); + for (String missingVoltageLevel : missingVoltageLevels) { + writeMissingVoltageLevel(missingVoltageLevel, writer, context, regionContainers); + } + writer.writeEndDocument(); + zout.closeEntry(); + } catch (IOException | XMLStreamException x) { + throw new PowsyblException("Building file containing fixes for missing data", x); + } + } + + private static Network prepareEmptyNetworkForExport(CgmesModel cgmes) { + Network network = NetworkFactory.findDefault().createNetwork("empty", "CGMES"); + // We ensure that the fixes are exported to CGMES files with the same version of the input files + // To achieve it, we set the CIM characteristics of the empty Network created + if (cgmes instanceof CgmesModelTripleStore) { + network.newExtension(CimCharacteristicsAdder.class) + .setTopologyKind(cgmes.isNodeBreaker() ? CgmesTopologyKind.NODE_BREAKER : CgmesTopologyKind.BUS_BRANCH) + .setCimVersion(((CgmesModelTripleStore) cgmes).getCimVersion()) + .add(); + } + return network; + } + + private static RegionContainers writeRegionContainers(XMLStreamWriter writer, CgmesExportContext context) throws XMLStreamException { + String cimNamespace = context.getCim().getNamespace(); + + // An alternative to replicate this code would be to make public the method + // EquipmentExport::writeFictitiousSubstationFor and use it here. + // We could group all missing voltage levels in the same (fictitious) substation + RegionContainers regionContainers = new RegionContainers(); + regionContainers.subGeographicalRegionId = CgmesExportUtil.getUniqueId(); + String subGeographicalRegionName = "SGR fix for missing data"; + regionContainers.geographicalRegionId = CgmesExportUtil.getUniqueId(); + String geographicalRegionName = "GR fix for missing data"; + SubGeographicalRegionEq.write(regionContainers.subGeographicalRegionId, subGeographicalRegionName, regionContainers.geographicalRegionId, cimNamespace, writer, context); + GeographicalRegionEq.write(regionContainers.geographicalRegionId, geographicalRegionName, cimNamespace, writer, context); + return regionContainers; + } + + private static void writeMissingVoltageLevel(String voltageLevelId, XMLStreamWriter writer, CgmesExportContext context, RegionContainers regionContainers) throws XMLStreamException { + String cimNamespace = context.getCim().getNamespace(); + + // In a first approach, + // we do not have additional information about the voltage level, + // we create a different substation and base voltage for every missing voltage level + String voltageLevelName = voltageLevelId + " VL"; + String substationId = CgmesExportUtil.getUniqueId(); + String substationName = voltageLevelId + "SUB for missing VL " + voltageLevelId; + String baseVoltageId = CgmesExportUtil.getUniqueId(); + + VoltageLevelEq.write(voltageLevelId, voltageLevelName, Double.NaN, Double.NaN, substationId, baseVoltageId, cimNamespace, writer, context); + SubstationEq.write(substationId, substationName, regionContainers.subGeographicalRegionId, cimNamespace, writer, context); + BaseVoltageEq.write(baseVoltageId, DEFAULT_NOMINAL_VALUE_FOR_MISSING_VOLTAGE_LEVELS, cimNamespace, writer, context); + } + + private static void writeHeader(XMLStreamWriter writer, CgmesExportContext context) throws XMLStreamException { + String cimNamespace = context.getCim().getNamespace(); + String euNamespace = context.getCim().getEuNamespace(); + CgmesExportUtil.writeRdfRoot(cimNamespace, context.getCim().getEuPrefix(), euNamespace, writer); + if (context.getCimVersion() >= 16) { + ModelDescriptionEq.write(writer, context.getEqModelDescription(), context); + } + } + + private Path getFixesFolder() { + String fixesFolderName = Parameter.readString("CGMES", null, FIXES_FOLDER_NAME_PARAMETER, defaultValueConfig); + if (fixesFolderName == null) { + LOG.error("Executing {} pre processor. Missing the folder name for the output of files containing required fixes. Use the parameter {}.", NAME, FIXES_FOLDER_NAME_PARAMETER.getName()); + return null; + } + Path fixesFolder = Paths.get(fixesFolderName); + if (fixesFolder.isAbsolute()) { + return fixesFolder; + } else { + Optional configDir = platformConfig.getConfigDir(); + if (configDir.isPresent()) { + return configDir.get().resolve(fixesFolderName); + } else { + LOG.error("Executing {} pre processor. The folder name for the output of files containing required fixes is a relative path ({}), but the platform config dir is empty.", NAME, fixesFolderName); + return null; + } + } + } + + @Override + public String getName() { + return NAME; + } + + @Override + public void process(CgmesModel cgmes) { + Objects.requireNonNull(cgmes); + String basename = nameFor(cgmes); + + Path fixesFolder = getFixesFolder(); + if (fixesFolder != null) { + prepareAndReadFixesUsingFolder(cgmes, basename, fixesFolder); + } + } + + private static class RegionContainers { + String subGeographicalRegionId; + String geographicalRegionId; + } +} diff --git a/cgmes/cgmes-completion/src/test/java/com/powsybl/cgmes/completion/CgmesCompletionTest.java b/cgmes/cgmes-completion/src/test/java/com/powsybl/cgmes/completion/CgmesCompletionTest.java new file mode 100644 index 00000000000..300b8293558 --- /dev/null +++ b/cgmes/cgmes-completion/src/test/java/com/powsybl/cgmes/completion/CgmesCompletionTest.java @@ -0,0 +1,83 @@ +/** + * Copyright (c) 2023, RTE (http://www.rte-france.com) + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * SPDX-License-Identifier: MPL-2.0 + */ +package com.powsybl.cgmes.completion; + +import com.google.common.jimfs.Configuration; +import com.google.common.jimfs.Jimfs; +import com.powsybl.cgmes.conformity.CgmesConformity1ModifiedCatalog; +import com.powsybl.cgmes.conversion.CgmesImport; +import com.powsybl.cgmes.conversion.CgmesModelExtension; +import com.powsybl.cgmes.model.CgmesModel; +import com.powsybl.commons.config.InMemoryPlatformConfig; +import com.powsybl.commons.datasource.ReadOnlyDataSource; +import com.powsybl.computation.ComputationManager; +import com.powsybl.computation.local.LocalComputationManager; +import com.powsybl.iidm.network.Importers; +import com.powsybl.iidm.network.Network; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; + +import java.io.IOException; +import java.nio.file.FileSystem; +import java.util.Properties; + +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.fail; + +/** + * @author Luma Zamarreño + */ +class CgmesCompletionTest { + + private FileSystem fileSystem; + + private InMemoryPlatformConfig platformConfig; + + @BeforeEach + void setUp() { + fileSystem = Jimfs.newFileSystem(Configuration.unix()); + platformConfig = new InMemoryPlatformConfig(fileSystem); + } + + @AfterEach + void tearDown() throws Exception { + fileSystem.close(); + } + + @Test + void miniGridNodeBreakerMissingVoltageLevel() throws IOException { + ReadOnlyDataSource dataSource = CgmesConformity1ModifiedCatalog.miniGridNodeBreakerMissingVoltageLevel().dataSource(); + Properties importParams = new Properties(); + importParams.put(CgmesImport.PRE_PROCESSORS, "createMissingContainers"); + + // The only way to pass the output folder where we want the fixes to be written is to use a config file + // Its contents must be: + // + // import-export-parameters-default-value: + // iidm.import.cgmes.fixes-for-missing-containers-folder: "/user/working/area/fixes/..." + // + // When the folder is relative path, + // we assume in the preprocessor that it is relative to the given PlatformConfig dir + // To let the test platformConfig arrive at the preprocessor through the importer mechanism + // we have to import data using explicitly a computationManager + Network network; + try (ComputationManager computationManager = new LocalComputationManager(platformConfig)) { + network = Importers.importData("CGMES", dataSource, importParams, computationManager); + } + assertNotNull(network); + + // Check that a specific terminal has a voltage level, navigating the CGMES model + CgmesModel cgmes = network.getExtension(CgmesModelExtension.class).getCgmesModel(); + String terminalId = "4915762d-133e-4209-8545-2822d095d7cd"; + String voltageLevelId = cgmes.voltageLevel(cgmes.terminal(terminalId), cgmes.isNodeBreaker()); + if (voltageLevelId == null || voltageLevelId.isEmpty()) { + fail("Missing voltage level for terminal " + terminalId); + } + } +} diff --git a/cgmes/cgmes-completion/src/test/resources/com/powsybl/config/test/config.yml b/cgmes/cgmes-completion/src/test/resources/com/powsybl/config/test/config.yml new file mode 100644 index 00000000000..a6d8a51d3ee --- /dev/null +++ b/cgmes/cgmes-completion/src/test/resources/com/powsybl/config/test/config.yml @@ -0,0 +1,3 @@ +import-export-parameters-default-value: + # path relative to the platform config dir + iidm.import.cgmes.fixes-for-missing-containers-folder: "./" diff --git a/cgmes/cgmes-completion/src/test/resources/com/powsybl/config/test/filelist.txt b/cgmes/cgmes-completion/src/test/resources/com/powsybl/config/test/filelist.txt new file mode 100644 index 00000000000..e9abc7f6a85 --- /dev/null +++ b/cgmes/cgmes-completion/src/test/resources/com/powsybl/config/test/filelist.txt @@ -0,0 +1 @@ +config.yml \ No newline at end of file diff --git a/cgmes/cgmes-completion/src/test/resources/logback-test.xml b/cgmes/cgmes-completion/src/test/resources/logback-test.xml new file mode 100644 index 00000000000..16dc8a9d38b --- /dev/null +++ b/cgmes/cgmes-completion/src/test/resources/logback-test.xml @@ -0,0 +1,26 @@ + + + + + + + %-5p %-20C{1} | %m%n + + + + + + + + + + + diff --git a/cgmes/cgmes-conformity/src/main/java/com/powsybl/cgmes/conformity/CgmesConformity1ModifiedCatalog.java b/cgmes/cgmes-conformity/src/main/java/com/powsybl/cgmes/conformity/CgmesConformity1ModifiedCatalog.java index fde763e0e3b..d6561a622c5 100644 --- a/cgmes/cgmes-conformity/src/main/java/com/powsybl/cgmes/conformity/CgmesConformity1ModifiedCatalog.java +++ b/cgmes/cgmes-conformity/src/main/java/com/powsybl/cgmes/conformity/CgmesConformity1ModifiedCatalog.java @@ -1550,5 +1550,21 @@ public static GridModelReferenceResources smallGridBusBranchWithBusbarSectionsAn SMALL_GRID_BD_TP)); } + public static GridModelReference miniGridNodeBreakerMissingVoltageLevel() { + String base = ENTSOE_CONFORMITY_1_MODIFIED + + "/MiniGrid/NodeBreaker/BaseCase_Complete_v3_missing_voltage_level/"; + return new GridModelReferenceResources( + "MiniGrid-NodeBreaker-BaseCase-Complete-v3-missing-voltage-levels", + null, + new ResourceSet(base, + MINI_GRID_EQ), + new ResourceSet(MINI_GRID_NODE_BREAKER_BASE, + MINI_GRID_SSH, + MINI_GRID_SV, + MINI_GRID_TP), + new ResourceSet(MINI_GRID_NODE_BREAKER_BD_BASE, MINI_GRID_BD_EQ, + MINI_GRID_BD_TP)); + } + private static final String ENTSOE_CONFORMITY_1_MODIFIED = "/conformity-modified/cas-1.1.3-data-4.0.3"; } diff --git a/cgmes/cgmes-conformity/src/main/resources/conformity-modified/cas-1.1.3-data-4.0.3/MiniGrid/NodeBreaker/BaseCase_Complete_v3_missing_voltage_level/MiniGridTestConfiguration_BC_EQ_v3.0.0.xml b/cgmes/cgmes-conformity/src/main/resources/conformity-modified/cas-1.1.3-data-4.0.3/MiniGrid/NodeBreaker/BaseCase_Complete_v3_missing_voltage_level/MiniGridTestConfiguration_BC_EQ_v3.0.0.xml new file mode 100644 index 00000000000..9b7ef2f758a --- /dev/null +++ b/cgmes/cgmes-conformity/src/main/resources/conformity-modified/cas-1.1.3-data-4.0.3/MiniGrid/NodeBreaker/BaseCase_Complete_v3_missing_voltage_level/MiniGridTestConfiguration_BC_EQ_v3.0.0.xml @@ -0,0 +1,4480 @@ + + + + 2030-01-02T09:00:00 + 2015-02-05T12:20:50.830 + CGMES Conformity Assessment: Mini Grid Base Case Test Configuration. The model is owned by ENTSO-E and is provided by ENTSO-E "as it is". To the fullest extent permitted by law, ENTSO-E shall not be liable for any damages of any kind arising out of the use of the model (including any of its subsequent modifications). ENTSO-E neither warrants, nor represents that the use of the model will not infringe the rights of third parties. Any use of the model shall include a reference to ENTSO-E. ENTSO-E web site is the only official source of information related to the model. + 4 + http://entsoe.eu/CIM/EquipmentCore/3/1 + http://entsoe.eu/CIM/EquipmentOperation/3/1 + http://entsoe.eu/CIM/EquipmentShortCircuit/3/1 + http://A1.de/Planning/ENTSOE/2 + + + + + L5_0 + 1 + + + + + + L5_1 + 2 + + + + + + L6_0 + 1 + + + + + + L6_1 + 2 + + + + + + L4_0 + 1 + + + + + + L4_1 + 2 + + + + + + L1_0 + 1 + + + + + + L1_1 + 2 + + + + + + L2_0 + 1 + + + + + + L2_1 + 2 + + + + + + L3_a_0 + 1 + + + + + + L3_a_1 + 2 + + + + + + L3_b_0 + 1 + + + + + + L3_b_1 + 2 + + + + + + T5_0 + 1 + + + + + + T5_1 + 2 + + + + + + T6_0 + 1 + + + + + + T6_1 + 2 + + + + + + T2_0 + 1 + + + + + + T2_1 + 2 + + + + + + T1_0 + 1 + + + + + + T1_1 + 2 + + + + + + T4_0 + 1 + + + + + + T4_1 + 2 + + + + + + T4_2 + 3 + + + + + + T3_0 + 1 + + + + + + T3_1 + 2 + + + + + + T3_2 + 3 + + + + + + G2_0 + 1 + + + + + + G1_0 + 1 + + + + + + G3_0 + 1 + + + + + + M1_0 + 1 + + + + + + M2_0 + 1 + + + + + + ASM-1229750300_0 + 1 + + + + + + Q1_0 + 1 + + + + + + Q2_0 + 1 + + + + + + 380kV + 380 + + + 21kV + 21 + + + 10kV + 10 + + + 110kV + 110 + + + 30kV + 30 + + + + S5 10kV + + + + + S4 10kV + + + + + S3 21kV + + + + + S2 110kV + + + + + S3 110kV + + + + + S1 380kV + + + + + S1 30kV + + + + + S4 110kV + + + + + S1 110kV + + + + + Sub1 + + + + Sub2 + + + + Sub3 + + + + Sub4 + + + + Sub5 + + + + AA + + + Z1 + + + + PATL + 45000 + + + + + TATL + 900 + + + + + TATL + 60 + + + + + Gen-1 + G2 + false + + 0 + 127.5 + 0 + + + G2 + + + 0.9 + 100 + 10.5 + + false + 43.6 + -43.6 + 100 + 0 + 0.004535 + 0.16 + 2 + 2 + + + 7.5 + 0.005 + 0.1 + 0.16 + + + Gen-2 + G1 + false + + 0 + 90 + 0 + + + G1 + + 0.85 + 150 + 21 + + false + 79 + -79 + 100 + 0 + 0.00068 + 0.14 + 1.8 + 1.8 + + + 0.002 + 0.1 + 0.14 + + + Gen-3 + G3 + false + + 0 + 8 + 0 + + + G3 + + 0.8 + 10 + 10.5 + + false + 6 + -6 + 100 + 0 + 0.00163 + 0.1 + 1.8 + 1.8 + + + 0.018 + 0.08 + 0.1 + + + M3 + false + + 0.88 + 5.828 + 10 + false + 97.5 + 5 + 1 + 5 + false + 0.1 + + + M2a + false + + 0.89 + 2.321 + 10 + false + 96.8 + 5.2 + 2 + 2 + false + 0.1 + + + M2b + false + + 0.89 + 2.321 + 10 + false + 96.8 + 5.2 + 2 + 2 + false + 0.1 + + + Q1 + + 0 + true + 38000 + 800 + 600 + 0.15 + 0.1 + 3.029 + 0 + -800 + -600 + 0.1 + 0.1 + 1 + 1.1 + + + Q2 + + 0 + true + 16000 + 88 + 66 + 0.2 + 0.1 + 3.34865 + 0 + -88 + -66 + 0 + 0 + 0 + 1.1 + + + Line-7 + L5 + false + + + 15 + 0 + 0 + 0 + 0 + 1.8 + 3.3 + 80 + 5.79 + 16.5 + + + Ratings + + + + Normal + + + 525 + + + ShortTerm + + + 604 + + + Emergency + + + 735 + + + Line-4 + L6 + false + + + 1 + 0 + 0 + 0 + 0 + 0.082 + 0.082 + 80 + 0.086 + 0.086 + + + Ratings + + + + Normal + + + 1155 + + + ShortTerm + + + 1328 + + + Emergency + + + 1617 + + + Line-5 + L4 + false + + + 10 + 0 + 0 + 0 + 0 + 0.96 + 2.2 + 80 + 3.88 + 11 + + + Ratings + + + + Normal + + + 525 + + + ShortTerm + + + 604 + + + Emergency + + + 735 + + + Line-1 + L1 + false + + + 20 + 0 + 0 + 0 + 0 + 2.4 + 6.4 + 80 + 7.8 + 25.2 + + + Ratings + + + + Normal + + + 525 + + + ShortTerm + + + 604 + + + Emergency + + + 735 + + + Line-6 + L2 + false + + + 10 + 0 + 0 + 0 + 0 + 1.2 + 3.2 + 80 + 3.9 + 12.6 + + + Ratings + + + + Normal + + + 525 + + + ShortTerm + + + 604 + + + Emergency + + + 735 + + + Line-2 + L3_a + false + + + 5 + 0 + 0 + 0 + 0 + 0.6 + 2.6 + 80 + 1.95 + 9.3 + + + Ratings + + + + Normal + + + 525 + + + ShortTerm + + + 604 + + + Emergency + + + 735 + + + Line-3 + L3_b + false + + + 5 + 0 + 0 + 0 + 0 + 0.6 + 2.6 + 80 + 1.95 + 9.3 + + + Ratings + + + + Normal + + + 525 + + + ShortTerm + + + 604 + + + Emergency + + + 735 + + + Trafo-1 + T5 + false + + 158.14 + 121.095 + 36.86 + false + false + + + T5 + 0 + 1 + false + 0 + + + 0 + + 0 + 0 + 31.5 + 0 + 115 + 0 + 2.099206 + 2.099206 + 50.3372 + 50.3372 + + + + Ratings + + + + Normal + + + 158 + + + ShortTerm + + + 182 + + + Emergency + + + 222 + + + T5 + 0 + 2 + false + 0 + + + 0 + + 0 + 0 + 31.5 + 0 + 10.5 + 0 + 0 + 0 + 0 + 0 + + + + Ratings + + + + Normal + + + 1732 + + + ShortTerm + + + 1992 + + + Emergency + + + 2425 + + + Trafo-2 + T6 + false + + 158.14 + 121.095 + 36.86 + false + false + + + T6 + 0 + 1 + false + 0 + + + 0 + + 0 + 0 + 31.5 + 0 + 115 + 0 + 2.099206 + 2.099206 + 50.3372 + 50.3372 + + + + Ratings + + + + Normal + + + 158 + + + ShortTerm + + + 182 + + + Emergency + + + 222 + + + T6 + 0 + 2 + true + 100 + + + 0 + + 0 + 0 + 31.5 + 0 + 10.5 + 0 + 0 + 0 + 0 + 0 + + + + Ratings + + + + Normal + + + 1732 + + + ShortTerm + + + 1992 + + + Emergency + + + 2425 + + + Trafo-3 + T2 + false + + 115 + true + false + + + T2 + 0 + 1 + false + 0 + + + 0 + + 0 + 0 + 100 + 0 + 120 + 0 + 0.72 + 0.72 + 17.2649937 + 17.2649937 + + + + Ratings + + + + Normal + + + 481 + + + ShortTerm + + + 553 + + + Emergency + + + 673 + + + T2 + 2 + false + + + 0 + + 0 + 5 + 100 + 0 + 10.5 + 0 + 0 + 0 + 0 + 0 + + + + Ratings + + + + Normal + + + 5498 + + + ShortTerm + + + 6323 + + + Emergency + + + 7698 + + + Trafo-4 + T1 + false + + 115 + true + false + + + T1 + 2 + false + + + 0 + + 0 + 5 + 150 + 0 + 21 + 0 + 0.0147 + 0.0147 + 0.47017 + 0.446662 + + + + Ratings + + + + Normal + + + 4123 + + + ShortTerm + + + 4742 + + + Emergency + + + 5773 + + + T1 + 25 + 1 + true + 13 + 21 + 13 + + 1 + + + + T1 + 0 + 1 + true + 22 + + + 0 + + 0 + 0 + 150 + 0 + 115 + 0 + 0 + 0 + 0 + 0 + + + + Ratings + + + + Normal + + + 753 + + + ShortTerm + + + 866 + + + Emergency + + + 1054 + + + T4 + false + + false + + + T4 + 3 + false + + + 0 + + 0 + 5 + 50 + 0 + 30 + 0 + 0.0254571438 + 0.0254571438 + 1.259741 + 1.176919 + + + + Ratings + + + + Normal + + + 962 + + + ShortTerm + + + 1106 + + + Emergency + + + 1347 + + + T4 + 0 + 2 + true + 0 + + + 0 + + 0 + 0 + 350 + 0 + 120 + 0 + 0.05348571429 + 0.05348571429 + -0.001121283618 + -0.6881 + + + + Ratings + + + + Normal + + + 1683 + + + ShortTerm + + + 1936 + + + Emergency + + + 2357 + + + T4 + 0 + 1 + false + 0 + + + 0 + + 0 + 0 + 350 + 0 + 400 + 0 + 0.5942857143 + 0.5942857143 + 96.0051006 + 95.05666 + + + + Ratings + + + + Normal + + + 505 + + + ShortTerm + + + 580 + + + Emergency + + + 707 + + + Trafo-5 + T3 + false + + false + + + T3 + 0 + 1 + true + 0 + + + 0 + + 0 + 0 + 350 + 0 + 400 + 0 + 0.5942857143 + 0.5942857143 + 96.0051006 + 95.05666 + + + + Ratings + + + + Normal + + + 505 + + + ShortTerm + + + 580 + + + Emergency + + + 707 + + + T3 + 33 + 1 + true + 17 + 400 + 17 + + 1 + + + + T3 + 0 + 2 + false + 0 + + + 0 + + 0 + 0 + 350 + 0 + 120 + 0 + 0.05348571429 + 0.05348571429 + -0.001121283618 + -0.6881 + + + + Ratings + + + + Normal + + + 1683 + + + ShortTerm + + + 1936 + + + Emergency + + + 2357 + + + T3 + 3 + false + + + 0 + + 0 + 5 + 50 + 0 + 30 + 0 + 0.02545714286 + 0.02545714286 + 1.259740894 + 1.176919 + + + + Ratings + + + + Normal + + + 962 + + + ShortTerm + + + 1106 + + + Emergency + + + 1347 + + + T4 + 33 + 1 + true + 17 + 400 + 17 + + 1 + + + + 68-116_0 + 1 + + + + + + 68-116_1 + 2 + + + + + + Injection_0 + 1 + + + + + + 71-73_0 + 1 + + + + + + 71-73_1 + 2 + + + + + + Injection_0 + 1 + + + + + + XQ1-N1 + false + + + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 80 + 0.05 + 0 + + + Ratings + + + + Normal + + + 1000 + + + ShortTerm + + + 1150 + + + Emergency + + + 1400 + + + XQ2-N5 + false + + + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 80 + 0.05 + 0 + + + Ratings + + + + Normal + + + 1000 + + + ShortTerm + + + 1150 + + + Emergency + + + 1400 + + + Injection1 + + + 0.63185 + 2.85315 + 0.63185 + false + 6.3185 + 19.021 + 6.3185 + + + Injection2 + + + 0.43445 + 2.86738 + 0.43445 + false + 4.3445 + 14.3369 + 4.3445 + + + CONNECTIVITY_NODE1 + + + + BUSBAR1 + + + + + L5_0_BUSBAR + 1 + + + + + + BAY_L5_0 + + + + L5_0_ADD_DSC11 + 1 + + + + + + + DISCONNECTOR1 + + + false + false + + + L5_0_ADD_DSC12 + 2 + + + + + + CONNECTIVITY_NODE2 + + + + L5_0_ADDB1 + 1 + + + + + + BREAKER1 + + + false + false + + + L5_0_ADDB2 + 2 + + + + + + CONNECTIVITY_NODE3 + + + + L5_0_ADD_DSC21 + 1 + + + + + + DISCONNECTOR2 + + + false + false + + + L5_0_ADD_DSC22 + 2 + + + + + + CONNECTIVITY_NODE4 + + + + CONNECTIVITY_NODE5 + + + + BUSBAR2 + + + + + L5_1_BUSBAR + 2 + + + + + + BAY_L5_1 + + + + L5_1_ADD_DSC11 + 1 + + + + + + + DISCONNECTOR3 + + + false + false + + + L5_1_ADD_DSC12 + 2 + + + + + + CONNECTIVITY_NODE6 + + + + L5_1_ADDB1 + 1 + + + + + + BREAKER2 + + + false + false + + + L5_1_ADDB2 + 2 + + + + + + CONNECTIVITY_NODE7 + + + + L5_1_ADD_DSC21 + 1 + + + + + + DISCONNECTOR4 + + + false + false + + + L5_1_ADD_DSC22 + 2 + + + + + + CONNECTIVITY_NODE8 + + + + CONNECTIVITY_NODE9 + + + + BUSBAR3 + + + + + L6_0_BUSBAR + 1 + + + + + + BAY_L6_0 + + + + L6_0_ADD_DSC11 + 1 + + + + + + + DISCONNECTOR5 + + + false + false + + + L6_0_ADD_DSC12 + 2 + + + + + + CONNECTIVITY_NODE10 + + + + L6_0_ADDB1 + 1 + + + + + + BREAKER3 + + + false + false + + + L6_0_ADDB2 + 2 + + + + + + CONNECTIVITY_NODE11 + + + + L6_0_ADD_DSC21 + 1 + + + + + + DISCONNECTOR6 + + + false + false + + + L6_0_ADD_DSC22 + 2 + + + + + + CONNECTIVITY_NODE12 + + + + CONNECTIVITY_NODE13 + + + + BUSBAR4 + + + + + L6_1_BUSBAR + 2 + + + + + + BAY_L6_1 + + + + L6_1_ADD_DSC11 + 1 + + + + + + + DISCONNECTOR7 + + + false + false + + + L6_1_ADD_DSC12 + 2 + + + + + + CONNECTIVITY_NODE14 + + + + L6_1_ADDB1 + 1 + + + + + + BREAKER4 + + + false + false + + + L6_1_ADDB2 + 2 + + + + + + CONNECTIVITY_NODE15 + + + + L6_1_ADD_DSC21 + 1 + + + + + + DISCONNECTOR8 + + + false + false + + + L6_1_ADD_DSC22 + 2 + + + + + + CONNECTIVITY_NODE16 + + + + BAY_L4_0 + + + + L4_0_ADD_DSC11 + 1 + + + + + + + DISCONNECTOR9 + + + false + false + + + L4_0_ADD_DSC12 + 2 + + + + + + CONNECTIVITY_NODE17 + + + + L4_0_ADDB1 + 1 + + + + + + BREAKER5 + + + false + false + + + L4_0_ADDB2 + 2 + + + + + + CONNECTIVITY_NODE18 + + + + L4_0_ADD_DSC21 + 1 + + + + + + DISCONNECTOR10 + + + false + false + + + L4_0_ADD_DSC22 + 2 + + + + + + CONNECTIVITY_NODE19 + + + + CONNECTIVITY_NODE20 + + + + BUSBAR5 + + + + + L4_1_BUSBAR + 2 + + + + + + BAY_L4_1 + + + + L4_1_ADD_DSC11 + 1 + + + + + + + DISCONNECTOR11 + + + false + false + + + L4_1_ADD_DSC12 + 2 + + + + + + CONNECTIVITY_NODE21 + + + + L4_1_ADDB1 + 1 + + + + + + BREAKER6 + + + false + false + + + L4_1_ADDB2 + 2 + + + + + + CONNECTIVITY_NODE22 + + + + L4_1_ADD_DSC21 + 1 + + + + + + DISCONNECTOR12 + + + false + false + + + L4_1_ADD_DSC22 + 2 + + + + + + CONNECTIVITY_NODE23 + + + + CONNECTIVITY_NODE24 + + + + BUSBAR6 + + + + + L1_0_BUSBAR + 1 + + + + + + BAY_L1_0 + + + + L1_0_ADD_DSC11 + 1 + + + + + + + DISCONNECTOR13 + + + false + false + + + L1_0_ADD_DSC12 + 2 + + + + + + CONNECTIVITY_NODE25 + + + + L1_0_ADDB1 + 1 + + + + + + BREAKER7 + + + false + false + + + L1_0_ADDB2 + 2 + + + + + + CONNECTIVITY_NODE26 + + + + L1_0_ADD_DSC21 + 1 + + + + + + DISCONNECTOR14 + + + false + false + + + L1_0_ADD_DSC22 + 2 + + + + + + CONNECTIVITY_NODE27 + + + + BAY_L1_1 + + + + L1_1_ADD_DSC11 + 1 + + + + + + + DISCONNECTOR15 + + + false + false + + + L1_1_ADD_DSC12 + 2 + + + + + + CONNECTIVITY_NODE28 + + + + L1_1_ADDB1 + 1 + + + + + + BREAKER8 + + + false + false + + + L1_1_ADDB2 + 2 + + + + + + CONNECTIVITY_NODE29 + + + + L1_1_ADD_DSC21 + 1 + + + + + + DISCONNECTOR16 + + + false + false + + + L1_1_ADD_DSC22 + 2 + + + + + + CONNECTIVITY_NODE30 + + + + BAY_L2_0 + + + + L2_0_ADD_DSC11 + 1 + + + + + + + DISCONNECTOR17 + + + false + false + + + L2_0_ADD_DSC12 + 2 + + + + + + CONNECTIVITY_NODE31 + + + + L2_0_ADDB1 + 1 + + + + + + BREAKER9 + + + false + false + + + L2_0_ADDB2 + 2 + + + + + + CONNECTIVITY_NODE32 + + + + L2_0_ADD_DSC21 + 1 + + + + + + DISCONNECTOR18 + + + false + false + + + L2_0_ADD_DSC22 + 2 + + + + + + CONNECTIVITY_NODE33 + + + + BAY_L2_1 + + + + L2_1_ADD_DSC11 + 1 + + + + + + + DISCONNECTOR19 + + + false + false + + + L2_1_ADD_DSC12 + 2 + + + + + + CONNECTIVITY_NODE34 + + + + L2_1_ADDB1 + 1 + + + + + + BREAKER10 + + + false + false + + + L2_1_ADDB2 + 2 + + + + + + CONNECTIVITY_NODE35 + + + + L2_1_ADD_DSC21 + 1 + + + + + + DISCONNECTOR20 + + + false + false + + + L2_1_ADD_DSC22 + 2 + + + + + + CONNECTIVITY_NODE36 + + + + BAY_L3_a_0 + + + + L3_a_0_ADD_DSC11 + 1 + + + + + + + DISCONNECTOR21 + + + false + false + + + L3_a_0_ADD_DSC12 + 2 + + + + + + CONNECTIVITY_NODE37 + + + + L3_a_0_ADDB1 + 1 + + + + + + BREAKER11 + + + false + false + + + L3_a_0_ADDB2 + 2 + + + + + + CONNECTIVITY_NODE38 + + + + L3_a_0_ADD_DSC21 + 1 + + + + + + DISCONNECTOR22 + + + false + false + + + L3_a_0_ADD_DSC22 + 2 + + + + + + CONNECTIVITY_NODE39 + + + + BAY_L3_a_1 + + + + L3_a_1_ADD_DSC11 + 1 + + + + + + + DISCONNECTOR23 + + + false + false + + + L3_a_1_ADD_DSC12 + 2 + + + + + + CONNECTIVITY_NODE40 + + + + L3_a_1_ADDB1 + 1 + + + + + + BREAKER12 + + + false + false + + + L3_a_1_ADDB2 + 2 + + + + + + CONNECTIVITY_NODE41 + + + + L3_a_1_ADD_DSC21 + 1 + + + + + + DISCONNECTOR24 + + + false + false + + + L3_a_1_ADD_DSC22 + 2 + + + + + + CONNECTIVITY_NODE42 + + + + BAY_L3_b_0 + + + + L3_b_0_ADD_DSC11 + 1 + + + + + + + DISCONNECTOR25 + + + false + false + + + L3_b_0_ADD_DSC12 + 2 + + + + + + CONNECTIVITY_NODE43 + + + + L3_b_0_ADDB1 + 1 + + + + + + BREAKER13 + + + false + false + + + L3_b_0_ADDB2 + 2 + + + + + + CONNECTIVITY_NODE44 + + + + L3_b_0_ADD_DSC21 + 1 + + + + + + DISCONNECTOR26 + + + false + false + + + L3_b_0_ADD_DSC22 + 2 + + + + + + CONNECTIVITY_NODE45 + + + + BAY_L3_b_1 + + + + L3_b_1_ADD_DSC11 + 1 + + + + + + + DISCONNECTOR27 + + + false + false + + + L3_b_1_ADD_DSC12 + 2 + + + + + + CONNECTIVITY_NODE46 + + + + L3_b_1_ADDB1 + 1 + + + + + + BREAKER14 + + + false + false + + + L3_b_1_ADDB2 + 2 + + + + + + CONNECTIVITY_NODE47 + + + + L3_b_1_ADD_DSC21 + 1 + + + + + + DISCONNECTOR28 + + + false + false + + + L3_b_1_ADD_DSC22 + 2 + + + + + + CONNECTIVITY_NODE48 + + + + BAY_T5_0 + + + + T5_0_ADD_DSC11 + 1 + + + + + + + DISCONNECTOR29 + + + false + false + + + T5_0_ADD_DSC12 + 2 + + + + + + CONNECTIVITY_NODE49 + + + + T5_0_ADDB1 + 1 + + + + + + BREAKER15 + + + false + false + + + T5_0_ADDB2 + 2 + + + + + + CONNECTIVITY_NODE50 + + + + T5_0_ADD_DSC21 + 1 + + + + + + DISCONNECTOR30 + + + false + false + + + T5_0_ADD_DSC22 + 2 + + + + + + CONNECTIVITY_NODE51 + + + + BAY_T5_1 + + + + T5_1_ADD_DSC11 + 1 + + + + + + + DISCONNECTOR31 + + + false + false + + + T5_1_ADD_DSC12 + 2 + + + + + + CONNECTIVITY_NODE52 + + + + T5_1_ADDB1 + 1 + + + + + + BREAKER16 + + + false + false + + + T5_1_ADDB2 + 2 + + + + + + CONNECTIVITY_NODE53 + + + + T5_1_ADD_DSC21 + 1 + + + + + + DISCONNECTOR32 + + + false + false + + + T5_1_ADD_DSC22 + 2 + + + + + + CONNECTIVITY_NODE54 + + + + BAY_T6_0 + + + + T6_0_ADD_DSC11 + 1 + + + + + + + DISCONNECTOR33 + + + false + false + + + T6_0_ADD_DSC12 + 2 + + + + + + CONNECTIVITY_NODE55 + + + + T6_0_ADDB1 + 1 + + + + + + BREAKER17 + + + false + false + + + T6_0_ADDB2 + 2 + + + + + + CONNECTIVITY_NODE56 + + + + T6_0_ADD_DSC21 + 1 + + + + + + DISCONNECTOR34 + + + false + false + + + T6_0_ADD_DSC22 + 2 + + + + + + CONNECTIVITY_NODE57 + + + + BAY_T6_1 + + + + T6_1_ADD_DSC11 + 1 + + + + + + + DISCONNECTOR35 + + + false + false + + + T6_1_ADD_DSC12 + 2 + + + + + + CONNECTIVITY_NODE58 + + + + T6_1_ADDB1 + 1 + + + + + + BREAKER18 + + + false + false + + + T6_1_ADDB2 + 2 + + + + + + CONNECTIVITY_NODE59 + + + + T6_1_ADD_DSC21 + 1 + + + + + + DISCONNECTOR36 + + + false + false + + + T6_1_ADD_DSC22 + 2 + + + + + + CONNECTIVITY_NODE60 + + + + BAY_T2_0 + + + + T2_0_ADD_DSC11 + 1 + + + + + + + DISCONNECTOR37 + + + false + false + + + T2_0_ADD_DSC12 + 2 + + + + + + CONNECTIVITY_NODE61 + + + + T2_0_ADDB1 + 1 + + + + + + BREAKER19 + + + false + false + + + T2_0_ADDB2 + 2 + + + + + + CONNECTIVITY_NODE62 + + + + T2_0_ADD_DSC21 + 1 + + + + + + DISCONNECTOR38 + + + false + false + + + T2_0_ADD_DSC22 + 2 + + + + + + CONNECTIVITY_NODE63 + + + + CONNECTIVITY_NODE64 + + + + BUSBAR7 + + + + + T2_1_BUSBAR + 2 + + + + + + BAY_T2_1 + + + + T2_1_ADD_DSC11 + 1 + + + + + + + DISCONNECTOR39 + + + false + false + + + T2_1_ADD_DSC12 + 2 + + + + + + CONNECTIVITY_NODE65 + + + + T2_1_ADDB1 + 1 + + + + + + BREAKER20 + + + false + false + + + T2_1_ADDB2 + 2 + + + + + + CONNECTIVITY_NODE66 + + + + T2_1_ADD_DSC21 + 1 + + + + + + DISCONNECTOR40 + + + false + false + + + T2_1_ADD_DSC22 + 2 + + + + + + CONNECTIVITY_NODE67 + + + + CONNECTIVITY_NODE68 + + + + BUSBAR8 + + + + + T1_0_BUSBAR + 1 + + + + + + BAY_T1_0 + + + + T1_0_ADD_DSC11 + 1 + + + + + + + DISCONNECTOR41 + + + false + false + + + T1_0_ADD_DSC12 + 2 + + + + + + CONNECTIVITY_NODE69 + + + + T1_0_ADDB1 + 1 + + + + + + BREAKER21 + + + false + false + + + T1_0_ADDB2 + 2 + + + + + + CONNECTIVITY_NODE70 + + + + T1_0_ADD_DSC21 + 1 + + + + + + DISCONNECTOR42 + + + false + false + + + T1_0_ADD_DSC22 + 2 + + + + + + CONNECTIVITY_NODE71 + + + + BAY_T1_1 + + + + T1_1_ADD_DSC11 + 1 + + + + + + + DISCONNECTOR43 + + + false + false + + + T1_1_ADD_DSC12 + 2 + + + + + + CONNECTIVITY_NODE72 + + + + T1_1_ADDB1 + 1 + + + + + + BREAKER22 + + + false + false + + + T1_1_ADDB2 + 2 + + + + + + CONNECTIVITY_NODE73 + + + + T1_1_ADD_DSC21 + 1 + + + + + + DISCONNECTOR44 + + + false + false + + + T1_1_ADD_DSC22 + 2 + + + + + + CONNECTIVITY_NODE74 + + + + CONNECTIVITY_NODE75 + + + + BUSBAR9 + + + + + T4_0_BUSBAR + 1 + + + + + + BAY_T4_0 + + + + T4_0_ADD_DSC11 + 1 + + + + + + + DISCONNECTOR45 + + + false + false + + + T4_0_ADD_DSC12 + 2 + + + + + + CONNECTIVITY_NODE76 + + + + T4_0_ADDB1 + 1 + + + + + + BREAKER23 + + + false + false + + + T4_0_ADDB2 + 2 + + + + + + CONNECTIVITY_NODE77 + + + + T4_0_ADD_DSC21 + 1 + + + + + + DISCONNECTOR46 + + + false + false + + + T4_0_ADD_DSC22 + 2 + + + + + + CONNECTIVITY_NODE78 + + + + BAY_T4_1 + + + + T4_1_ADD_DSC11 + 1 + + + + + + + DISCONNECTOR47 + + + false + false + + + T4_1_ADD_DSC12 + 2 + + + + + + CONNECTIVITY_NODE79 + + + + T4_1_ADDB1 + 1 + + + + + + BREAKER24 + + + false + false + + + T4_1_ADDB2 + 2 + + + + + + CONNECTIVITY_NODE80 + + + + T4_1_ADD_DSC21 + 1 + + + + + + DISCONNECTOR48 + + + false + false + + + T4_1_ADD_DSC22 + 2 + + + + + + CONNECTIVITY_NODE81 + + + + CONNECTIVITY_NODE82 + + + + BUSBAR10 + + + + + T4_2_BUSBAR + 3 + + + + + + BAY_T4_2 + + + + T4_2_ADD_DSC11 + 1 + + + + + + + DISCONNECTOR49 + + + false + false + + + T4_2_ADD_DSC12 + 2 + + + + + + CONNECTIVITY_NODE83 + + + + T4_2_ADDB1 + 1 + + + + + + BREAKER25 + + + false + false + + + T4_2_ADDB2 + 2 + + + + + + CONNECTIVITY_NODE84 + + + + T4_2_ADD_DSC21 + 1 + + + + + + DISCONNECTOR50 + + + false + false + + + T4_2_ADD_DSC22 + 2 + + + + + + CONNECTIVITY_NODE85 + + + + BAY_T3_0 + + + + T3_0_ADD_DSC11 + 1 + + + + + + + DISCONNECTOR51 + + + false + false + + + T3_0_ADD_DSC12 + 2 + + + + + + CONNECTIVITY_NODE86 + + + + T3_0_ADDB1 + 1 + + + + + + BREAKER26 + + + false + false + + + T3_0_ADDB2 + 2 + + + + + + CONNECTIVITY_NODE87 + + + + T3_0_ADD_DSC21 + 1 + + + + + + DISCONNECTOR52 + + + false + false + + + T3_0_ADD_DSC22 + 2 + + + + + + CONNECTIVITY_NODE88 + + + + BAY_T3_1 + + + + T3_1_ADD_DSC11 + 1 + + + + + + + DISCONNECTOR53 + + + false + false + + + T3_1_ADD_DSC12 + 2 + + + + + + CONNECTIVITY_NODE89 + + + + T3_1_ADDB1 + 1 + + + + + + BREAKER27 + + + false + false + + + T3_1_ADDB2 + 2 + + + + + + CONNECTIVITY_NODE90 + + + + T3_1_ADD_DSC21 + 1 + + + + + + DISCONNECTOR54 + + + false + false + + + T3_1_ADD_DSC22 + 2 + + + + + + CONNECTIVITY_NODE91 + + + + CONNECTIVITY_NODE92 + + + + BUSBAR11 + + + + + T3_2_BUSBAR + 3 + + + + + + BAY_T3_2 + + + + T3_2_ADD_DSC11 + 1 + + + + + + + DISCONNECTOR55 + + + false + false + + + T3_2_ADD_DSC12 + 2 + + + + + + CONNECTIVITY_NODE93 + + + + T3_2_ADDB1 + 1 + + + + + + BREAKER28 + + + false + false + + + T3_2_ADDB2 + 2 + + + + + + CONNECTIVITY_NODE94 + + + + T3_2_ADD_DSC21 + 1 + + + + + + DISCONNECTOR56 + + + false + false + + + T3_2_ADD_DSC22 + 2 + + + + + + CONNECTIVITY_NODE95 + + + + BAY_68-116_0 + + + + 68-116_0_ADD_DSC11 + 1 + + + + + + + DISCONNECTOR57 + + + false + false + + + 68-116_0_ADD_DSC12 + 2 + + + + + + CONNECTIVITY_NODE96 + + + + 68-116_0_ADDB1 + 1 + + + + + + BREAKER29 + + + false + false + + + 68-116_0_ADDB2 + 2 + + + + + + CONNECTIVITY_NODE97 + + + + 68-116_0_ADD_DSC21 + 1 + + + + + + DISCONNECTOR58 + + + false + false + + + 68-116_0_ADD_DSC22 + 2 + + + + + + CONNECTIVITY_NODE98 + + + + BAY_71-73_0 + + + + 71-73_0_ADD_DSC11 + 1 + + + + + + + DISCONNECTOR59 + + + false + false + + + 71-73_0_ADD_DSC12 + 2 + + + + + + CONNECTIVITY_NODE100 + + + + 71-73_0_ADDB1 + 1 + + + + + + BREAKER30 + + + false + false + + + 71-73_0_ADDB2 + 2 + + + + + + CONNECTIVITY_NODE101 + + + + 71-73_0_ADD_DSC21 + 1 + + + + + + DISCONNECTOR60 + + + false + false + + + 71-73_0_ADD_DSC22 + 2 + + + + + + CONNECTIVITY_NODE102 + + + + GEN_A1 + + + + + _CA_A1 + + + + 5 + 1 + + + 4 + 1 + + + 6 + 1 + + + 7 + 1 + + + 3 + 1 + + + 2 + 1 + + + HG2 + 1 + + + HG1 + 1 + + + H + 1 + + + 1 + 1 + + + 8 + 1 + + + Container for Line-7 + + + + Container for Line-4 + + + + Container for Line-5 + + + + Container for Line-1 + + + + Container for Line-6 + + + + Container for Line-2 + + + + Container for Line-3 + + + + TwinBrch SM + + + + + PATLT + 4000 + + + + + Normal + + + 525 + + + Normal + + + 1155 + + + Normal + + + 525 + + + Normal + + + 525 + + + Normal + + + 525 + + + Normal + + + 525 + + + Normal + + + 525 + + + Normal + + + 158 + + + Normal + + + 1732 + + + Normal + + + 158 + + + Normal + + + 1732 + + + Normal + + + 481 + + + Normal + + + 5498 + + + Normal + + + 4123 + + + Normal + + + 753 + + + Normal + + + 962 + + + Normal + + + 1683 + + + Normal + + + 505 + + + Normal + + + 505 + + + Normal + + + 1683 + + + Normal + + + 962 + + + Normal + + + 1000 + + + Normal + + + 1000 + + diff --git a/cgmes/cgmes-model/src/main/java/com/powsybl/cgmes/model/AbstractCgmesModel.java b/cgmes/cgmes-model/src/main/java/com/powsybl/cgmes/model/AbstractCgmesModel.java index a97259eebf0..1d1d3211e23 100644 --- a/cgmes/cgmes-model/src/main/java/com/powsybl/cgmes/model/AbstractCgmesModel.java +++ b/cgmes/cgmes-model/src/main/java/com/powsybl/cgmes/model/AbstractCgmesModel.java @@ -254,6 +254,7 @@ public void read(ReadOnlyDataSource mainDataSource, ReadOnlyDataSource alternati @Override public void read(ReadOnlyDataSource ds, Reporter reporter) { Objects.requireNonNull(reporter); + invalidateCaches(); CgmesOnDataSource cds = new CgmesOnDataSource(ds); for (String name : cds.names()) { LOG.info("Reading [{}]", name); @@ -273,6 +274,20 @@ public void read(ReadOnlyDataSource ds, Reporter reporter) { } } + protected void invalidateCaches() { + cachedGroupedTransformerEnds = null; + powerTransformerRatioTapChanger = null; + powerTransformerPhaseTapChanger = null; + cachedTerminals = null; + cachedContainers = null; + cachedBaseVoltages = null; + cachedNodes = false; + cachedConnectivityNodes = null; + cachedTopologicalNodes = null; + cachedNodesById = null; + cachedDcTerminals = null; + } + private final Properties properties; private String baseName; diff --git a/cgmes/cgmes-model/src/main/java/com/powsybl/cgmes/model/CgmesNames.java b/cgmes/cgmes-model/src/main/java/com/powsybl/cgmes/model/CgmesNames.java index 1dcd7a60ae8..4d9384469c0 100644 --- a/cgmes/cgmes-model/src/main/java/com/powsybl/cgmes/model/CgmesNames.java +++ b/cgmes/cgmes-model/src/main/java/com/powsybl/cgmes/model/CgmesNames.java @@ -115,6 +115,8 @@ public final class CgmesNames { public static final String TOPOLOGICAL_NODE_BOUNDARY = "TopologicalNode_Boundary"; public static final String GENERATOR_OR_MOTOR = "generatorOrMotor"; + public static final String CONNECTIVITY_NODE_CONTAINER = "ConnectivityNodeContainer"; + private CgmesNames() { } } diff --git a/cgmes/cgmes-model/src/main/resources/CIM16.sparql b/cgmes/cgmes-model/src/main/resources/CIM16.sparql index 8f014076e91..8de9d9a1996 100644 --- a/cgmes/cgmes-model/src/main/resources/CIM16.sparql +++ b/cgmes/cgmes-model/src/main/resources/CIM16.sparql @@ -282,7 +282,10 @@ SELECT * # query: connectivityNodeContainers SELECT * WHERE { -{ GRAPH ?graphEQ { +# Definition of containers are in EQ instance files. +# A Bay may be in a different instance file of its containing Voltage Level, +# and a Voltage Level in a different instance file of its containing Substation. +# This is why we do not use a "restrictive" GRAPH clause here. ?ConnectivityNodeContainer a ?connectivityNodeContainerType . VALUES ?connectivityNodeContainerType { cim:VoltageLevel cim:Bay cim:Line } . OPTIONAL { @@ -296,7 +299,6 @@ WHERE { cim:Bay.VoltageLevel ?VoltageLevel . ?VoltageLevel cim:VoltageLevel.Substation ?Substation } -}} } # query: voltages diff --git a/cgmes/pom.xml b/cgmes/pom.xml index a57019fb660..7a52588a5e5 100644 --- a/cgmes/pom.xml +++ b/cgmes/pom.xml @@ -22,6 +22,7 @@ CGMES aggregator module + cgmes-completion cgmes-conformity cgmes-conversion cgmes-extensions diff --git a/distribution-core/pom.xml b/distribution-core/pom.xml index 7b850afc689..5b8cf1dfa3e 100644 --- a/distribution-core/pom.xml +++ b/distribution-core/pom.xml @@ -72,6 +72,12 @@ ${project.version} + + ${project.groupId} + powsybl-cgmes-completion + ${project.version} + + ${project.groupId} powsybl-cgmes-conformity