Class AbstractLfBus
- java.lang.Object
-
- com.powsybl.openloadflow.network.AbstractElement
-
- com.powsybl.openloadflow.network.impl.AbstractLfBus
-
- 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 List<com.powsybl.iidm.network.Battery>
batteries
protected List<LfBranch>
branches
protected double
calculatedQ
protected boolean
disabled
protected DiscreteVoltageControl
discreteVoltageControl
protected double
fixedLoadTargetP
protected double
fixedLoadTargetQ
protected double
generationTargetQ
protected List<LfGenerator>
generators
protected double
initialLoadTargetP
protected double
initialLoadTargetQ
protected List<com.powsybl.iidm.network.LccConverterStation>
lccCss
protected List<com.powsybl.iidm.network.Load>
loads
protected double
loadTargetP
protected double
loadTargetQ
protected static org.slf4j.Logger
LOGGER
protected Evaluable
p
protected int
positiveLoadCount
protected Evaluable
q
protected List<LfShunt>
shunts
protected boolean
slack
protected Evaluable
v
protected boolean
voltageControllerEnabled
protected int
voltageControlSwitchOffCount
-
Fields inherited from class com.powsybl.openloadflow.network.AbstractElement
network, num
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractLfBus(LfNetwork network, double v, double angle)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
add(LfGenerator generator)
void
addBranch(LfBranch branch)
double
getAngle()
List<LfBranch>
getBranches()
double
getCalculatedQ()
DiscreteVoltageControl
getDiscreteVoltageControl()
double
getFixedLoadTargetP()
double
getFixedLoadTargetQ()
double
getGenerationTargetP()
double
getGenerationTargetQ()
List<LfGenerator>
getGenerators()
static double
getLccConverterStationLoadTargetP(com.powsybl.iidm.network.LccConverterStation lccCs, com.powsybl.iidm.network.HvdcLine line)
static double
getLccConverterStationLoadTargetQ(com.powsybl.iidm.network.LccConverterStation lccCs, com.powsybl.iidm.network.HvdcLine line)
double
getLoadTargetP()
double
getLoadTargetQ()
double
getMaxQ()
double
getMinQ()
Evaluable
getP()
int
getPositiveLoadCount()
Evaluable
getQ()
List<LfShunt>
getShunts()
double
getTargetP()
double
getTargetQ()
ElementType
getType()
Evaluable
getV()
Optional<VoltageControl>
getVoltageControl()
int
getVoltageControlSwitchOffCount()
Get the number of time, voltage control status has be set from true to false.boolean
hasVoltageControllerCapability()
boolean
isDisabled()
boolean
isDiscreteVoltageControlled()
boolean
isSlack()
boolean
isVoltageControlled()
boolean
isVoltageControllerEnabled()
void
setAngle(double angle)
void
setCalculatedQ(double calculatedQ)
void
setDisabled(boolean disabled)
void
setDiscreteVoltageControl(DiscreteVoltageControl discreteVoltageControl)
void
setGenerationTargetQ(double generationTargetQ)
void
setLoadTargetP(double loadTargetP)
void
setLoadTargetQ(double loadTargetQ)
void
setP(Evaluable p)
void
setQ(Evaluable q)
void
setSlack(boolean slack)
void
setV(Evaluable v)
void
setVoltageControl(VoltageControl voltageControl)
void
setVoltageControllerEnabled(boolean voltageControlEnabled)
void
setVoltageControlSwitchOffCount(int voltageControlSwitchOffCount)
void
updateState(boolean reactiveLimits, boolean writeSlackBus)
-
Methods inherited from class com.powsybl.openloadflow.network.AbstractElement
getNetwork, getNum, setNum
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.powsybl.openloadflow.network.LfBus
getHighVoltageLimit, getLowVoltageLimit, getNominalV, getVoltageLevelId, isFictitious, isParticipating
-
Methods inherited from interface com.powsybl.openloadflow.network.LfElement
getId, getNetwork, getNum, setNum
-
-
-
-
Field Detail
-
LOGGER
protected static final org.slf4j.Logger LOGGER
-
slack
protected boolean slack
-
v
protected Evaluable v
-
angle
protected double angle
-
calculatedQ
protected double calculatedQ
-
voltageControllerEnabled
protected boolean voltageControllerEnabled
-
voltageControlSwitchOffCount
protected int voltageControlSwitchOffCount
-
initialLoadTargetP
protected double initialLoadTargetP
-
loadTargetP
protected double loadTargetP
-
fixedLoadTargetP
protected double fixedLoadTargetP
-
positiveLoadCount
protected int positiveLoadCount
-
initialLoadTargetQ
protected double initialLoadTargetQ
-
loadTargetQ
protected double loadTargetQ
-
fixedLoadTargetQ
protected double fixedLoadTargetQ
-
generationTargetQ
protected double generationTargetQ
-
generators
protected final List<LfGenerator> generators
-
loads
protected final List<com.powsybl.iidm.network.Load> loads
-
batteries
protected final List<com.powsybl.iidm.network.Battery> batteries
-
lccCss
protected final List<com.powsybl.iidm.network.LccConverterStation> lccCss
-
discreteVoltageControl
protected DiscreteVoltageControl discreteVoltageControl
-
disabled
protected boolean disabled
-
p
protected Evaluable p
-
q
protected Evaluable q
-
-
Constructor Detail
-
AbstractLfBus
protected AbstractLfBus(LfNetwork network, double v, double angle)
-
-
Method Detail
-
getType
public ElementType getType()
-
getTargetP
public double getTargetP()
- Specified by:
getTargetP
in interfaceLfBus
-
getTargetQ
public double getTargetQ()
- Specified by:
getTargetQ
in interfaceLfBus
-
hasVoltageControllerCapability
public boolean hasVoltageControllerCapability()
- Specified by:
hasVoltageControllerCapability
in interfaceLfBus
-
getVoltageControl
public Optional<VoltageControl> getVoltageControl()
- Specified by:
getVoltageControl
in interfaceLfBus
-
setVoltageControl
public void setVoltageControl(VoltageControl voltageControl)
- Specified by:
setVoltageControl
in interfaceLfBus
-
isVoltageControlled
public boolean isVoltageControlled()
- Specified by:
isVoltageControlled
in interfaceLfBus
-
isVoltageControllerEnabled
public boolean isVoltageControllerEnabled()
- Specified by:
isVoltageControllerEnabled
in interfaceLfBus
-
setVoltageControllerEnabled
public void setVoltageControllerEnabled(boolean voltageControlEnabled)
- Specified by:
setVoltageControllerEnabled
in interfaceLfBus
-
getVoltageControlSwitchOffCount
public int getVoltageControlSwitchOffCount()
Description copied from interface:LfBus
Get the number of time, voltage control status has be set from true to false.- Specified by:
getVoltageControlSwitchOffCount
in interfaceLfBus
- Returns:
- the number of time, voltage control status has be set from true to false
-
setVoltageControlSwitchOffCount
public void setVoltageControlSwitchOffCount(int voltageControlSwitchOffCount)
- Specified by:
setVoltageControlSwitchOffCount
in interfaceLfBus
-
getLccConverterStationLoadTargetP
public static double getLccConverterStationLoadTargetP(com.powsybl.iidm.network.LccConverterStation lccCs, com.powsybl.iidm.network.HvdcLine line)
-
getLccConverterStationLoadTargetQ
public static double getLccConverterStationLoadTargetQ(com.powsybl.iidm.network.LccConverterStation lccCs, com.powsybl.iidm.network.HvdcLine line)
-
add
protected void add(LfGenerator generator)
-
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
-
setLoadTargetP
public void setLoadTargetP(double loadTargetP)
- Specified by:
setLoadTargetP
in interfaceLfBus
-
getFixedLoadTargetP
public double getFixedLoadTargetP()
- Specified by:
getFixedLoadTargetP
in interfaceLfBus
-
getPositiveLoadCount
public int getPositiveLoadCount()
- Specified by:
getPositiveLoadCount
in interfaceLfBus
-
getLoadTargetQ
public double getLoadTargetQ()
- Specified by:
getLoadTargetQ
in interfaceLfBus
-
setLoadTargetQ
public void setLoadTargetQ(double loadTargetQ)
- Specified by:
setLoadTargetQ
in interfaceLfBus
-
getFixedLoadTargetQ
public double getFixedLoadTargetQ()
- Specified by:
getFixedLoadTargetQ
in interfaceLfBus
-
getCalculatedQ
public double getCalculatedQ()
- Specified by:
getCalculatedQ
in interfaceLfBus
-
setCalculatedQ
public void setCalculatedQ(double calculatedQ)
- Specified by:
setCalculatedQ
in interfaceLfBus
-
getGenerators
public List<LfGenerator> getGenerators()
- Specified by:
getGenerators
in interfaceLfBus
-
getBranches
public List<LfBranch> getBranches()
- Specified by:
getBranches
in interfaceLfBus
-
updateState
public void updateState(boolean reactiveLimits, boolean writeSlackBus)
- Specified by:
updateState
in interfaceLfBus
-
getDiscreteVoltageControl
public DiscreteVoltageControl getDiscreteVoltageControl()
- Specified by:
getDiscreteVoltageControl
in interfaceLfBus
-
isDiscreteVoltageControlled
public boolean isDiscreteVoltageControlled()
- Specified by:
isDiscreteVoltageControlled
in interfaceLfBus
-
setDiscreteVoltageControl
public void setDiscreteVoltageControl(DiscreteVoltageControl discreteVoltageControl)
- Specified by:
setDiscreteVoltageControl
in interfaceLfBus
-
isDisabled
public boolean isDisabled()
- Specified by:
isDisabled
in interfaceLfBus
-
setDisabled
public void setDisabled(boolean disabled)
- Specified by:
setDisabled
in interfaceLfBus
-
-