@Override public void deleteVariantArrayElement(int index) { variants.delete(index); }
ConnectedComponentsManager getConnectedComponentsManager() { return variants.get().connectedComponentsManager; }
NetworkImpl(String id, String name, String sourceFormat) { super(id, name); Objects.requireNonNull(sourceFormat, "source format is null"); this.sourceFormat = sourceFormat; variantManager = new VariantManagerImpl(objectStore); variants = new VariantArray<>(ref, VariantImpl::new); // add the network the object list as it is a multi variant object // and it needs to be notified when and extension or a reduction of // the variant array is requested objectStore.checkAndAdd(this); }
@Override public void reduceVariantArraySize(int number) { variants.pop(number); }
@Override public void extendVariantArraySize(int initVariantArraySize, int number, int sourceIndex) { variants.push(number, VariantImpl::new); }
@Override public void allocateVariantArrayElement(int[] indexes, final int sourceIndex) { variants.allocate(indexes, VariantImpl::new); }
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 void reduceVariantArraySize(int number) { variants.pop(number); }
SynchronousComponentsManager getSynchronousComponentsManager() { return variants.get().synchronousComponentsManager; }
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 reduceVariantArraySize(int number) { variants.pop(number); }
@Override public void deleteVariantArrayElement(int index) { variants.delete(index); }
CalculatedBusTopology getCalculatedBusTopology() { return variants.get().calculatedBusTopology; }
@Override public void deleteVariantArrayElement(int index) { variants.delete(index); }
CalculatedBusBreakerTopology getCalculatedBusBreakerTopology() { return variants.get().calculatedBusBreakerTopology; }