private boolean isPrimary(cim1.model.TransformerWinding tw) { return tw.getWindingType().equals(cim1.model.WindingType.primary); }
/** * Factory of the class * * @param id * id of the class TransformerWinding to create * @return the class created */ public static TransformerWinding create(final String id) { TransformerWinding newTransformerWinding = new TransformerWinding(); newTransformerWinding.setId(id); return newTransformerWinding; }
newrground = otherTransformerWinding.getRground(); this.setRground(newrground); newwindingType = otherTransformerWinding.getWindingType(); this.setWindingType(newwindingType); newconnectionType = otherTransformerWinding.getConnectionType(); this.setConnectionType(newconnectionType); newg = otherTransformerWinding.getG(); this.setG(newg); newg0 = otherTransformerWinding.getG0(); this.setG0(newg0); newb = otherTransformerWinding.getB(); this.setB(newb); newx0 = otherTransformerWinding.getX0(); this.setX0(newx0); newr = otherTransformerWinding.getR(); this.setR(newr); newxground = otherTransformerWinding.getXground(); this.setXground(newxground); newratedS = otherTransformerWinding.getRatedS(); this.setRatedS(newratedS);
cim1.model.Terminal t1 = tw1.getTerminals().get(0); cim1.model.Terminal t2 = tw2.getTerminals().get(0); cim1.model.TopologicalNode tn1 = t1.getTopologicalNode(); cim1.model.TopologicalNode tn2 = t2.getTopologicalNode(); cim1.model.RatioTapChanger rtc = null; cim1.model.PhaseTapChanger ptc = null; if (tw1.ratioTapChangerIsSet()) { if (tw2.ratioTapChangerIsSet()) { throw new CIM1Exception("Unsupported modelling: transformer with two ratio tap changer" + pt.getId()); rtc = tw1.getRatioTapChanger(); rtcSide = Branch.Side.ONE; } else { if (tw2.ratioTapChangerIsSet()) { rtc = tw2.getRatioTapChanger(); rtcSide = Branch.Side.TWO; if (tw1.phaseTapChangerIsSet()) { if (tw2.phaseTapChangerIsSet()) { throw new CIM1Exception("Unsupported modelling: transformer with two phase tap changer" + pt.getId()); ptc = tw1.getPhaseTapChanger(); ptcSide = Branch.Side.ONE; } else { if (tw2.phaseTapChangerIsSet()) { ptc = tw2.getPhaseTapChanger();
xmlsw.writeCharacters(String.valueOf(getRground())); xmlsw.writeEndElement(); errorMessage.append("TransformerWinding "); 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#WindingType." + getWindingType()); errorMessage.append("TransformerWinding "); 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#WindingConnection." + getConnectionType()); errorMessage.append("TransformerWinding "); errorMessage.append("which ID has been initialized to : "); errorMessage.append(getId()); LOGGER.error(errorMessage.toString()); LOGGER.error(e.toString(), e);
TransformerWinding newTransformerWinding = new TransformerWinding(); TransformerWinding value = entry.getValue(); newTransformerWinding = value; this.id_TransformerWinding.put(newTransformerWinding.getId(), newTransformerWinding); this.allInstances.put(newTransformerWinding.getId(), newTransformerWinding); newMap.put(newTransformerWinding.getId(), newTransformerWinding); this.subsetsInstances.put( .put(newTransformerWinding.getId(), newTransformerWinding);
} else if (t.getConductingEquipment() instanceof cim1.model.TransformerWinding) { cim1.model.TransformerWinding tw = (cim1.model.TransformerWinding) t.getConductingEquipment(); if (tw.getMemberOf_PowerTransformer().getContains_TransformerWindings().size() != 2) { throw new CIM1Exception("XNODE connected to a 3 windings transformer not supported");
/** * 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 TransformerWinding clone() { TransformerWinding newInstance = new TransformerWinding(this); TransformerWinding newInstanceSP = newInstance; return newInstanceSP; }
if (tw1.getRatedU() < tw2.getRatedU()) { throw new IllegalStateException("ratedU1 < ratedU2"); if (tw2.getRatedU() < tw3.getRatedU()) { throw new IllegalStateException("ratedU2 < ratedU3"); cim1.model.Terminal t1 = tw1.getTerminals().get(0); cim1.model.Terminal t2 = tw2.getTerminals().get(0); cim1.model.Terminal t3 = tw3.getTerminals().get(0); cim1.model.TopologicalNode tn1 = t1.getTopologicalNode(); cim1.model.TopologicalNode tn2 = t2.getTopologicalNode(); if (tw1.ratioTapChangerIsSet()) { LOGGER.warn("Power transformer " + pt.getId() + ": ratio tap changer on primary winding is not supported"); if (tw1.phaseTapChangerIsSet() || tw2.phaseTapChangerIsSet() || tw3.phaseTapChangerIsSet()) { throw new CIM1Exception("Power transformer " + pt.getId() + ": phase tap changers on three windings transformer are not allowed"); cim1.model.RatioTapChanger rtc2 = tw2.getRatioTapChanger(); cim1.model.RatioTapChanger rtc3 = tw3.getRatioTapChanger(); float ratedU1 = tw1.getRatedU(); float ratedU2 = tw2.getRatedU(); float ratedU3 = tw3.getRatedU(); float rho2Square = (float) Math.pow(tw2.getRatedU() / tw1.getRatedU(), 2); float rho3Square = (float) Math.pow(tw3.getRatedU() / tw1.getRatedU(), 2); float r1 = tw1.getR(); float x1 = tw1.getX(); float g1 = tw1.getG() + tw2.getG() * rho2Square + tw3.getG() * rho3Square;
du = (config.isInvertVoltageStepIncrementOutOfPhase() ? -1 : 1) * ptc.getVoltageStepIncrementOutOfPhase() / ptc.getTransformerWinding().getRatedU(); } else if (ptc.stepVoltageIncrementIsSet() && ptc.getStepVoltageIncrement() != 0) { du = ptc.getStepVoltageIncrement() / 100f;