Class BatteryAdderImpl

java.lang.Object
com.powsybl.iidm.network.impl.BatteryAdderImpl
All Implemented Interfaces:
BatteryAdder, IdentifiableAdder<Battery,BatteryAdder>, InjectionAdder<Battery,BatteryAdder>, Validable

public class BatteryAdderImpl extends Object implements BatteryAdder
Author:
Ghiles Abdellah <ghiles.abdellah at rte-france.com>
  • Constructor Details

    • BatteryAdderImpl

      public BatteryAdderImpl(com.powsybl.iidm.network.impl.VoltageLevelExt voltageLevel)
  • Method Details

    • getNetwork

      protected com.powsybl.iidm.network.impl.NetworkImpl getNetwork()
    • getTypeDescription

      protected String getTypeDescription()
    • setTargetP

      public BatteryAdderImpl setTargetP(double targetP)
      Set the target active power in MW.

      Depends on the working variant.

      Specified by:
      setTargetP in interface BatteryAdder
      See Also:
    • setTargetQ

      public BatteryAdderImpl setTargetQ(double targetQ)
      Set the target reactive power in MVar.

      Depends on the working variant.

      Specified by:
      setTargetQ in interface BatteryAdder
      See Also:
    • setMinP

      public BatteryAdderImpl setMinP(double minP)
      Set the minimal active power in MW.
      Specified by:
      setMinP in interface BatteryAdder
    • setMaxP

      public BatteryAdderImpl setMaxP(double maxP)
      Set the maximal active power in MW.
      Specified by:
      setMaxP in interface BatteryAdder
    • getVariantManagerHolder

      protected Ref<? extends VariantManagerHolder> getVariantManagerHolder()
    • add

      public BatteryImpl add()
      Build the Battery object. This are the checks that are performed before creating the object : - p0 is not equal to Double.NaN -> p0 is set - q0 is not equal to Double.NaN -> q0 is set - minP is not equal to Double.NaN -> minP is set - maxP is not equal to Double.NaN -> maxP is set - minP is less than maxP - minP <= p0 <= maxP
      Specified by:
      add in interface BatteryAdder
      Specified by:
      add in interface IdentifiableAdder<Battery,BatteryAdder>
      Specified by:
      add in interface InjectionAdder<Battery,BatteryAdder>
      Returns:
      Battery
    • setNode

      public BatteryAdderImpl setNode(int node)
    • setBus

      public BatteryAdderImpl setBus(String bus)
    • setConnectableBus

      public BatteryAdderImpl setConnectableBus(String connectableBus)
    • checkAndGetTerminal

      protected com.powsybl.iidm.network.impl.TerminalExt checkAndGetTerminal()
    • setId

      public BatteryAdderImpl setId(String id)
    • setEnsureIdUnicity

      public BatteryAdderImpl setEnsureIdUnicity(boolean ensureIdUnicity)
    • setName

      public BatteryAdderImpl setName(String name)
    • setFictitious

      public BatteryAdderImpl setFictitious(boolean fictitious)
    • checkAndGetUniqueId

      protected String checkAndGetUniqueId()
    • checkAndGetUniqueId

      protected String checkAndGetUniqueId(Predicate<String> containsId)
    • getName

      protected String getName()
    • isFictitious

      protected boolean isFictitious()
    • getMessageHeader

      public String getMessageHeader()
      Specified by:
      getMessageHeader in interface Validable
    • computeNetworkRef

      protected static Ref<com.powsybl.iidm.network.impl.NetworkImpl> computeNetworkRef(com.powsybl.iidm.network.impl.NetworkImpl network, com.powsybl.iidm.network.impl.VoltageLevelExt... voltageLevels)
      Compute the Ref<NetworkImpl> to use for a new element from its voltage levels.
      Parameters:
      network - the root network in which the element will be added
      voltageLevels - the list of the voltage levels of the element
      Returns:
      the networkRef to use