for (Bus bus : network.getVoltageLevel(stationPilotPoint).getBusBreakerView().getBuses()) { if (coupling < 4) { String busEsgName = iidm2eurostagId.get(bus.getId()); if (station.getName().equals(pilotStation)) { for (Bus bus : station.getBusBreakerView().getBuses()) { String pilotNewName = iidm2eurostagId.get(bus.getId()); if (pilotNewName != null) {
if (station.getName().equals(pilotPoint)) { for (Bus bus : station.getBusBreakerView().getBuses()) { if (bus.getConnectedComponent().getNum() == ComponentConstants.MAIN_NUM || substpilotPoint == null) { substpilotPoint = iidm2eurostagId.get(bus.getId());
@Override public Iterable<Bus> getBuses() { return FluentIterable.from(getVoltageLevels()) .transformAndConcat(vl -> vl.getBusBreakerView().getBuses()); }
for (Bus bus : vl.getBusBreakerView().getBuses()) { oldBuses.add(bus);
public static ConnectionInfo getConnectionInfoInBusBreakerView(Terminal t) { Bus bus = t.getBusBreakerView().getBus(); boolean connected; if (bus != null) { connected = true; } else { connected = false; bus = t.getBusBreakerView().getConnectableBus(); if (bus == null) { // otherwise take first bus of the substation at the same voltage // level... Iterator<Bus> itVLB = t.getVoltageLevel().getBusBreakerView().getBuses().iterator(); if (itVLB.hasNext()) { bus = itVLB.next(); } else { throw new PowsyblException("Cannot find a connection bus"); } } } return new ConnectionInfo(bus, connected); }
private void writeBusBreakerTopology(VoltageLevel vl, NetworkXmlWriterContext context) throws XMLStreamException { context.getWriter().writeStartElement(IIDM_URI, BUS_BREAKER_TOPOLOGY_ELEMENT_NAME); for (Bus b : vl.getBusBreakerView().getBuses()) { if (!context.getFilter().test(b)) { continue; } BusXml.INSTANCE.write(b, null, context); } for (Switch sw : vl.getBusBreakerView().getSwitches()) { Bus b1 = vl.getBusBreakerView().getBus1(context.getAnonymizer().anonymizeString(sw.getId())); Bus b2 = vl.getBusBreakerView().getBus2(context.getAnonymizer().anonymizeString(sw.getId())); if (!context.getFilter().test(b1) || !context.getFilter().test(b2)) { continue; } BusBreakerViewSwitchXml.INSTANCE.write(sw, vl, context); } context.getWriter().writeEndElement(); }
public static Iterable<Bus> getBuses(VoltageLevel vl, EurostagEchExportConfig config) { if (config.isNoSwitch()) { return vl.getBusView().getBuses(); } else { return vl.getBusBreakerView().getBuses(); } }