@Override public NetworkImpl getNetwork() { return substation.getNetwork(); }
@Override protected NetworkImpl getNetwork() { return substation.getNetwork(); }
@Override public NetworkImpl getNetwork() { return substation.getNetwork(); }
@Override protected NetworkImpl getNetwork() { return substation.getNetwork(); }
@Override protected NetworkImpl getNetwork() { return substation.getNetwork(); }
@Override public NetworkImpl getNetwork() { return transformer.getSubstation().getNetwork(); }
NodeBreakerVoltageLevel(String id, String name, SubstationImpl substation, double nominalV, double lowVoltageLimit, double highVoltageLimit) { super(id, name, substation, nominalV, lowVoltageLimit, highVoltageLimit); variants = new VariantArray<>(substation.getNetwork().getRef(), VariantImpl::new); }
@Override public SubstationImpl setTso(String tso) { String oldValue = this.tso; this.tso = tso; getNetwork().getListeners().notifyUpdate(this, "tso", oldValue, tso); return this; }
BusBreakerVoltageLevel(String id, String name, SubstationImpl substation, double nominalV, double lowVoltageLimit, double highVoltageLimit) { super(id, name, substation, nominalV, lowVoltageLimit, highVoltageLimit); variants = new VariantArray<>(substation.getNetwork().getRef(), VariantImpl::new); // invalidate topology and connected components graph.addListener(this::invalidateCache); }
@Override public void remove() { Substations.checkRemovability(this); Set<VoltageLevelExt> vls = new HashSet<>(voltageLevels); for (VoltageLevelExt vl : vls) { // Remove all branches, transformers and HVDC lines List<Connectable> connectables = Lists.newArrayList(vl.getConnectables()); for (Connectable connectable : connectables) { ConnectableType type = connectable.getType(); if (VoltageLevels.MULTIPLE_TERMINALS_CONNECTABLE_TYPES.contains(type)) { connectable.remove(); } else if (type == ConnectableType.HVDC_CONVERTER_STATION) { HvdcLine hvdcLine = getNetwork().getHvdcLine((HvdcConverterStation) connectable); if (hvdcLine != null) { hvdcLine.remove(); } } } // Then remove the voltage level (bus, switches and injections) from the network vl.remove(); } // Remove this substation from the network getNetwork().getObjectStore().remove(this); getNetwork().getListeners().notifyRemoval(this); }
@Override public SubstationImpl setCountry(Country country) { ValidationUtil.checkCountry(this, country); Country oldValue = this.country; this.country = country; getNetwork().getListeners().notifyUpdate(this, "country", oldValue.toString(), country.toString()); return this; }
@Override public <T extends Connectable> T getConnectable(String id, Class<T> aClass) { // the fastest way to get the equipment is to look in the object store // and then check if it is connected to this substation T connectable = substation.getNetwork().getObjectStore().get(id, aClass); if (connectable == null) { return null; } else if (connectable instanceof Injection) { return ((Injection) connectable).getTerminal().getVoltageLevel() == this ? connectable : null; } else if (connectable instanceof Branch) { return ((Branch) connectable).getTerminal1().getVoltageLevel() == this || ((Branch) connectable).getTerminal2().getVoltageLevel() == this ? connectable : null; } else if (connectable instanceof ThreeWindingsTransformer) { return ((ThreeWindingsTransformer) connectable).getLeg1().getTerminal().getVoltageLevel() == this || ((ThreeWindingsTransformer) connectable).getLeg2().getTerminal().getVoltageLevel() == this || ((ThreeWindingsTransformer) connectable).getLeg3().getTerminal().getVoltageLevel() == this ? connectable : null; } else { throw new AssertionError(); } }