Class SimpleLimitsComputer
- All Implemented Interfaces:
LimitsComputer<Identifiable<?>,
LoadingLimits>
A limits computer that takes a single limit reduction value for all the identifiers, and applies it on each permanent and temporary limit, for pre- and post-contingency states.
Computed values are stored in cache to avoid recomputing them.
- Author:
- Etienne Lesot <etienne.lesot at rte-france.com>
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.powsybl.iidm.network.limitmodification.LimitsComputer
LimitsComputer.NoModificationsImpl
-
Field Summary
Fields inherited from interface com.powsybl.iidm.network.limitmodification.LimitsComputer
NO_MODIFICATIONS
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected Optional<LimitsContainer<LoadingLimits>>
computeUncachedLimits
(Identifiable<?> identifiable, LimitType limitType, ThreeSides side, boolean monitoringOnly) Retrieve the limits onprocessable
then apply modifications on them.Methods inherited from class com.powsybl.iidm.network.limitmodification.AbstractLimitsComputerWithCache
clearCache, computeLimits, putInCache
-
Constructor Details
-
SimpleLimitsComputer
public SimpleLimitsComputer(double limitReduction)
-
-
Method Details
-
computeUncachedLimits
protected Optional<LimitsContainer<LoadingLimits>> computeUncachedLimits(Identifiable<?> identifiable, LimitType limitType, ThreeSides side, boolean monitoringOnly) Description copied from class:AbstractLimitsComputerWithCache
Retrieve the limits on
processable
then apply modifications on them.If no modifications applies on the resulting
LimitsContainer
must contains the same object for the original and the reduced limits.This function is called when the corresponding limits were not found in the cache.
This function is responsible for the addition of the computed limit in the cache (via the
AbstractLimitsComputerWithCache.putInCache(P, com.powsybl.iidm.network.LimitType, com.powsybl.iidm.network.ThreeSides, boolean, com.powsybl.iidm.network.limitmodification.result.LimitsContainer<L>)
method).- Specified by:
computeUncachedLimits
in classAbstractLimitsComputerWithCache<Identifiable<?>,
LoadingLimits> - Parameters:
identifiable
- the network element for which the limits must be retrieved and modifiedlimitType
- the type of limits to processside
- the side of the network element where to retrieve the original limitsmonitoringOnly
- Iftrue
, compute the limits to use for a monitoring only use case. Iffalse
, compute the limits to use for a monitoring + action use case.- Returns:
- an object containing both the original and the modified limits.
-