@Override public HvdcLineImpl setNominalV(double nominalV) { ValidationUtil.checkNominalV(this, nominalV); double oldValue = this.nominalV; this.nominalV = nominalV; notifyUpdate("nominalV", oldValue, nominalV); return this; }
@Override public VoltageLevelExt setNominalV(double nominalV) { ValidationUtil.checkNominalV(this, nominalV); double oldValue = this.nominalV; this.nominalV = nominalV; notifyUpdate("nominalV", oldValue, nominalV); return this; }
@Override public VoltageLevel add() { String id = checkAndGetUniqueId(); // TODO : ckeck that there are not another voltage level with same base voltage ValidationUtil.checkNominalV(this, nominalV); ValidationUtil.checkVoltageLimits(this, lowVoltageLimit, highVoltageLimit); ValidationUtil.checkTopologyKind(this, topologyKind); VoltageLevelExt voltageLevel; switch (topologyKind) { case NODE_BREAKER: voltageLevel = new NodeBreakerVoltageLevel(id, getName(), substation, nominalV, lowVoltageLimit, highVoltageLimit); break; case BUS_BREAKER: voltageLevel = new BusBreakerVoltageLevel(id, getName(), substation, nominalV, lowVoltageLimit, highVoltageLimit); break; default: throw new AssertionError(); } getNetwork().getObjectStore().checkAndAdd(voltageLevel); substation.addVoltageLevel(voltageLevel); getNetwork().getListeners().notifyCreation(voltageLevel); return voltageLevel; }
@Override public HvdcLine add() { String id = checkAndGetUniqueId(); String name = getName(); ValidationUtil.checkR(this, r); ValidationUtil.checkConvertersMode(this, convertersMode); ValidationUtil.checkNominalV(this, nominalV); ValidationUtil.checkActivePowerSetpoint(this, activePowerSetpoint); ValidationUtil.checkMaxP(this, maxP); AbstractHvdcConverterStation<?> converterStation1 = getNetwork().getHvdcConverterStation(converterStationId1); if (converterStation1 == null) { throw new PowsyblException("Side 1 converter station " + converterStationId1 + " not found"); } AbstractHvdcConverterStation<?> converterStation2 = getNetwork().getHvdcConverterStation(converterStationId2); if (converterStation2 == null) { throw new PowsyblException("Side 2 converter station " + converterStationId2 + " not found"); } HvdcLineImpl hvdcLine = new HvdcLineImpl(id, name, r, nominalV, maxP, convertersMode, activePowerSetpoint, converterStation1, converterStation2, networkRef); getNetwork().getObjectStore().checkAndAdd(hvdcLine); getNetwork().getListeners().notifyCreation(hvdcLine); return hvdcLine; }