/** * Creates a standard connection point from a bus bar section, * with a disconnector and a breaker. * * @param bb Bus bar section to connect to * @return Node index of the connection point */ public static int newStandardConnection(BusbarSection bb) { Objects.requireNonNull(bb, "Busbar section is null."); int n = bb.getTerminal().getNodeBreakerView().getNode(); VoltageLevel.NodeBreakerView topo = bb.getTerminal().getVoltageLevel().getNodeBreakerView(); int oldCount = topo.getNodeCount(); topo.setNodeCount(oldCount + 2); topo.newDisconnector() .setId(String.format("disconnector %s-%d", bb.getId(), oldCount)) .setNode1(n) .setNode2(oldCount) .add(); topo.newBreaker() .setId(String.format("breaker %s-%d", bb.getId(), oldCount + 1)) .setNode1(oldCount) .setNode2(oldCount + 1) .add(); return oldCount + 1; } }
.setNode(0) .add(); vl2.getNodeBreakerView().newDisconnector() .setId("DISC_BBS1_BK1") .setName(DISCONNECTOR_NAME)
VoltageLevel vl2 = network.getVoltageLevel("VL2"); vl2.getNodeBreakerView().setNodeCount(7); vl2.getNodeBreakerView().newDisconnector() .setId("DISC_BBS1_BK2") .setName(DISCONNECTOR_NAME) .setRetained(true) .add(); vl2.getNodeBreakerView().newDisconnector() .setId("DISC_BBS1_BK3") .setName(DISCONNECTOR_NAME)
.setQ0(3) .add(); topology1.newDisconnector() .setId("load1Disconnector1") .setOpen(false) .setNode2(3) .add(); topology1.newDisconnector() .setId("load1Breaker1") .setOpen(false) .beginPoint().setP(900.0).setMinQ(300.0).setMaxQ(500.0).endPoint() .add(); topology1.newDisconnector() .setId("generator1Disconnector1") .setOpen(false) .setNode2(6) .add(); topology1.newDisconnector() .setId("generator1Breaker1") .setOpen(false)