Class AbstractLfBranch
- java.lang.Object
-
- com.powsybl.openloadflow.network.AbstractPropertyBag
-
- com.powsybl.openloadflow.network.AbstractElement
-
- com.powsybl.openloadflow.network.impl.AbstractLfBranch
-
- All Implemented Interfaces:
LfBranch
,LfElement
,PropertyBag
- Direct Known Subclasses:
AbstractImpedantLfBranch
,LfSwitch
public abstract class AbstractLfBranch extends AbstractElement implements LfBranch
- Author:
- Geoffroy Jamgotchian
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.powsybl.openloadflow.network.LfBranch
LfBranch.BranchType, LfBranch.LfLimit
-
-
Field Summary
Fields Modifier and Type Field Description protected Evaluable
a1
protected LfAsymLine
asymLine
protected TransformerPhaseControl
phaseControl
protected boolean
phaseControlEnabled
protected PiModel
piModel
protected TransformerVoltageControl
voltageControl
protected boolean
voltageControlEnabled
protected Map<LoadFlowModel,com.powsybl.openloadflow.network.impl.AbstractLfBranch.ZeroImpedanceContext>
zeroImpedanceContextByModel
-
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
AbstractLfBranch(LfNetwork network, LfBus bus1, LfBus bus2, PiModel piModel, LfNetworkParameters parameters)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description double
computeApparentPower1()
double
computeApparentPower2()
protected static List<LfBranch.LfLimit>
createSortedLimitsList(com.powsybl.iidm.network.LoadingLimits loadingLimits, LfBus bus)
Evaluable
getA1()
LfAsymLine
getAsymLine()
LfBus
getBus1()
LfBus
getBus2()
List<LfBranch.LfLimit>
getLimits1(com.powsybl.iidm.network.LimitType type, com.powsybl.iidm.network.LoadingLimits loadingLimits)
List<LfBranch.LfLimit>
getLimits2(com.powsybl.iidm.network.LimitType type, com.powsybl.iidm.network.LoadingLimits loadingLimits)
Optional<TransformerPhaseControl>
getPhaseControl()
PiModel
getPiModel()
Optional<ReactivePowerControl>
getReactivePowerControl()
protected static double
getScaleForLimitType(com.powsybl.iidm.network.LimitType type, LfBus bus)
ElementType
getType()
Optional<TransformerVoltageControl>
getVoltageControl()
boolean
isAsymmetric()
boolean
isConnectedAtBothSides()
boolean
isPhaseControlEnabled()
boolean
isPhaseControlled()
boolean
isPhaseController()
boolean
isSpanningTreeEdge(LoadFlowModel loadFlowModel)
boolean
isVoltageControlEnabled()
boolean
isVoltageController()
boolean
isZeroImpedance(LoadFlowModel loadFlowModel)
void
setA1(Evaluable a1)
void
setAsymLine(LfAsymLine asymLine)
void
setDisabled(boolean disabled)
void
setMinZ(double lowImpedanceThreshold)
void
setPhaseControl(TransformerPhaseControl phaseControl)
void
setPhaseControlEnabled(boolean phaseControlEnabled)
void
setReactivePowerControl(ReactivePowerControl pReactivePowerControl)
void
setSpanningTreeEdge(LoadFlowModel loadFlowModel, boolean spanningTreeEdge)
void
setVoltageControl(TransformerVoltageControl transformerVoltageControl)
void
setVoltageControlEnabled(boolean voltageControlEnabled)
protected void
updateTapPosition(com.powsybl.iidm.network.PhaseTapChanger ptc)
protected void
updateTapPosition(com.powsybl.iidm.network.RatioTapChanger rtc, double ptcRho, double rho)
-
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.LfBranch
createBranchResult, getBranchType, getI1, getI2, getLimits1, getLimits2, getP1, getP2, getQ1, getQ2, hasPhaseControllerCapability, setI1, setI2, setP1, setP2, setQ1, setQ2, updateFlows, updateState
-
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
-
piModel
protected final PiModel piModel
-
phaseControl
protected TransformerPhaseControl phaseControl
-
phaseControlEnabled
protected boolean phaseControlEnabled
-
voltageControl
protected TransformerVoltageControl voltageControl
-
voltageControlEnabled
protected boolean voltageControlEnabled
-
zeroImpedanceContextByModel
protected final Map<LoadFlowModel,com.powsybl.openloadflow.network.impl.AbstractLfBranch.ZeroImpedanceContext> zeroImpedanceContextByModel
-
a1
protected Evaluable a1
-
asymLine
protected LfAsymLine asymLine
-
-
Constructor Detail
-
AbstractLfBranch
protected AbstractLfBranch(LfNetwork network, LfBus bus1, LfBus bus2, PiModel piModel, LfNetworkParameters parameters)
-
-
Method Detail
-
createSortedLimitsList
protected static List<LfBranch.LfLimit> createSortedLimitsList(com.powsybl.iidm.network.LoadingLimits loadingLimits, LfBus bus)
-
getType
public ElementType getType()
-
getLimits1
public List<LfBranch.LfLimit> getLimits1(com.powsybl.iidm.network.LimitType type, com.powsybl.iidm.network.LoadingLimits loadingLimits)
-
getLimits2
public List<LfBranch.LfLimit> getLimits2(com.powsybl.iidm.network.LimitType type, com.powsybl.iidm.network.LoadingLimits loadingLimits)
-
getPiModel
public PiModel getPiModel()
- Specified by:
getPiModel
in interfaceLfBranch
-
getPhaseControl
public Optional<TransformerPhaseControl> getPhaseControl()
- Specified by:
getPhaseControl
in interfaceLfBranch
-
setPhaseControl
public void setPhaseControl(TransformerPhaseControl phaseControl)
- Specified by:
setPhaseControl
in interfaceLfBranch
-
isPhaseController
public boolean isPhaseController()
- Specified by:
isPhaseController
in interfaceLfBranch
-
isPhaseControlled
public boolean isPhaseControlled()
- Specified by:
isPhaseControlled
in interfaceLfBranch
-
isPhaseControlEnabled
public boolean isPhaseControlEnabled()
- Specified by:
isPhaseControlEnabled
in interfaceLfBranch
-
setPhaseControlEnabled
public void setPhaseControlEnabled(boolean phaseControlEnabled)
- Specified by:
setPhaseControlEnabled
in interfaceLfBranch
-
updateTapPosition
protected void updateTapPosition(com.powsybl.iidm.network.PhaseTapChanger ptc)
-
updateTapPosition
protected void updateTapPosition(com.powsybl.iidm.network.RatioTapChanger rtc, double ptcRho, double rho)
-
getScaleForLimitType
protected static double getScaleForLimitType(com.powsybl.iidm.network.LimitType type, LfBus bus)
-
getVoltageControl
public Optional<TransformerVoltageControl> getVoltageControl()
- Specified by:
getVoltageControl
in interfaceLfBranch
-
isVoltageController
public boolean isVoltageController()
- Specified by:
isVoltageController
in interfaceLfBranch
-
setVoltageControl
public void setVoltageControl(TransformerVoltageControl transformerVoltageControl)
- Specified by:
setVoltageControl
in interfaceLfBranch
-
isVoltageControlEnabled
public boolean isVoltageControlEnabled()
- Specified by:
isVoltageControlEnabled
in interfaceLfBranch
-
setVoltageControlEnabled
public void setVoltageControlEnabled(boolean voltageControlEnabled)
- Specified by:
setVoltageControlEnabled
in interfaceLfBranch
-
computeApparentPower1
public double computeApparentPower1()
- Specified by:
computeApparentPower1
in interfaceLfBranch
-
computeApparentPower2
public double computeApparentPower2()
- Specified by:
computeApparentPower2
in interfaceLfBranch
-
isZeroImpedance
public boolean isZeroImpedance(LoadFlowModel loadFlowModel)
- Specified by:
isZeroImpedance
in interfaceLfBranch
-
setSpanningTreeEdge
public void setSpanningTreeEdge(LoadFlowModel loadFlowModel, boolean spanningTreeEdge)
- Specified by:
setSpanningTreeEdge
in interfaceLfBranch
-
isSpanningTreeEdge
public boolean isSpanningTreeEdge(LoadFlowModel loadFlowModel)
- Specified by:
isSpanningTreeEdge
in interfaceLfBranch
-
getReactivePowerControl
public Optional<ReactivePowerControl> getReactivePowerControl()
- Specified by:
getReactivePowerControl
in interfaceLfBranch
-
setReactivePowerControl
public void setReactivePowerControl(ReactivePowerControl pReactivePowerControl)
- Specified by:
setReactivePowerControl
in interfaceLfBranch
-
isConnectedAtBothSides
public boolean isConnectedAtBothSides()
- Specified by:
isConnectedAtBothSides
in interfaceLfBranch
-
setMinZ
public void setMinZ(double lowImpedanceThreshold)
-
setDisabled
public void setDisabled(boolean disabled)
- Specified by:
setDisabled
in interfaceLfElement
- Overrides:
setDisabled
in classAbstractElement
-
getAsymLine
public LfAsymLine getAsymLine()
- Specified by:
getAsymLine
in interfaceLfBranch
-
setAsymLine
public void setAsymLine(LfAsymLine asymLine)
- Specified by:
setAsymLine
in interfaceLfBranch
-
isAsymmetric
public boolean isAsymmetric()
- Specified by:
isAsymmetric
in interfaceLfBranch
-
-