LoadFlowParameters extends AbstractExtendable<LoadFlowParameters> { public LoadFlowParameters copy() { byte[] bytes = writeInMemory(); try (ByteArrayInputStream bais = new ByteArrayInputStream(bytes)) { return JsonLoadFlowParameters.read(bais); } catch (IOException e) { throw new UncheckedIOException(e); } } LoadFlowParameters(VoltageInitMode voltageInitMode, boolean transformerVoltageControlOn,
                              boolean noGeneratorReactiveLimits, boolean phaseShifterRegulationOn,
                              boolean twtSplitShuntAdmittance, boolean simulShunt, boolean readSlackBus, boolean writeSlackBus,
                              boolean dc, boolean distributedSlack, BalanceType balanceType);  LoadFlowParameters(VoltageInitMode voltageInitMode, boolean transformerVoltageControlOn,
        boolean noGeneratorReactiveLimits, boolean phaseShifterRegulationOn,
        boolean twtSplitShuntAdmittance);  LoadFlowParameters(VoltageInitMode voltageInitMode, boolean transformerVoltageControlOn);  LoadFlowParameters(VoltageInitMode voltageInitMode);  LoadFlowParameters(); protected  LoadFlowParameters(LoadFlowParameters other); static LoadFlowParameters load(); static LoadFlowParameters load(PlatformConfig platformConfig); VoltageInitMode getVoltageInitMode(); LoadFlowParameters setVoltageInitMode(VoltageInitMode voltageInitMode); boolean isTransformerVoltageControlOn(); LoadFlowParameters setTransformerVoltageControlOn(boolean transformerVoltageControlOn); boolean isNoGeneratorReactiveLimits(); LoadFlowParameters setNoGeneratorReactiveLimits(boolean noGeneratorReactiveLimits); boolean isPhaseShifterRegulationOn(); LoadFlowParameters setPhaseShifterRegulationOn(boolean phaseShifterRegulationOn); @Deprecated boolean isSpecificCompatibility(); @Deprecated boolean isT2wtSplitShuntAdmittance(); boolean isTwtSplitShuntAdmittance(); @Deprecated LoadFlowParameters setSpecificCompatibility(boolean twtSplitShuntAdmittance); @Deprecated LoadFlowParameters setT2wtSplitShuntAdmittance(boolean twtSplitShuntAdmittance); LoadFlowParameters setTwtSplitShuntAdmittance(boolean twtSplitShuntAdmittance); boolean isSimulShunt(); LoadFlowParameters setSimulShunt(boolean simulShunt); boolean isReadSlackBus(); LoadFlowParameters setReadSlackBus(boolean readSlackBus); boolean isWriteSlackBus(); LoadFlowParameters setWriteSlackBus(boolean writeSlackBus); boolean isDc(); LoadFlowParameters setDc(boolean dc); boolean isDistributedSlack(); LoadFlowParameters setDistributedSlack(boolean distributedSlack); LoadFlowParameters setBalanceType(BalanceType balanceType); BalanceType getBalanceType(); LoadFlowParameters copy(); @Override String toString(); static final String VERSION; static final VoltageInitMode DEFAULT_VOLTAGE_INIT_MODE; static final boolean DEFAULT_TRANSFORMER_VOLTAGE_CONTROL_ON; static final boolean DEFAULT_NO_GENERATOR_REACTIVE_LIMITS; static final boolean DEFAULT_PHASE_SHIFTER_REGULATION_ON; static final boolean DEFAULT_TWT_SPLIT_SHUNT_ADMITTANCE; static final boolean DEFAULT_SIMUL_SHUNT; static final boolean DEFAULT_READ_SLACK_BUS; static final boolean DEFAULT_WRITE_SLACK_BUS; static final boolean DEFAULT_DC; static final boolean DEFAULT_DISTRIBUTED_SLACK; static final BalanceType DEFAULT_BALANCE_TYPE; }
@Test public void testCopyWithExtension() { LoadFlowParameters parameters = new LoadFlowParameters(); DummyExtension dummyExtension = new DummyExtension(); parameters.addExtension(DummyExtension.class, dummyExtension); LoadFlowParameters copy = parameters.copy(); assertEquals(1, copy.getExtensions().size()); Extension<LoadFlowParameters> copiedExt = copy.getExtensionByName("dummyExtension"); assertSame(parameters, dummyExtension.getExtendable()); assertSame(copy, copiedExt.getExtendable()); }