Class AbstractLfBus
- java.lang.Object
-
- com.powsybl.openloadflow.network.AbstractPropertyBag
-
- com.powsybl.openloadflow.network.AbstractElement
-
- com.powsybl.openloadflow.network.impl.AbstractLfBus
-
- All Implemented Interfaces:
LfBus
,LfElement
,PropertyBag
- Direct Known Subclasses:
LfBusImpl
,LfDanglingLineBus
,LfStarBus
public abstract class AbstractLfBus extends AbstractElement implements LfBus
- Author:
- Geoffroy Jamgotchian
-
-
Field Summary
Fields Modifier and Type Field Description protected double
angle
protected LfAsymBus
asym
protected List<LfBranch>
branches
protected Evaluable
calculatedV
protected LfShunt
controllerShunt
protected boolean
ensurePowerFactorConstantByLoad
protected Double
generationTargetP
protected double
generationTargetQ
protected List<LfGenerator>
generators
protected boolean
generatorVoltageControlEnabled
protected List<LfHvdc>
hvdcs
protected double
initialLoadTargetP
protected List<Ref<com.powsybl.iidm.network.LccConverterStation>>
lccCsRefs
protected com.powsybl.openloadflow.network.impl.LfLoadImpl
load
protected double
loadTargetP
protected double
loadTargetQ
protected static org.slf4j.Logger
LOGGER
protected Evaluable
p
protected Evaluable
q
protected boolean
reference
protected double
remoteVoltageControlReactivePercent
protected LfShunt
shunt
protected ShuntVoltageControl
shuntVoltageControl
protected boolean
slack
protected LfShunt
svcShunt
protected TransformerVoltageControl
transformerVoltageControl
protected double
v
protected Map<LoadFlowModel,LfZeroImpedanceNetwork>
zeroImpedanceNetwork
-
Fields inherited from class com.powsybl.openloadflow.network.AbstractElement
disabled, network, num
-
Fields inherited from class com.powsybl.openloadflow.network.AbstractPropertyBag
properties
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractLfBus(LfNetwork network, double v, double angle, boolean distributedOnConformLoad)
-
Method Summary
-
Methods inherited from class com.powsybl.openloadflow.network.AbstractElement
getNetwork, getNum, getOriginalIds, isDisabled, notifyDisable, setNum, 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.LfBus
createBusResults, getCountry, getHighVoltageLimit, getLowVoltageLimit, getNominalV, getVoltageLevelId, isFictitious, isParticipating
-
Methods inherited from interface com.powsybl.openloadflow.network.LfElement
getId, getNetwork, getNum, getOriginalIds, isDisabled, setNum
-
Methods inherited from interface com.powsybl.openloadflow.network.PropertyBag
getProperty, removeProperty, setProperty
-
-
-
-
Field Detail
-
LOGGER
protected static final org.slf4j.Logger LOGGER
-
slack
protected boolean slack
-
reference
protected boolean reference
-
v
protected double v
-
calculatedV
protected Evaluable calculatedV
-
angle
protected double angle
-
generatorVoltageControlEnabled
protected boolean generatorVoltageControlEnabled
-
loadTargetP
protected double loadTargetP
-
initialLoadTargetP
protected double initialLoadTargetP
-
loadTargetQ
protected double loadTargetQ
-
generationTargetP
protected Double generationTargetP
-
generationTargetQ
protected double generationTargetQ
-
generators
protected final List<LfGenerator> generators
-
shunt
protected LfShunt shunt
-
controllerShunt
protected LfShunt controllerShunt
-
svcShunt
protected LfShunt svcShunt
-
load
protected final com.powsybl.openloadflow.network.impl.LfLoadImpl load
-
ensurePowerFactorConstantByLoad
protected boolean ensurePowerFactorConstantByLoad
-
transformerVoltageControl
protected TransformerVoltageControl transformerVoltageControl
-
shuntVoltageControl
protected ShuntVoltageControl shuntVoltageControl
-
p
protected Evaluable p
-
q
protected Evaluable q
-
remoteVoltageControlReactivePercent
protected double remoteVoltageControlReactivePercent
-
zeroImpedanceNetwork
protected final Map<LoadFlowModel,LfZeroImpedanceNetwork> zeroImpedanceNetwork
-
asym
protected LfAsymBus asym
-
-
Constructor Detail
-
AbstractLfBus
protected AbstractLfBus(LfNetwork network, double v, double angle, boolean distributedOnConformLoad)
-
-
Method Detail
-
getType
public ElementType getType()
-
isReference
public boolean isReference()
- Specified by:
isReference
in interfaceLfBus
-
setReference
public void setReference(boolean reference)
- Specified by:
setReference
in interfaceLfBus
-
getTargetP
public double getTargetP()
- Specified by:
getTargetP
in interfaceLfBus
-
getTargetQ
public double getTargetQ()
- Specified by:
getTargetQ
in interfaceLfBus
-
getVoltageControls
public List<VoltageControl<?>> getVoltageControls()
Description copied from interface:LfBus
Get list of all voltage controls (generator + transformer + shunt) linked to this bus.- Specified by:
getVoltageControls
in interfaceLfBus
-
isVoltageControlled
public boolean isVoltageControlled()
Description copied from interface:LfBus
Check if this bus is voltage controlled so either by a generator, a transformer or a shunt.- Specified by:
isVoltageControlled
in interfaceLfBus
-
getHighestPriorityVoltageControl
public Optional<VoltageControl<?>> getHighestPriorityVoltageControl()
Description copied from interface:LfBus
Get the highest priority voltage control connected to a bus of the zero impedance subgraph to which this bus belong.- Specified by:
getHighestPriorityVoltageControl
in interfaceLfBus
-
hasGeneratorVoltageControllerCapability
public boolean hasGeneratorVoltageControllerCapability()
- Specified by:
hasGeneratorVoltageControllerCapability
in interfaceLfBus
-
getGeneratorVoltageControl
public Optional<GeneratorVoltageControl> getGeneratorVoltageControl()
- Specified by:
getGeneratorVoltageControl
in interfaceLfBus
-
setGeneratorVoltageControl
public void setGeneratorVoltageControl(GeneratorVoltageControl generatorVoltageControl)
- Specified by:
setGeneratorVoltageControl
in interfaceLfBus
-
getReactivePowerControl
public Optional<ReactivePowerControl> getReactivePowerControl()
- Specified by:
getReactivePowerControl
in interfaceLfBus
-
setReactivePowerControl
public void setReactivePowerControl(ReactivePowerControl reactivePowerControl)
- Specified by:
setReactivePowerControl
in interfaceLfBus
-
isGeneratorVoltageControlled
public boolean isGeneratorVoltageControlled()
- Specified by:
isGeneratorVoltageControlled
in interfaceLfBus
-
getGeneratorsControllingVoltageWithSlope
public List<LfGenerator> getGeneratorsControllingVoltageWithSlope()
- Specified by:
getGeneratorsControllingVoltageWithSlope
in interfaceLfBus
-
hasGeneratorsWithSlope
public boolean hasGeneratorsWithSlope()
- Specified by:
hasGeneratorsWithSlope
in interfaceLfBus
-
removeGeneratorSlopes
public void removeGeneratorSlopes()
- Specified by:
removeGeneratorSlopes
in interfaceLfBus
-
isGeneratorVoltageControlEnabled
public boolean isGeneratorVoltageControlEnabled()
- Specified by:
isGeneratorVoltageControlEnabled
in interfaceLfBus
-
setGeneratorVoltageControlEnabled
public void setGeneratorVoltageControlEnabled(boolean generatorVoltageControlEnabled)
- Specified by:
setGeneratorVoltageControlEnabled
in interfaceLfBus
-
add
protected void add(LfGenerator generator)
-
invalidateGenerationTargetP
public void invalidateGenerationTargetP()
- Specified by:
invalidateGenerationTargetP
in interfaceLfBus
-
getGenerationTargetP
public double getGenerationTargetP()
- Specified by:
getGenerationTargetP
in interfaceLfBus
-
getGenerationTargetQ
public double getGenerationTargetQ()
- Specified by:
getGenerationTargetQ
in interfaceLfBus
-
setGenerationTargetQ
public void setGenerationTargetQ(double generationTargetQ)
- Specified by:
setGenerationTargetQ
in interfaceLfBus
-
getLoadTargetP
public double getLoadTargetP()
- Specified by:
getLoadTargetP
in interfaceLfBus
-
getInitialLoadTargetP
public double getInitialLoadTargetP()
- Specified by:
getInitialLoadTargetP
in interfaceLfBus
-
setLoadTargetP
public void setLoadTargetP(double loadTargetP)
- Specified by:
setLoadTargetP
in interfaceLfBus
-
getLoadTargetQ
public double getLoadTargetQ()
- Specified by:
getLoadTargetQ
in interfaceLfBus
-
setLoadTargetQ
public void setLoadTargetQ(double loadTargetQ)
- Specified by:
setLoadTargetQ
in interfaceLfBus
-
ensurePowerFactorConstantByLoad
public boolean ensurePowerFactorConstantByLoad()
- Specified by:
ensurePowerFactorConstantByLoad
in interfaceLfBus
-
getCalculatedV
public Evaluable getCalculatedV()
- Specified by:
getCalculatedV
in interfaceLfBus
-
setCalculatedV
public void setCalculatedV(Evaluable calculatedV)
- Specified by:
setCalculatedV
in interfaceLfBus
-
getControllerShunt
public Optional<LfShunt> getControllerShunt()
- Specified by:
getControllerShunt
in interfaceLfBus
-
getSvcShunt
public Optional<LfShunt> getSvcShunt()
- Specified by:
getSvcShunt
in interfaceLfBus
-
getGenerators
public List<LfGenerator> getGenerators()
- Specified by:
getGenerators
in interfaceLfBus
-
getBranches
public List<LfBranch> getBranches()
- Specified by:
getBranches
in interfaceLfBus
-
dispatchQ
protected static double dispatchQ(List<LfGenerator> generatorsThatControlVoltage, boolean reactiveLimits, double qToDispatch)
-
updateState
public void updateState(LfNetworkStateUpdateParameters parameters)
- Specified by:
updateState
in interfaceLfBus
-
getTransformerVoltageControl
public Optional<TransformerVoltageControl> getTransformerVoltageControl()
- Specified by:
getTransformerVoltageControl
in interfaceLfBus
-
isTransformerVoltageControlled
public boolean isTransformerVoltageControlled()
- Specified by:
isTransformerVoltageControlled
in interfaceLfBus
-
setTransformerVoltageControl
public void setTransformerVoltageControl(TransformerVoltageControl transformerVoltageControl)
- Specified by:
setTransformerVoltageControl
in interfaceLfBus
-
getShuntVoltageControl
public Optional<ShuntVoltageControl> getShuntVoltageControl()
- Specified by:
getShuntVoltageControl
in interfaceLfBus
-
isShuntVoltageControlled
public boolean isShuntVoltageControlled()
- Specified by:
isShuntVoltageControlled
in interfaceLfBus
-
setShuntVoltageControl
public void setShuntVoltageControl(ShuntVoltageControl shuntVoltageControl)
- Specified by:
setShuntVoltageControl
in interfaceLfBus
-
setDisabled
public void setDisabled(boolean disabled)
- Specified by:
setDisabled
in interfaceLfElement
- Overrides:
setDisabled
in classAbstractElement
-
findNeighbors
public Map<LfBus,List<LfBranch>> findNeighbors()
Description copied from interface:LfBus
Find bus + parallel branches neighbors.- Specified by:
findNeighbors
in interfaceLfBus
-
getRemoteVoltageControlReactivePercent
public double getRemoteVoltageControlReactivePercent()
- Specified by:
getRemoteVoltageControlReactivePercent
in interfaceLfBus
-
setRemoteVoltageControlReactivePercent
public void setRemoteVoltageControlReactivePercent(double remoteVoltageControlReactivePercent)
- Specified by:
setRemoteVoltageControlReactivePercent
in interfaceLfBus
-
getMismatchP
public double getMismatchP()
Description copied from interface:LfBus
Get active power mismatch. Only make sens for slack bus.- Specified by:
getMismatchP
in interfaceLfBus
-
setZeroImpedanceNetwork
public void setZeroImpedanceNetwork(LoadFlowModel loadFlowModel, LfZeroImpedanceNetwork zeroImpedanceNetwork)
- Specified by:
setZeroImpedanceNetwork
in interfaceLfBus
-
getZeroImpedanceNetwork
public LfZeroImpedanceNetwork getZeroImpedanceNetwork(LoadFlowModel loadFlowModel)
- Specified by:
getZeroImpedanceNetwork
in interfaceLfBus
-
-