@Override public void remove() { NetworkImpl network = getNetwork(); network.getObjectStore().remove(this); network.getListeners().notifyRemoval(this); }
@Override public void removeSwitch(String switchId) { Integer e = switches.remove(switchId); if (e == null) { throw new PowsyblException("Switch '" + switchId + "' not found in substation voltage level '" + id + "'"); } SwitchImpl aSwitch = graph.removeEdge(e); clean(); getNetwork().getObjectStore().remove(aSwitch); getNetwork().getListeners().notifyRemoval(aSwitch); }
@Override public void remove() { NetworkImpl network = getNetwork(); network.getObjectStore().remove(this); for (TerminalExt terminal : terminals) { VoltageLevelExt vl = terminal.getVoltageLevel(); vl.detach(terminal); vl.clean(); } network.getListeners().notifyRemoval(this); }
@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 void remove() { VoltageLevels.checkRemovability(this); // Remove all connectables List<Connectable> connectables = Lists.newArrayList(getConnectables()); for (Connectable connectable : connectables) { connectable.remove(); } // Remove the topology removeTopology(); // Remove this voltage level from the network getSubstation().remove(this); getNetwork().getObjectStore().remove(this); getNetwork().getListeners().notifyRemoval(this); }