Class AbstractTapPositionModification
java.lang.Object
com.powsybl.iidm.modification.AbstractNetworkModification
com.powsybl.iidm.modification.tapchanger.AbstractTapPositionModification
- All Implemented Interfaces:
NetworkModification
- Direct Known Subclasses:
PhaseTapPositionModification
,RatioTapPositionModification
- Author:
- Nicolas PIERRE <nicolas.pierre at artelys.com>
-
Field Summary
-
Constructor Summary
ModifierConstructorDescriptionprotected
AbstractTapPositionModification
(String transformerId, int tapPosition, ThreeSides legSide) -
Method Summary
Modifier and TypeMethodDescriptionvoid
apply
(Network network, NamingStrategy namingStrategy, boolean throwException, ComputationManager computationManager, ReportNode reportNode) Applies the modification to the given network.protected ThreeWindingsTransformer.Leg
getLeg
(ThreeWindingsTransformer threeWindingsTransformer, Predicate<ThreeWindingsTransformer.Leg> isTapHolder, boolean throwException) int
-
Field Details
-
TRANSFORMER_STR
- See Also:
-
-
Constructor Details
-
AbstractTapPositionModification
protected AbstractTapPositionModification(String transformerId, int tapPosition, ThreeSides legSide) - Parameters:
tapPosition
- the new tap positionlegSide
- defines on which leg of the three winding transformer the modification will be done. Ifnull
on three windings transformer,AbstractNetworkModification.apply(Network)
will search for a unique rtc. Ignored on two windings transformers.
-
-
Method Details
-
apply
public void apply(Network network, NamingStrategy namingStrategy, boolean throwException, ComputationManager computationManager, ReportNode reportNode) Description copied from interface:NetworkModification
Applies the modification to the given network. If throwException is set to true, then in case of error, an exception will be thrown. Otherwise, computation will continue but the injection will not be added to the network in case of error. -
getLeg
protected ThreeWindingsTransformer.Leg getLeg(ThreeWindingsTransformer threeWindingsTransformer, Predicate<ThreeWindingsTransformer.Leg> isTapHolder, boolean throwException) - Parameters:
isTapHolder
- predicate to test if the leg has the correct Tap- Returns:
- The leg either indicated in the constructor, or the unique one matching the predicate, null otherwise
-
getTransformerId
-
getTapPosition
public int getTapPosition() -
getOptionalLeg
-
getLegSide
-