Class AbstractLfGenerator
- java.lang.Object
-
- com.powsybl.openloadflow.network.AbstractPropertyBag
-
- com.powsybl.openloadflow.network.impl.AbstractLfGenerator
-
- All Implemented Interfaces:
LfGenerator
,PropertyBag
- Direct Known Subclasses:
LfBatteryImpl
,LfDanglingLineGenerator
,LfGeneratorImpl
,LfStaticVarCompensatorImpl
,LfVscConverterStationImpl
public abstract class AbstractLfGenerator extends AbstractPropertyBag implements LfGenerator
- Author:
- Geoffroy Jamgotchian
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.powsybl.openloadflow.network.LfGenerator
LfGenerator.GeneratorControlType, LfGenerator.ReactiveRangeMode
-
-
Field Summary
Fields Modifier and Type Field Description protected LfBus
bus
protected double
calculatedQ
protected String
controlledBranchId
protected ControlledSide
controlledBranchSide
protected String
controlledBusId
protected static double
DEFAULT_DROOP
protected LfGenerator.GeneratorControlType
generatorControlType
protected double
initialTargetP
protected LfNetwork
network
protected double
remoteTargetQ
protected double
targetP
protected double
targetV
-
Fields inherited from class com.powsybl.openloadflow.network.AbstractPropertyBag
properties
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractLfGenerator(LfNetwork network, double targetP)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static boolean
checkActivePowerControl(String generatorId, double targetP, double minP, double maxP, double plausibleActivePowerLimit, com.powsybl.openloadflow.network.impl.LfNetworkLoadingReport report)
protected boolean
checkTargetV(double targetV, LfNetworkParameters parameters, com.powsybl.openloadflow.network.impl.LfNetworkLoadingReport report)
protected boolean
checkVoltageControlConsistency(LfNetworkParameters parameters, com.powsybl.openloadflow.network.impl.LfNetworkLoadingReport report)
LfBus
getBus()
double
getCalculatedQ()
LfBranch
getControlledBranch()
ControlledSide
getControlledBranchSide()
LfBus
getControlledBus()
LfGenerator.GeneratorControlType
getGeneratorControlType()
double
getInitialTargetP()
double
getMaxQ()
double
getMinQ()
String
getOriginalId()
double
getRangeQ(LfGenerator.ReactiveRangeMode rangeMode)
protected abstract Optional<com.powsybl.iidm.network.ReactiveLimits>
getReactiveLimits()
OptionalDouble
getRemoteControlReactiveKey()
double
getRemoteTargetQ()
double
getTargetP()
double
getTargetV()
boolean
hasRemoteReactivePowerControl()
boolean
isDisabled()
boolean
isFictitious()
void
setBus(LfBus bus)
void
setCalculatedQ(double calculatedQ)
void
setDisabled(boolean disabled)
void
setGeneratorControlType(LfGenerator.GeneratorControlType generatorControlType)
void
setParticipating(boolean participating)
protected void
setReactivePowerControl(com.powsybl.iidm.network.Terminal regulatingTerminal, double targetQ)
void
setTargetP(double targetP)
protected void
setVoltageControl(double targetV, com.powsybl.iidm.network.Terminal terminal, com.powsybl.iidm.network.Terminal regulatingTerminal, LfNetworkParameters parameters, com.powsybl.openloadflow.network.impl.LfNetworkLoadingReport report)
String
toString()
-
Methods inherited from class com.powsybl.openloadflow.network.AbstractPropertyBag
getProperty, removeProperty, setProperty
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.powsybl.openloadflow.network.LfGenerator
getDroop, getId, getMaxP, getMinP, getParticipationFactor, getSlope, getTargetQ, isParticipating, setSlope, updateState
-
Methods inherited from interface com.powsybl.openloadflow.network.PropertyBag
getProperty, removeProperty, setProperty
-
-
-
-
Field Detail
-
DEFAULT_DROOP
protected static final double DEFAULT_DROOP
- See Also:
- Constant Field Values
-
network
protected final LfNetwork network
-
initialTargetP
protected double initialTargetP
-
targetP
protected double targetP
-
bus
protected LfBus bus
-
calculatedQ
protected double calculatedQ
-
targetV
protected double targetV
-
generatorControlType
protected LfGenerator.GeneratorControlType generatorControlType
-
controlledBusId
protected String controlledBusId
-
controlledBranchId
protected String controlledBranchId
-
controlledBranchSide
protected ControlledSide controlledBranchSide
-
remoteTargetQ
protected double remoteTargetQ
-
-
Constructor Detail
-
AbstractLfGenerator
protected AbstractLfGenerator(LfNetwork network, double targetP)
-
-
Method Detail
-
getOriginalId
public String getOriginalId()
- Specified by:
getOriginalId
in interfaceLfGenerator
-
getBus
public LfBus getBus()
- Specified by:
getBus
in interfaceLfGenerator
-
setBus
public void setBus(LfBus bus)
- Specified by:
setBus
in interfaceLfGenerator
-
isFictitious
public boolean isFictitious()
- Specified by:
isFictitious
in interfaceLfGenerator
-
getInitialTargetP
public double getInitialTargetP()
- Specified by:
getInitialTargetP
in interfaceLfGenerator
-
getTargetP
public double getTargetP()
- Specified by:
getTargetP
in interfaceLfGenerator
-
setTargetP
public void setTargetP(double targetP)
- Specified by:
setTargetP
in interfaceLfGenerator
-
getTargetV
public double getTargetV()
- Specified by:
getTargetV
in interfaceLfGenerator
-
getGeneratorControlType
public LfGenerator.GeneratorControlType getGeneratorControlType()
- Specified by:
getGeneratorControlType
in interfaceLfGenerator
-
setGeneratorControlType
public void setGeneratorControlType(LfGenerator.GeneratorControlType generatorControlType)
- Specified by:
setGeneratorControlType
in interfaceLfGenerator
-
hasRemoteReactivePowerControl
public boolean hasRemoteReactivePowerControl()
- Specified by:
hasRemoteReactivePowerControl
in interfaceLfGenerator
-
getRemoteControlReactiveKey
public OptionalDouble getRemoteControlReactiveKey()
- Specified by:
getRemoteControlReactiveKey
in interfaceLfGenerator
-
getReactiveLimits
protected abstract Optional<com.powsybl.iidm.network.ReactiveLimits> getReactiveLimits()
-
getMinQ
public double getMinQ()
- Specified by:
getMinQ
in interfaceLfGenerator
-
getMaxQ
public double getMaxQ()
- Specified by:
getMaxQ
in interfaceLfGenerator
-
getRangeQ
public double getRangeQ(LfGenerator.ReactiveRangeMode rangeMode)
- Specified by:
getRangeQ
in interfaceLfGenerator
-
getCalculatedQ
public double getCalculatedQ()
- Specified by:
getCalculatedQ
in interfaceLfGenerator
-
setCalculatedQ
public void setCalculatedQ(double calculatedQ)
- Specified by:
setCalculatedQ
in interfaceLfGenerator
-
getControlledBus
public LfBus getControlledBus()
- Specified by:
getControlledBus
in interfaceLfGenerator
-
setVoltageControl
protected void setVoltageControl(double targetV, com.powsybl.iidm.network.Terminal terminal, com.powsybl.iidm.network.Terminal regulatingTerminal, LfNetworkParameters parameters, com.powsybl.openloadflow.network.impl.LfNetworkLoadingReport report)
-
checkVoltageControlConsistency
protected boolean checkVoltageControlConsistency(LfNetworkParameters parameters, com.powsybl.openloadflow.network.impl.LfNetworkLoadingReport report)
-
checkTargetV
protected boolean checkTargetV(double targetV, LfNetworkParameters parameters, com.powsybl.openloadflow.network.impl.LfNetworkLoadingReport report)
-
setReactivePowerControl
protected void setReactivePowerControl(com.powsybl.iidm.network.Terminal regulatingTerminal, double targetQ)
-
getControlledBranch
public LfBranch getControlledBranch()
- Specified by:
getControlledBranch
in interfaceLfGenerator
-
getControlledBranchSide
public ControlledSide getControlledBranchSide()
- Specified by:
getControlledBranchSide
in interfaceLfGenerator
-
getRemoteTargetQ
public double getRemoteTargetQ()
- Specified by:
getRemoteTargetQ
in interfaceLfGenerator
-
setParticipating
public void setParticipating(boolean participating)
- Specified by:
setParticipating
in interfaceLfGenerator
-
checkActivePowerControl
public static boolean checkActivePowerControl(String generatorId, double targetP, double minP, double maxP, double plausibleActivePowerLimit, com.powsybl.openloadflow.network.impl.LfNetworkLoadingReport report)
-
isDisabled
public boolean isDisabled()
- Specified by:
isDisabled
in interfaceLfGenerator
-
setDisabled
public void setDisabled(boolean disabled)
- Specified by:
setDisabled
in interfaceLfGenerator
-
-