xmlsw.writeCharacters(String.valueOf(getMaximumSections())); xmlsw.writeEndElement();
newmaximumSections = otherShuntCompensator.getMaximumSections(); this.setMaximumSections(newmaximumSections);
private void createShunt(VoltageLevel voltageLevel, cim1.model.ShuntCompensator sc) { LOGGER.trace("Create shunt compensator {}", namingStrategy.getId(sc)); cim1.model.Terminal t = sc.getTerminals().get(0); cim1.model.TopologicalNode tn = t.getTopologicalNode(); int sectionCount = (int) sc.getSvShuntCompensatorSections().getContinuousSections(); sectionCount = Math.abs(sectionCount); // RTE Convergence CIM export bug (SVC) float bPerSection = sc.getBPerSection(); if (bPerSection == 0) { bPerSection = Float.MIN_VALUE; LOGGER.warn("Fix {} susceptance per section: 0 -> {}", sc.getId(), bPerSection); } ShuntCompensator shunt = voltageLevel.newShuntCompensator() .setId(namingStrategy.getId(sc)) .setName(namingStrategy.getName(sc)) .setEnsureIdUnicity(false) .setBus(t.isConnected() ? namingStrategy.getId(tn) : null) .setConnectableBus(namingStrategy.getId(tn)) .setCurrentSectionCount(sectionCount) .setbPerSection(bPerSection) .setMaximumSectionCount(Math.max(sc.getMaximumSections(), sectionCount)) .add(); addTerminalMapping(tn, shunt.getTerminal()); cim1.model.SvPowerFlow svfp = t.getSvPowerFlow(); if (svfp != null) { shunt.getTerminal().setQ(svfp.getQ()); } }