public static String getVoltageLevelId(LimitViolation limitViolation, Network network, boolean name) { VoltageLevel voltageLevel = getVoltageLevel(limitViolation, network); return name ? voltageLevel.getName() : voltageLevel.getId(); }
@Override public void checkVoltage(Bus bus, double value, Consumer<LimitViolation> consumer) { VoltageLevel vl = bus.getVoltageLevel(); if (!Double.isNaN(vl.getLowVoltageLimit()) && value <= vl.getLowVoltageLimit()) { consumer.accept(new LimitViolation(vl.getId(), vl.getName(), LimitViolationType.LOW_VOLTAGE, vl.getLowVoltageLimit(), limitReduction, value)); } if (!Double.isNaN(vl.getHighVoltageLimit()) && value >= vl.getHighVoltageLimit()) { consumer.accept(new LimitViolation(vl.getId(), vl.getName(), LimitViolationType.HIGH_VOLTAGE, vl.getHighVoltageLimit(), limitReduction, value)); } }
if (station.getName().equals(connectingStation)) {
int couplingParam = 1; for (VoltageLevel station : network.getVoltageLevels()) { if (station.getName().equals(pilotStation)) {
String substpilotPoint = null; for (VoltageLevel station : network.getVoltageLevels()) { if (station.getName().equals(pilotPoint)) {
private void createBus(VoltageLevel voltageLevel) { Bus bus = voltageLevel.getBusBreakerView().newBus() .setId(context.namingStrategy().getId("Bus", id)) .setName(context.namingStrategy().getName("Bus", name)) .add(); double v = p.asDouble("v"); double angle = p.asDouble("angle"); if (valid(v, angle)) { bus.setV(v); bus.setAngle(angle); } else { String reason = String.format( "v = %f, angle = %f. Substation, Voltage level = %s %s", v, angle, voltageLevel.getSubstation().getName(), voltageLevel.getName()); context.invalid("SvVoltage", reason); } }
.writeCell(vl.getSubstation().getCountry().toString()) .writeCell(vl.getId()) .writeCell(vl.getName()); addExtensions(num, vl);