Interface LimitsComputer<P,L>
- All Known Implementing Classes:
AbstractLimitReductionsApplier
,AbstractLimitsComputerWithCache
,DefaultLimitReductionsApplier
,LimitsComputer.NoModificationsImpl
public interface LimitsComputer<P,L>
Interface for classes responsible for accessing limits of generic type
LimitsComputer
from a network element of generic type LimitsComputer
, and potentially creating a modified copy of them.- Author:
- Olivier Perrin <olivier.perrin at rte-france.com>
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic class
An implementation ofLimitsComputer
only retrieving the limits without applying modifications. -
Field Summary
Modifier and TypeFieldDescriptionstatic final LimitsComputer<Identifiable<?>,
LoadingLimits> An implementation ofLimitsComputer
only retrieving the limits of the network elements without applying modifications. -
Method Summary
Modifier and TypeMethodDescriptioncomputeLimits
(P processable, LimitType limitType, ThreeSides side, boolean monitoringOnly) Retrieve the limits ofprocessable
corresponding to the given limits type and side, then apply on them the modifications configured in the currentLimitsComputer
.
-
Field Details
-
NO_MODIFICATIONS
An implementation ofLimitsComputer
only retrieving the limits of the network elements without applying modifications.
-
-
Method Details
-
computeLimits
Optional<LimitsContainer<L>> computeLimits(P processable, LimitType limitType, ThreeSides side, boolean monitoringOnly) Retrieve the limits of
processable
corresponding to the given limits type and side, then apply on them the modifications configured in the currentLimitsComputer
.The result of this method contains both originals and altered limits.
- Parameters:
processable
- The network element for which the altered limits must be computedlimitType
- The type of the limits to processside
- The side ofprocessable
on which the limits should be retrievedmonitoringOnly
- 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 the original limits and the altered ones
-