newwindingConnectionAngle = otherPhaseTapChanger.getWindingConnectionAngle(); this.setWindingConnectionAngle(newwindingConnectionAngle); newvoltageStepIncrementOutOfPhase = otherPhaseTapChanger.getVoltageStepIncrementOutOfPhase(); this.setVoltageStepIncrementOutOfPhase(newvoltageStepIncrementOutOfPhase); newphaseTapChangerType = otherPhaseTapChanger.getPhaseTapChangerType(); this.setPhaseTapChangerType(newphaseTapChangerType); newstepPhaseShiftIncrement = otherPhaseTapChanger.getStepPhaseShiftIncrement(); this.setStepPhaseShiftIncrement(newstepPhaseShiftIncrement); newxStepMin = otherPhaseTapChanger.getXStepMin(); this.setXStepMin(newxStepMin); newxStepMax = otherPhaseTapChanger.getXStepMax(); this.setXStepMax(newxStepMax); TransformerWinding transformerWindingAssociation = otherPhaseTapChanger.getTransformerWinding();
/** * Factory of the class * * @param id * id of the class PhaseTapChanger to create * @return the class created */ public static PhaseTapChanger create(final String id) { PhaseTapChanger newPhaseTapChanger = new PhaseTapChanger(); newPhaseTapChanger.setId(id); return newPhaseTapChanger; }
/** * 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 } }
private void createPhaseTapChanger(cim1.model.PhaseTapChanger ptc, cim1.model.Terminal t1, cim1.model.Terminal t2, TwoWindingsTransformer transfo) { int lowStep = ptc.getLowStep(); int highStep = ptc.getHighStep(); int neutralStep = ptc.getNeutralStep(); if (neutralStep < lowStep || neutralStep > highStep) { throw new CIM1Exception("Malformed ratio tap changer: neutral step (" if (ptc.voltageStepIncrementOutOfPhaseIsSet() && ptc.getVoltageStepIncrementOutOfPhase() != 0) { du = (config.isInvertVoltageStepIncrementOutOfPhase() ? -1 : 1) * ptc.getVoltageStepIncrementOutOfPhase() / ptc.getTransformerWinding().getRatedU(); } else if (ptc.stepVoltageIncrementIsSet() && ptc.getStepVoltageIncrement() != 0) { du = ptc.getStepVoltageIncrement() / 100f; } else { LOGGER.warn("Phase tap changer '{}' of power transformer '{}'" + " do not have a valid value for voltageStepIncrementOutOfPhase or " + "stepVoltageIncrement attribute, default to 1", ptc.getId(), transfo.getId()); du = 1f / 100; if (ptc.windingConnectionAngleIsSet()) { theta = (float) Math.toRadians(ptc.getWindingConnectionAngle()); } else { theta = (float) Math.PI / 2; LOGGER.warn("Phase tap changer '{}' of power transformer '{}'" + " do not have windingConnectionAngle attribute, default to 90", ptc.getId(), transfo.getId()); if (ptc.xStepMinIsSet() && ptc.xStepMaxIsSet()) { xStepMin = ptc.xStepMin; xStepMax = ptc.xStepMax;
xmlsw.writeCharacters(String.valueOf(getWindingConnectionAngle())); xmlsw.writeEndElement(); errorMessage.append("PhaseTapChanger "); errorMessage.append("which ID has been initialized to : "); errorMessage.append(getId()); LOGGER.error(errorMessage.toString()); LOGGER.error(e.toString(), e); xmlsw.writeCharacters(String.valueOf(getVoltageStepIncrementOutOfPhase())); xmlsw.writeEndElement(); errorMessage.append("PhaseTapChanger "); errorMessage.append("which ID has been initialized to : "); errorMessage.append(getId()); LOGGER.error(errorMessage.toString()); LOGGER.error(e.toString(), e); xmlsw.writeAttribute(CIMModel.rdfURI, "resource", "http://iec.ch/TC57/2009/CIM-schema-cim14#PhaseTapChangerKind." + getPhaseTapChangerType()); errorMessage.append("PhaseTapChanger "); errorMessage.append("which ID has been initialized to : "); errorMessage.append(getId()); LOGGER.error(errorMessage.toString()); LOGGER.error(e.toString(), e); xmlsw.writeCharacters(String.valueOf(getStepPhaseShiftIncrement()));
this.setTransformerWinding(attributeToSet, setInverse); } catch(LinkageException e) { LOGGER.error(e.toString(), e); this.setTransformerWinding(attributeToSetFromBoundary, setInverse); } catch(LinkageException e) { LOGGER.error(e.toString(), e); errorMessage.append(idTransformerWinding); errorMessage.append("\" in \"PhaseTapChanger\" of id \""); errorMessage.append(this.getId()); errorMessage.append("\" !"); throw new LinkageException(errorMessage.toString()); errorMessage.append(idTransformerWinding); errorMessage.append("\" in \"PhaseTapChanger\" of id \""); errorMessage.append(this.getId()); errorMessage.append("\" !"); throw new LinkageException(errorMessage.toString()); removeFromUnresolved();
xmlsw.writeAttribute(CIMModel.rdfURI, "ID", getId()); errorMessage.append("PhaseTapChanger "); 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("PhaseTapChanger "); 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, "PhaseTapChanger"); xmlsw.writeAttribute(CIMModel.rdfURI, "ID", getId()); errorMessage.append("PhaseTapChanger "); 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);
PhaseTapChanger newPhaseTapChanger = new PhaseTapChanger(); PhaseTapChanger value = entry.getValue(); newPhaseTapChanger = value; this.id_PhaseTapChanger.put(newPhaseTapChanger.getId(), newPhaseTapChanger); this.allInstances.put(newPhaseTapChanger.getId(), newPhaseTapChanger); newMap.put(newPhaseTapChanger.getId(), newPhaseTapChanger); this.subsetsInstances.put( .put(newPhaseTapChanger.getId(), newPhaseTapChanger);
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 PhaseTapChanger clone() { PhaseTapChanger newInstance = new PhaseTapChanger(this); PhaseTapChanger newInstanceSP = newInstance; return newInstanceSP; }
/** * Copy constructor * The associations with other objects are not copied * * @param PhaseTapChanger * the reference to the class to copy * @return the class constructed */ private PhaseTapChanger(final PhaseTapChanger otherPhaseTapChanger) { // TODO : check exception safe this.copyBase(otherPhaseTapChanger); }
this.idPhaseTapChanger = phaseTapChangerAssociation.getId();