newgPerSection = otherShuntCompensator.getGPerSection(); this.setGPerSection(newgPerSection); newbPerSection = otherShuntCompensator.getBPerSection(); this.setBPerSection(newbPerSection); newg0PerSection = otherShuntCompensator.getG0PerSection(); this.setG0PerSection(newg0PerSection); newb0PerSection = otherShuntCompensator.getB0PerSection(); this.setB0PerSection(newb0PerSection); newmaximumSections = otherShuntCompensator.getMaximumSections(); this.setMaximumSections(newmaximumSections); SvShuntCompensatorSections svShuntCompensatorSectionsAssociation = otherShuntCompensator.getSvShuntCompensatorSections();
/** * Factory of the class * * @param id * id of the class ShuntCompensator to create * @return the class created */ public static ShuntCompensator create(final String id) { ShuntCompensator newShuntCompensator = new ShuntCompensator(); newShuntCompensator.setId(id); return newShuntCompensator; }
/** * Utility to "clear" the content of a class when a subset is invalidated * * @param subset subset to clean */ @Override public void clearContent(Subset subset) { // First of all, we clear the associations: this.clearAssociations(subset); switch (subset) { default: // nothing to clear } }
xmlsw.writeCharacters(String.valueOf(getGPerSection())); xmlsw.writeEndElement(); errorMessage.append("ShuntCompensator "); errorMessage.append("which ID has been initialized to : "); errorMessage.append(getId()); LOGGER.error(errorMessage.toString()); LOGGER.error(e.toString(), e); xmlsw.writeCharacters(String.valueOf(getBPerSection())); xmlsw.writeEndElement(); errorMessage.append("ShuntCompensator "); errorMessage.append("which ID has been initialized to : "); errorMessage.append(getId()); LOGGER.error(errorMessage.toString()); LOGGER.error(e.toString(), e); xmlsw.writeCharacters(String.valueOf(getG0PerSection())); xmlsw.writeEndElement(); errorMessage.append("ShuntCompensator "); errorMessage.append("which ID has been initialized to : "); errorMessage.append(getId()); LOGGER.error(errorMessage.toString()); LOGGER.error(e.toString(), e); xmlsw.writeCharacters(String.valueOf(getB0PerSection())); xmlsw.writeEndElement();
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()); } }
this.setSvShuntCompensatorSections(attributeToSet, setInverse); } catch(LinkageException e) { LOGGER.error(e.toString(), e); this.setSvShuntCompensatorSections(attributeToSetFromBoundary, setInverse); } catch(LinkageException e) { LOGGER.error(e.toString(), e); errorMessage.append(idSvShuntCompensatorSections); errorMessage.append("\" in \"ShuntCompensator\" of id \""); errorMessage.append(this.getId()); errorMessage.append("\" !"); throw new LinkageException(errorMessage.toString()); errorMessage.append(idSvShuntCompensatorSections); errorMessage.append("\" in \"ShuntCompensator\" of id \""); errorMessage.append(this.getId()); errorMessage.append("\" !"); throw new LinkageException(errorMessage.toString()); removeFromUnresolved();
xmlsw.writeAttribute(CIMModel.rdfURI, "ID", getId()); errorMessage.append("ShuntCompensator "); errorMessage.append("which ID has been initialized to : "); errorMessage.append(getId()); LOGGER.error(errorMessage.toString()); LOGGER.error(e.toString(), e); writeClass(xmlsw); super.write(xmlsw, false); errorMessage.append("ShuntCompensator "); errorMessage.append("which ID has been initialized to : "); errorMessage.append(getId()); LOGGER.error(errorMessage.toString()); LOGGER.error(e.toString(), e); try { xmlsw.writeStartElement(CIMURI.CIMURI, "ShuntCompensator"); xmlsw.writeAttribute(CIMModel.rdfURI, "ID", getId()); errorMessage.append("ShuntCompensator "); errorMessage.append("which ID has been initialized to : "); errorMessage.append(getId()); errorMessage.append(" in the subset "); errorMessage.append("Equipment"); writeClass(xmlsw); super.write(xmlsw, subset, false);
ShuntCompensator newShuntCompensator = new ShuntCompensator(); ShuntCompensator value = entry.getValue(); newShuntCompensator = value; this.id_ShuntCompensator.put(newShuntCompensator.getId(), newShuntCompensator); this.allInstances.put(newShuntCompensator.getId(), newShuntCompensator); newMap.put(newShuntCompensator.getId(), newShuntCompensator); this.subsetsInstances.put( .put(newShuntCompensator.getId(), newShuntCompensator);
message.append(this.getId()); message.append("\" is not consistent in this context:\n");
/** * Utility returning a copy of the "base" of this instance * This utility does not copy the associations with other instances * * @return a clone of this instance */ public ShuntCompensator clone() { ShuntCompensator newInstance = new ShuntCompensator(this); ShuntCompensator newInstanceSP = newInstance; return newInstanceSP; }
/** * Copy constructor * The associations with other objects are not copied * * @param ShuntCompensator * the reference to the class to copy * @return the class constructed */ private ShuntCompensator(final ShuntCompensator otherShuntCompensator) { // TODO : check exception safe this.copyBase(otherShuntCompensator); }
this.idShuntCompensator = shuntCompensatorAssociation.getId();