private Void readShunt(String[] tokens) { int num = Integer.parseInt(tokens[1]); int busNum = Integer.parseInt(tokens[2]); double q = readDouble(tokens[4]); int sections = Integer.parseInt(tokens[5]); String id = mapper.getId(AmplSubset.SHUNT, num); ShuntCompensator sc = network.getShuntCompensator(id); if (sc == null) { throw new AmplException("Invalid shunt compensator id '" + id + "'"); } sc.setCurrentSectionCount(Math.max(0, Math.min(sc.getMaximumSectionCount(), sections))); Terminal t = sc.getTerminal(); t.setQ(q); busConnection(t, busNum); return null; }
int numSteps = shunt.getMaximumSectionCount(); double stepSize = nominalV * nominalV * shunt.getMaximumB() / numSteps;
@Override protected void writeRootElementAttributes(ShuntCompensator sc, VoltageLevel vl, NetworkXmlWriterContext context) throws XMLStreamException { XmlUtil.writeDouble("bPerSection", sc.getbPerSection(), context.getWriter()); context.getWriter().writeAttribute("maximumSectionCount", Integer.toString(sc.getMaximumSectionCount())); context.getWriter().writeAttribute("currentSectionCount", Integer.toString(sc.getCurrentSectionCount())); writeNodeOrBus(null, sc.getTerminal(), context); writePQ(null, sc.getTerminal(), context.getWriter()); }
private void createBanks(EsgNetwork esgNetwork) { for (ShuntCompensator sc : Identifiables.sort(network.getShunts())) { // skip shunts not in the main connected component if (config.isExportMainCCOnly() && !EchUtil.isInMainCc(sc, config.isNoSwitch())) { LOGGER.warn("not in main component, skipping ShuntCompensator: {}", sc.getId()); continue; } ConnectionBus bus = ConnectionBus.fromTerminal(sc.getTerminal(), config, fakeNodes); //...number of steps in service int ieleba = bus.isConnected() ? sc.getCurrentSectionCount() : 0; // not really correct, because it can be connected with zero section, EUROSTAG should be modified... double vnom = sc.getTerminal().getVoltageLevel().getNominalV(); double plosba = 1000 * vnom * vnom * 0.; // no active lost in the iidm shunt compensator. Expressed in kw double rcapba = vnom * vnom * sc.getbPerSection(); int imaxba = sc.getMaximumSectionCount(); EsgCapacitorOrReactorBank.RegulatingMode xregba = EsgCapacitorOrReactorBank.RegulatingMode.NOT_REGULATING; esgNetwork.addCapacitorsOrReactorBanks(new EsgCapacitorOrReactorBank(new Esg8charName(dictionary.getEsgId(sc.getId())), new Esg8charName(dictionary.getEsgId(bus.getId())), ieleba, plosba, rcapba, imaxba, xregba)); } }
double maxB = Math.max(b1, b2); double b = sc.getCurrentB() * zb; int points = sc.getMaximumSectionCount() < 1 ? 0 : sc.getMaximumSectionCount() - 1; formatter.writeCell(variantIndex) .writeCell(num)