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

public abstract class AbstractTapPositionModification extends AbstractNetworkModification
Author:
Nicolas PIERRE <nicolas.pierre at artelys.com>
  • Field Details

  • Constructor Details

    • AbstractTapPositionModification

      protected AbstractTapPositionModification(String transformerId, int tapPosition, ThreeSides legSide)
      Parameters:
      tapPosition - the new tap position
      legSide - defines on which leg of the three winding transformer the modification will be done. If null 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

      public String getTransformerId()
    • getTapPosition

      public int getTapPosition()
    • getOptionalLeg

      public Optional<ThreeSides> getOptionalLeg()
    • getLegSide

      public ThreeSides getLegSide()