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
- Author:
- Ghiles Abdellah <ghiles.abdellah at rte-france.com>
-
Field Summary
Modifier and TypeFieldDescriptionprotected com.powsybl.iidm.network.impl.VoltageLevelExt
-
Constructor Summary
ConstructorDescriptionBatteryAdderImpl
(com.powsybl.iidm.network.impl.VoltageLevelExt voltageLevel) -
Method Summary
Modifier and TypeMethodDescriptionadd()
Build the Battery object.protected com.powsybl.iidm.network.impl.TerminalExt
protected String
protected String
checkAndGetUniqueId
(Predicate<String> containsId) protected static Ref<NetworkImpl>
computeNetworkRef
(NetworkImpl network, com.powsybl.iidm.network.impl.VoltageLevelExt... voltageLevels) Compute theRef
<NetworkImpl
> to use for a new element from its voltage levels.protected String
getName()
protected NetworkImpl
protected Ref<NetworkImpl>
protected String
protected boolean
setConnectableBus
(String connectableBus) setEnsureIdUnicity
(boolean ensureIdUnicity) setFictitious
(boolean fictitious) setMaxP
(double maxP) Set the maximal active power in MW.setMinP
(double minP) Set the minimal active power in MW.setNode
(int node) setTargetP
(double targetP) Set the target active power in MW.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
-
Field Details
-
voltageLevel
protected com.powsybl.iidm.network.impl.VoltageLevelExt voltageLevel
-
-
Constructor Details
-
BatteryAdderImpl
public BatteryAdderImpl(com.powsybl.iidm.network.impl.VoltageLevelExt voltageLevel)
-
-
Method Details
-
getTypeDescription
-
setTargetP
Set the target active power in MW.Depends on the working variant.
- Specified by:
setTargetP
in interfaceBatteryAdder
- See Also:
-
setTargetQ
Set the target reactive power in MVar.Depends on the working variant.
- Specified by:
setTargetQ
in interfaceBatteryAdder
- See Also:
-
setMinP
Set the minimal active power in MW.- Specified by:
setMinP
in interfaceBatteryAdder
-
setMaxP
Set the maximal active power in MW.- Specified by:
setMaxP
in interfaceBatteryAdder
-
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
-
setBus
-
setConnectableBus
-
getNetwork
-
getNetworkRef
-
checkAndGetTerminal
protected com.powsybl.iidm.network.impl.TerminalExt checkAndGetTerminal() -
setId
-
setEnsureIdUnicity
-
setName
-
setFictitious
-
checkAndGetUniqueId
-
checkAndGetUniqueId
-
getName
-
isFictitious
protected boolean isFictitious() -
getMessageHeader
- Specified by:
getMessageHeader
in interfaceValidable
-
computeNetworkRef
protected static Ref<NetworkImpl> computeNetworkRef(NetworkImpl network, com.powsybl.iidm.network.impl.VoltageLevelExt... voltageLevels) Compute theRef
<NetworkImpl
> to use for a new element from its voltage levels.- Parameters:
network
- the root network in which the element will be addedvoltageLevels
- the list of the voltage levels of the element- Returns:
- the networkRef to use
-