Class CurrentLimitsAdderImpl
- All Implemented Interfaces:
CurrentLimitsAdder
,LoadingLimitsAdder<CurrentLimits,
,CurrentLimitsAdder> OperationalLimitsAdder<CurrentLimits,
CurrentLimitsAdder>
- Author:
- Geoffroy Jamgotchian <geoffroy.jamgotchian at rte-france.com>
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.powsybl.iidm.network.LoadingLimitsAdder
LoadingLimitsAdder.TemporaryLimitAdder<A>
-
Field Summary
Modifier and TypeFieldDescriptionprotected double
protected final TreeMap<Integer,
LoadingLimits.TemporaryLimit> protected final Validable
-
Constructor Summary
ConstructorDescriptionCurrentLimitsAdderImpl
(Supplier<OperationalLimitsGroupImpl> groupSupplier, Validable validable, String ownerId, NetworkImpl network) -
Method Summary
Modifier and TypeMethodDescriptionadd()
protected void
checkAndUpdateValidationLevel
(NetworkImpl network) protected ValidationLevel
checkLoadingLimits
(boolean throwException) protected ValidationLevel
checkLoadingLimits
(boolean throwException, ReportNode reportNode) double
Get the lowest value of the temporary limits to create.Get the id of the network element on which the LoadingLimits should be added.double
Get the permanent limit to add.int
Get the temporary limit value corresponding to the given name.Get the names of the temporary limits to create.double
getTemporaryLimitValue
(int acceptableDuration) Get the temporary limit value corresponding to the given acceptable duration.double
getTemporaryLimitValue
(String name) Get the temporary limit value corresponding to the given name.boolean
Indicate if temporary limits to create are defined in the adder.void
removeTemporaryLimit
(String name) Remove from the temporary limits to create the one(s) corresponding to the given name.setPermanentLimit
(double permanentLimit) 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.LoadingLimitsAdder
beginTemporaryLimit, fixLimits, fixLimits, fixLimits, getLowestTemporaryLimitValue, getOwnerId, getPermanentLimit, getTemporaryLimitAcceptableDuration, getTemporaryLimitNames, getTemporaryLimitValue, getTemporaryLimitValue, hasTemporaryLimits, removeTemporaryLimit, setPermanentLimit
-
Field Details
-
validable
-
permanentLimit
protected double permanentLimit -
temporaryLimits
-
-
Constructor Details
-
CurrentLimitsAdderImpl
public CurrentLimitsAdderImpl(Supplier<OperationalLimitsGroupImpl> groupSupplier, Validable validable, String ownerId, NetworkImpl network)
-
-
Method Details
-
add
- Specified by:
add
in interfaceOperationalLimitsAdder<CurrentLimits,
CurrentLimitsAdder>
-
setPermanentLimit
- Specified by:
setPermanentLimit
in interfaceLoadingLimitsAdder<L extends LoadingLimits,
A extends LoadingLimitsAdder<L, A>>
-
beginTemporaryLimit
- Specified by:
beginTemporaryLimit
in interfaceLoadingLimitsAdder<L extends LoadingLimits,
A extends LoadingLimitsAdder<L, A>>
-
getPermanentLimit
public double getPermanentLimit()Description copied from interface:LoadingLimitsAdder
Get the permanent limit to add.
This method is useful to fix permanent or temporary limits before calling
OperationalLimitsAdder.add()
.- Specified by:
getPermanentLimit
in interfaceLoadingLimitsAdder<L extends LoadingLimits,
A extends LoadingLimitsAdder<L, A>> - Returns:
- the permanent limit
-
getTemporaryLimitValue
public double getTemporaryLimitValue(int acceptableDuration) Description copied from interface:LoadingLimitsAdder
Get the temporary limit value corresponding to the given acceptable duration.
This method is useful to fix permanent or temporary limits before calling
OperationalLimitsAdder.add()
.- Specified by:
getTemporaryLimitValue
in interfaceLoadingLimitsAdder<L extends LoadingLimits,
A extends LoadingLimitsAdder<L, A>> - Parameters:
acceptableDuration
- the acceptable duration- Returns:
- the corresponding temporary limit value, or
Double.NaN
if none is defined.
-
hasTemporaryLimits
public boolean hasTemporaryLimits()Description copied from interface:LoadingLimitsAdder
Indicate if temporary limits to create are defined in the adder.
This method is useful to fix permanent or temporary limits before calling
OperationalLimitsAdder.add()
.- Specified by:
hasTemporaryLimits
in interfaceLoadingLimitsAdder<L extends LoadingLimits,
A extends LoadingLimitsAdder<L, A>> - Returns:
true
if temporary limits to create are defined,false
otherwise.
-
checkAndUpdateValidationLevel
-
checkLoadingLimits
-
checkLoadingLimits
-
getTemporaryLimitValue
Description copied from interface:LoadingLimitsAdder
Get the temporary limit value corresponding to the given name.
This method is useful to fix permanent or temporary limits before calling
OperationalLimitsAdder.add()
.- Specified by:
getTemporaryLimitValue
in interfaceLoadingLimitsAdder<L extends LoadingLimits,
A extends LoadingLimitsAdder<L, A>> - Parameters:
name
- the temporary limit name- Returns:
- the corresponding temporary limit value, or
Double.NaN
if none is defined.
-
getTemporaryLimitAcceptableDuration
Description copied from interface:LoadingLimitsAdder
Get the temporary limit value corresponding to the given name.
This method is useful to fix permanent or temporary limits before calling
OperationalLimitsAdder.add()
.- Specified by:
getTemporaryLimitAcceptableDuration
in interfaceLoadingLimitsAdder<L extends LoadingLimits,
A extends LoadingLimitsAdder<L, A>> - Parameters:
name
- the temporary limit name- Returns:
- the corresponding temporary limit value, or
Integer.MAX_VALUE
if none is defined.
-
getLowestTemporaryLimitValue
public double getLowestTemporaryLimitValue()Description copied from interface:LoadingLimitsAdder
Get the lowest value of the temporary limits to create.
This method is useful to fix permanent or temporary limits before calling
OperationalLimitsAdder.add()
.- Specified by:
getLowestTemporaryLimitValue
in interfaceLoadingLimitsAdder<L extends LoadingLimits,
A extends LoadingLimitsAdder<L, A>> - Returns:
- the lowest temporary limit value, or
Double.NaN
if no temporary limits are defined.
-
getTemporaryLimitNames
Description copied from interface:LoadingLimitsAdder
Get the names of the temporary limits to create.
This method is useful to fix permanent or temporary limits before calling
OperationalLimitsAdder.add()
.- Specified by:
getTemporaryLimitNames
in interfaceLoadingLimitsAdder<L extends LoadingLimits,
A extends LoadingLimitsAdder<L, A>> - Returns:
- a collection containing the names of the defined temporary limits.
-
removeTemporaryLimit
Description copied from interface:LoadingLimitsAdder
Remove from the temporary limits to create the one(s) corresponding to the given name.
This method doesn't throw any
Exception
if no corresponding temporary limits are found.This method is useful to fix permanent or temporary limits before calling
OperationalLimitsAdder.add()
.- Specified by:
removeTemporaryLimit
in interfaceLoadingLimitsAdder<L extends LoadingLimits,
A extends LoadingLimitsAdder<L, A>> - Parameters:
name
- a temporary limit name
-
getOwnerId
Description copied from interface:LoadingLimitsAdder
Get the id of the network element on which the LoadingLimits should be added.
- Specified by:
getOwnerId
in interfaceLoadingLimitsAdder<L extends LoadingLimits,
A extends LoadingLimitsAdder<L, A>> - Returns:
- the id of the owner network element
-