Package com.powsybl.iidm.network.impl
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
-
-
Constructor Summary
Constructors Constructor Description BatteryAdderImpl(com.powsybl.iidm.network.impl.VoltageLevelExt voltageLevel)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BatteryImpl
add()
Build the Battery object.protected com.powsybl.iidm.network.impl.TerminalExt
checkAndGetTerminal()
protected String
checkAndGetUniqueId()
protected String
checkAndGetUniqueId(Predicate<String> containsId)
String
getMessageHeader()
protected String
getName()
protected com.powsybl.iidm.network.impl.NetworkImpl
getNetwork()
protected String
getTypeDescription()
protected boolean
isFictitious()
T
setBus(String bus)
T
setConnectableBus(String connectableBus)
T
setEnsureIdUnicity(boolean ensureIdUnicity)
T
setFictitious(boolean fictitious)
T
setId(String id)
BatteryAdderImpl
setMaxP(double maxP)
Set the maximal active power in MW.BatteryAdderImpl
setMinP(double minP)
Set the minimal active power in MW.T
setName(String name)
T
setNode(int node)
BatteryAdderImpl
setTargetP(double targetP)
Set the target active power in MW.BatteryAdderImpl
setTargetQ(double targetQ)
Set the target reactive power in MVar.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.powsybl.iidm.network.BatteryAdder
setP0, setQ0
-
Methods inherited from interface com.powsybl.iidm.network.IdentifiableAdder
setEnsureIdUnicity, setFictitious, setId, setName
-
Methods inherited from interface com.powsybl.iidm.network.InjectionAdder
setBus, setConnectableBus, setNode
-
-
-
-
Method Detail
-
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 interfaceBatteryAdder
- See Also:
VariantManager
-
setTargetQ
public BatteryAdderImpl setTargetQ(double targetQ)
Set the target reactive power in MVar.Depends on the working variant.
- Specified by:
setTargetQ
in interfaceBatteryAdder
- See Also:
VariantManager
-
setMinP
public BatteryAdderImpl setMinP(double minP)
Set the minimal active power in MW.- Specified by:
setMinP
in interfaceBatteryAdder
-
setMaxP
public BatteryAdderImpl setMaxP(double maxP)
Set the maximal active power in MW.- Specified by:
setMaxP
in interfaceBatteryAdder
-
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 interfaceBatteryAdder
- Specified by:
add
in interfaceIdentifiableAdder<Battery,BatteryAdder>
- Specified by:
add
in interfaceInjectionAdder<Battery,BatteryAdder>
- Returns:
Battery
-
setNode
public T setNode(int node)
-
setBus
public T setBus(String bus)
-
setConnectableBus
public T setConnectableBus(String connectableBus)
-
checkAndGetTerminal
protected com.powsybl.iidm.network.impl.TerminalExt checkAndGetTerminal()
-
setId
public T setId(String id)
-
setEnsureIdUnicity
public T setEnsureIdUnicity(boolean ensureIdUnicity)
-
setName
public T setName(String name)
-
setFictitious
public T setFictitious(boolean fictitious)
-
checkAndGetUniqueId
protected String checkAndGetUniqueId()
-
getName
protected String getName()
-
isFictitious
protected boolean isFictitious()
-
getMessageHeader
public String getMessageHeader()
- Specified by:
getMessageHeader
in interfaceValidable
-
-