/** * Utility to search for an instance of ACLineSegment within the * CIM model * * @param id * the id to search * @return ACLineSegment a reference to the class corresponding to * this id, to NULL if not found */ public ACLineSegment searchACLineSegment(final String id) { if (this.getId_ACLineSegment().containsKey(id)) { return this.getId_ACLineSegment().get(id); } return null; }
/** * Utility to search for an instance of EnergyConsumer within the * CIM model * * @param id * the id to search * @return EnergyConsumer a reference to the class corresponding to * this id, to NULL if not found */ public EnergyConsumer searchEnergyConsumer(final String id) { if (this.getId_EnergyConsumer().containsKey(id)) { return this.getId_EnergyConsumer().get(id); } return null; }
/** * Utility to search for an instance of IEC61970CIMVersion within the * CIM model * * @param id * the id to search * @return IEC61970CIMVersion a reference to the class corresponding to * this id, to NULL if not found */ public IEC61970CIMVersion searchIEC61970CIMVersion(final String id) { if (this.getId_IEC61970CIMVersion().containsKey(id)) { return this.getId_IEC61970CIMVersion().get(id); } return null; }
for (cim1.model.SubGeographicalRegion r : model.getId_SubGeographicalRegion().values()) { addName(idMapping, names, r); for (cim1.model.Substation s : model.getId_Substation().values()) { addName(idMapping, names, s); for (cim1.model.VoltageLevel vl : model.getId_VoltageLevel().values()) { addName(idMapping, names, vl); for (cim1.model.ACLineSegment l : model.getId_ACLineSegment().values()) { addName(idMapping, names, l); for (cim1.model.PowerTransformer twt : model.getId_PowerTransformer().values()) { addName(idMapping, names, twt); for (cim1.model.Switch s : model.getId_Switch().values()) { addName(idMapping, names, s); for (cim1.model.SynchronousMachine sm : model.getId_SynchronousMachine().values()) { addName(idMapping, names, sm); for (cim1.model.EnergyConsumer ec : model.getId_EnergyConsumer().values()) { addName(idMapping, names, ec); for (cim1.model.ShuntCompensator sc : model.getId_ShuntCompensator().values()) { addName(idMapping, names, sc); for (cim1.model.TopologicalNode tn : model.getId_TopologicalNode().values()) { addName(idMapping, names, tn);
Network convert() { LOGGER.trace("Converting CIM model to IIDM model"); for (cim1.model.IEC61970CIMVersion v : cimModel.getId_IEC61970CIMVersion().values()) { if (!CIM_ENTSOE_PROFILE_1ST_EDITION_VERSION.equals(v.version)) { throw new CIM1Exception("CIM version " + v.version for (cim1.model.Substation s : cimModel.getId_Substation().values()) { graph.addVertex(namingStrategy.getId(s)); for (cim1.model.PowerTransformer pt : cimModel.getId_PowerTransformer().values()) { List<String> substationsIds = new ArrayList<>(); for (cim1.model.TransformerWinding tw : pt.getContains_TransformerWindings()) { for (cim1.model.TopologicalNode tn : cimModel.getId_TopologicalNode().values()) { if (isXNode(tn)) { List<cim1.model.ConductingEquipment> branches = new ArrayList<>(2); for (cim1.model.Substation s : cimModel.getId_Substation().values()) { cim1.model.SubGeographicalRegion sgr = s.getRegion(); cim1.model.GeographicalRegion gr = sgr.getRegion(); substationName = s.getName(); } else { cim1.model.Substation newS = cimModel.getId_Substation().get(namingStrategy.getCimId(newSubstationId)); substationId = namingStrategy.getId(newS); substationName = newS.getName();
/** * Utility to search for an instance of PowerTransformer within the * CIM model * * @param id * the id to search * @return PowerTransformer a reference to the class corresponding to * this id, to NULL if not found */ public PowerTransformer searchPowerTransformer(final String id) { if (this.getId_PowerTransformer().containsKey(id)) { return this.getId_PowerTransformer().get(id); } return null; }
/** * Utility to search for an instance of SynchronousMachine within the * CIM model * * @param id * the id to search * @return SynchronousMachine a reference to the class corresponding to * this id, to NULL if not found */ public SynchronousMachine searchSynchronousMachine(final String id) { if (this.getId_SynchronousMachine().containsKey(id)) { return this.getId_SynchronousMachine().get(id); } return null; }
/** * Utility to search for an instance of Switch within the * CIM model * * @param id * the id to search * @return Switch a reference to the class corresponding to * this id, to NULL if not found */ public Switch searchSwitch(final String id) { if (this.getId_Switch().containsKey(id)) { return this.getId_Switch().get(id); } return null; }
/** * Utility to search for an instance of TopologicalNode within the * CIM model * * @param id * the id to search * @return TopologicalNode a reference to the class corresponding to * this id, to NULL if not found */ public TopologicalNode searchTopologicalNode(final String id) { if (this.getId_TopologicalNode().containsKey(id)) { return this.getId_TopologicalNode().get(id); } return null; }
/** * Utility to search for an instance of ShuntCompensator within the * CIM model * * @param id * the id to search * @return ShuntCompensator a reference to the class corresponding to * this id, to NULL if not found */ public ShuntCompensator searchShuntCompensator(final String id) { if (this.getId_ShuntCompensator().containsKey(id)) { return this.getId_ShuntCompensator().get(id); } return null; }
/** * Utility to search for an instance of SubGeographicalRegion within the * CIM model * * @param id * the id to search * @return SubGeographicalRegion a reference to the class corresponding to * this id, to NULL if not found */ public SubGeographicalRegion searchSubGeographicalRegion(final String id) { if (this.getId_SubGeographicalRegion().containsKey(id)) { return this.getId_SubGeographicalRegion().get(id); } return null; }
/** * Utility to search for an instance of Substation within the * CIM model * * @param id * the id to search * @return Substation a reference to the class corresponding to * this id, to NULL if not found */ public Substation searchSubstation(final String id) { if (this.getId_Substation().containsKey(id)) { return this.getId_Substation().get(id); } return null; }
private void createTransfos(Network network, Set<String> noOperationalLimitInOperationalLimitSet, List<RatioTapChangerToCreate> ratioTapChangerToCreateList) { for (cim1.model.PowerTransformer pt : cimModel.getId_PowerTransformer().values()) { LOGGER.trace("Create power transformer {}", namingStrategy.getId(pt)); List<cim1.model.TransformerWinding> windings = pt.getContains_TransformerWindings(); if (windings.size() == 2) { cim1.model.TransformerWinding tw1 = windings.get(0); cim1.model.TransformerWinding tw2 = windings.get(1); create2WTransfos(pt, tw1, tw2, network, noOperationalLimitInOperationalLimitSet, ratioTapChangerToCreateList); } else if (windings.size() == 3) { List<cim1.model.TransformerWinding> sortedWindings = new ArrayList<>(3); sortedWindings.add(windings.get(0)); sortedWindings.add(windings.get(1)); sortedWindings.add(windings.get(2)); Collections.sort(sortedWindings, new Comparator<cim1.model.TransformerWinding>() { @Override public int compare(cim1.model.TransformerWinding tw1, cim1.model.TransformerWinding tw2) { return (int) (tw2.getRatedU() - tw1.getRatedU()); } }); cim1.model.TransformerWinding tw1 = sortedWindings.get(0); cim1.model.TransformerWinding tw2 = sortedWindings.get(1); cim1.model.TransformerWinding tw3 = sortedWindings.get(2); create3WTransfos(pt, tw1, tw2, tw3, network, noOperationalLimitInOperationalLimitSet, ratioTapChangerToCreateList); } else { throw new CIM1Exception("Inconsistent power transformer found (" + pt.getId() + "): only 2 or 3 windings are supported"); } } }
private void createLines(Network network, Set<String> noOperationalLimitInOperationalLimitSet) { for (cim1.model.ACLineSegment l : cimModel.getId_ACLineSegment().values()) { cim1.model.Terminal t1 = l.getTerminals().get(0); cim1.model.Terminal t2 = l.getTerminals().get(1);