Package com.powsybl.security
Interface LimitViolationDetector
- All Known Implementing Classes:
AbstractContingencyBlindDetector
,AbstractLimitViolationDetector
,DefaultLimitViolationDetector
public interface LimitViolationDetector
Being given some physical values (currents, voltages, ...) for network elements,
is in charge of deciding whether there are limit violations or not.
- Author:
- Sylvain Leclerc <sylvain.leclerc at rte-france.com>
-
Method Summary
Modifier and TypeMethodDescriptionvoid
checkActivePower
(Branch branch, Branch.Side side, double value, Consumer<LimitViolation> consumer) Checks whether the specified active power value on the specified side of the specifiedBranch
should be considered as aLimitViolation
or not.default void
checkAll
(Contingency contingency, Network network, Consumer<LimitViolation> consumer) Checks whether the current and voltage values on all equipments of the specifiedNetwork
should be considered asLimitViolation
s.void
checkAll
(Network network, Consumer<LimitViolation> consumer) Checks whether the current and voltage values on all equipments of the specifiedNetwork
should be considered asLimitViolation
s.void
checkAllDc
(Network network, double dcPowerFactor, Consumer<LimitViolation> consumer) Checks whether the current and voltage values on all equipments of the specifiedNetwork
should be considered asLimitViolation
s.void
checkApparentPower
(Branch branch, Branch.Side side, double value, Consumer<LimitViolation> consumer) Checks whether the specified apparent power value on the specified side of the specifiedBranch
should be considered as aLimitViolation
or not.default void
checkCurrent
(Contingency contingency, Branch branch, Branch.Side side, double currentValue, Consumer<LimitViolation> consumer) Checks whether the specified current value on the specified side of the specifiedBranch
should be considered as aLimitViolation
or not.default void
checkCurrent
(Contingency contingency, Branch branch, Branch.Side side, Consumer<LimitViolation> consumer) Checks whether the current value on the specified side of the specifiedBranch
should be considered as aLimitViolation
or not.default void
checkCurrent
(Contingency contingency, Branch branch, Consumer<LimitViolation> consumer) Checks whether the current value on both sides of the specifiedBranch
should be considered asLimitViolation
(s).void
checkCurrent
(Branch branch, Branch.Side side, double currentValue, Consumer<LimitViolation> consumer) Checks whether the specified current value on the specified side of the specifiedBranch
should be considered as aLimitViolation
or not.void
checkCurrent
(Branch branch, Branch.Side side, Consumer<LimitViolation> consumer) Checks whether the current value on the specified side of the specifiedBranch
should be considered as aLimitViolation
or not.void
checkCurrent
(Branch branch, Consumer<LimitViolation> consumer) Checks whether the current value on both sides of the specifiedBranch
should be considered asLimitViolation
(s).void
checkCurrentDc
(Branch branch, double dcPowerFactor, Consumer<LimitViolation> consumer) Checks whether the current value on both sides of the specifiedBranch
should be considered asLimitViolation
(s).void
checkCurrentDc
(Branch branch, Branch.Side side, double dcPowerFactor, Consumer<LimitViolation> consumer) Checks whether the current value on the specified side of the specifiedBranch
should be considered as aLimitViolation
or not.default void
checkPermanentLimit
(Branch<?> branch, Branch.Side side, float limitReduction, double value, Consumer<LimitViolation> consumer, LimitType type) Generic implementation for permanent limit checksdefault void
checkTemporary
(Branch<?> branch, Branch.Side side, float limitReduction, double value, Consumer<LimitViolation> consumer, LimitType type) Generic implementation for temporary limit checksdefault void
checkVoltage
(Contingency contingency, Bus bus, double voltageValue, Consumer<LimitViolation> consumer) Checks whether the specified voltage value on the specifiedBus
should be considered as aLimitViolation
or not.default void
checkVoltage
(Contingency contingency, Bus bus, Consumer<LimitViolation> consumer) Checks whether the voltage value on the specifiedBus
should be considered as aLimitViolation
or not.default void
checkVoltage
(Contingency contingency, VoltageLevel voltageLevel, Consumer<LimitViolation> consumer) Checks whether the voltage value on the specifiedVoltageLevel
should be considered as aLimitViolation
or not.void
checkVoltage
(Bus bus, double voltageValue, Consumer<LimitViolation> consumer) Checks whether the specified voltage value on the specifiedBus
should be considered as aLimitViolation
or not.void
checkVoltage
(Bus bus, Consumer<LimitViolation> consumer) Checks whether the voltage value on the specifiedBus
should be considered as aLimitViolation
or not.void
checkVoltage
(VoltageLevel voltageLevel, Consumer<LimitViolation> consumer) Checks whether the voltage value on the specifiedVoltageLevel
should be considered as aLimitViolation
or not.default void
checkVoltageAngle
(Contingency contingency, VoltageAngleLimit voltageAngleLimit, double voltageAngleDifference, Consumer<LimitViolation> consumer) Checks whether the specified angle difference between the TerminalRefs on the specifiedVoltageAngleLimit
should be considered as aLimitViolation
or not.default void
checkVoltageAngle
(Contingency contingency, VoltageAngleLimit voltageAngleLimit, Consumer<LimitViolation> consumer) Checks whether the angle difference value between the TerminalRefs on the specifiedVoltageAngleLimit
should be considered as aLimitViolation
or not.void
checkVoltageAngle
(VoltageAngleLimit voltageAngleLimit, double voltageAngleDifference, Consumer<LimitViolation> consumer) Checks whether the specified voltage value on the specifiedBus
should be considered as aLimitViolation
or not.void
checkVoltageAngle
(VoltageAngleLimit voltageAngleLimit, Consumer<LimitViolation> consumer) Checks whether the voltage angle difference between the TerminalRefs defined on the specifiedVoltageAngleLimit
should be considered as aLimitViolation
or not.default LimitViolationType
Helper function to convert a limit type to a limit violation type
-
Method Details
-
checkCurrent
default void checkCurrent(Contingency contingency, Branch branch, Branch.Side side, double currentValue, Consumer<LimitViolation> consumer) Checks whether the specified current value on the specified side of the specifiedBranch
should be considered as aLimitViolation
or not. In case it should, feeds the consumer with it.- Parameters:
contingency
- The contingency for which current must be checked,null
for N situation.branch
- The branch on which the current must be checked.side
- The side of the branch on which the current must be checked.currentValue
- The current value to be checked, in A.consumer
- Will be fed with possibly created limit violations.
-
checkCurrent
default void checkCurrent(Contingency contingency, Branch branch, Branch.Side side, Consumer<LimitViolation> consumer) Checks whether the current value on the specified side of the specifiedBranch
should be considered as aLimitViolation
or not. In case it should, feeds the consumer with it.- Parameters:
contingency
- The contingency for which current must be checked,null
for N situation.branch
- The branch on which the current must be checked.side
- The side of the branch on which the current must be checked.consumer
- Will be fed with possibly created limit violations.
-
checkVoltage
default void checkVoltage(Contingency contingency, Bus bus, double voltageValue, Consumer<LimitViolation> consumer) Checks whether the specified voltage value on the specifiedBus
should be considered as aLimitViolation
or not. In case it should, returns the corresponding limit violation.- Parameters:
contingency
- The contingency for which current must be checked,null
for N situation.bus
- The bus on which the voltage must be checked.voltageValue
- The voltage value to be checked, in V.consumer
- Will be fed with possibly created limit violations.
-
checkVoltage
Checks whether the voltage value on the specifiedBus
should be considered as aLimitViolation
or not. In case it should, feeds the consumer with it.- Parameters:
contingency
- The contingency for which current must be checked,null
for N situation.bus
- The bus on which the voltage must be checked.consumer
- Will be fed with possibly created limit violations.
-
checkVoltage
default void checkVoltage(Contingency contingency, VoltageLevel voltageLevel, Consumer<LimitViolation> consumer) Checks whether the voltage value on the specifiedVoltageLevel
should be considered as aLimitViolation
or not. In case it should, feeds the consumer with it.- Parameters:
contingency
- The contingency for which current must be checked,null
for N situation.voltageLevel
- The voltage level on which the voltage must be checked.consumer
- Will be fed with possibly created limit violations.
-
checkVoltageAngle
default void checkVoltageAngle(Contingency contingency, VoltageAngleLimit voltageAngleLimit, double voltageAngleDifference, Consumer<LimitViolation> consumer) Checks whether the specified angle difference between the TerminalRefs on the specifiedVoltageAngleLimit
should be considered as aLimitViolation
or not. In case it should, returns the corresponding limit violation.- Parameters:
contingency
- The contingency for which angle difference must be checked,null
for N situation.voltageAngleLimit
- The voltageAngleLimit defining the TerminalRefs on which the angle difference must be checked.voltageAngleDifference
- The angle difference value to be checked.consumer
- Will be fed with possibly created limit violations.
-
checkVoltageAngle
default void checkVoltageAngle(Contingency contingency, VoltageAngleLimit voltageAngleLimit, Consumer<LimitViolation> consumer) Checks whether the angle difference value between the TerminalRefs on the specifiedVoltageAngleLimit
should be considered as aLimitViolation
or not. In case it should, feeds the consumer with it.- Parameters:
contingency
- The contingency for which angle difference must be checked,null
for N situation.voltageAngleLimit
- The voltageAngleLimit defining the TerminalRefs on which the angle difference must be checked.consumer
- Will be fed with possibly created limit violations.
-
checkCurrent
default void checkCurrent(Contingency contingency, Branch branch, Consumer<LimitViolation> consumer) Checks whether the current value on both sides of the specifiedBranch
should be considered asLimitViolation
(s). In case it should, feeds the consumer with it.- Parameters:
contingency
- The contingency for which current must be checked,null
for N situation.branch
- The branch on which the current must be checked.consumer
- Will be fed with possibly created limit violations.
-
checkAll
Checks whether the current and voltage values on all equipments of the specifiedNetwork
should be considered asLimitViolation
s. In case it should, feeds the consumer with it.- Parameters:
contingency
- The contingency for which current must be checked,null
for N situation.network
- The network on which physical values must be checked.consumer
- Will be fed with possibly created limit violations.
-
checkCurrent
void checkCurrent(Branch branch, Branch.Side side, double currentValue, Consumer<LimitViolation> consumer) Checks whether the specified current value on the specified side of the specifiedBranch
should be considered as aLimitViolation
or not. In case it should, feeds the consumer with it.- Parameters:
branch
- The branch on which the current must be checked.side
- The side of the branch on which the current must be checked.currentValue
- The current value to be checked, in A.consumer
- Will be fed with possibly created limit violations.
-
checkActivePower
void checkActivePower(Branch branch, Branch.Side side, double value, Consumer<LimitViolation> consumer) Checks whether the specified active power value on the specified side of the specifiedBranch
should be considered as aLimitViolation
or not. In case it should, feeds the consumer with it.- Parameters:
branch
- The branch on which the current must be checked.side
- The side of the branch on which the current must be checked.value
- The active power value to be checked, in A.consumer
- Will be fed with possibly created limit violations.
-
checkApparentPower
void checkApparentPower(Branch branch, Branch.Side side, double value, Consumer<LimitViolation> consumer) Checks whether the specified apparent power value on the specified side of the specifiedBranch
should be considered as aLimitViolation
or not. In case it should, feeds the consumer with it.- Parameters:
branch
- The branch on which the current must be checked.side
- The side of the branch on which the current must be checked.value
- The apparent power value to be checked, in A.consumer
- Will be fed with possibly created limit violations.
-
checkCurrent
Checks whether the current value on the specified side of the specifiedBranch
should be considered as aLimitViolation
or not. In case it should, feeds the consumer with it.- Parameters:
branch
- The branch on which the current must be checked.side
- The side of the branch on which the current must be checked.consumer
- Will be fed with possibly created limit violations.
-
checkCurrentDc
void checkCurrentDc(Branch branch, Branch.Side side, double dcPowerFactor, Consumer<LimitViolation> consumer) Checks whether the current value on the specified side of the specifiedBranch
should be considered as aLimitViolation
or not. In case it should, feeds the consumer with it. In this DC power flow mode, the current is computed using the DC power factor if necessary.- Parameters:
branch
- The branch on which the current must be checked.side
- The side of the branch on which the current must be checked.dcPowerFactor
- The DC power factor used to convert the active power into current.consumer
- Will be fed with possibly created limit violations.
-
checkVoltage
Checks whether the specified voltage value on the specifiedBus
should be considered as aLimitViolation
or not. In case it should, returns the corresponding limit violation.- Parameters:
bus
- The bus on which the voltage must be checked.voltageValue
- The voltage value to be checked, in V.consumer
- Will be fed with possibly created limit violations.
-
checkVoltage
Checks whether the voltage value on the specifiedBus
should be considered as aLimitViolation
or not. In case it should, feeds the consumer with it.- Parameters:
bus
- The bus on which the voltage must be checked.consumer
- Will be fed with possibly created limit violations.
-
checkVoltage
Checks whether the voltage value on the specifiedVoltageLevel
should be considered as aLimitViolation
or not. In case it should, feeds the consumer with it.- Parameters:
voltageLevel
- The voltage level on which the voltage must be checked.consumer
- Will be fed with possibly created limit violations.
-
checkVoltageAngle
void checkVoltageAngle(VoltageAngleLimit voltageAngleLimit, double voltageAngleDifference, Consumer<LimitViolation> consumer) Checks whether the specified voltage value on the specifiedBus
should be considered as aLimitViolation
or not. In case it should, returns the corresponding limit violation.- Parameters:
voltageAngleLimit
- The voltageAngleLimit defining TerminalRefs on which the angle difference must be checked.voltageAngleDifference
- The voltage angle difference to be checked, in degrees.consumer
- Will be fed with possibly created limit violations.
-
checkVoltageAngle
Checks whether the voltage angle difference between the TerminalRefs defined on the specifiedVoltageAngleLimit
should be considered as aLimitViolation
or not. In case it should, feeds the consumer with it.- Parameters:
voltageAngleLimit
- The voltageAngleLimit defining the TerminalRefs on which the angle difference must be checked.consumer
- Will be fed with possibly created limit violations.
-
checkCurrent
Checks whether the current value on both sides of the specifiedBranch
should be considered asLimitViolation
(s). In case it should, feeds the consumer with it.- Parameters:
branch
- The branch on which the current must be checked.consumer
- Will be fed with possibly created limit violations.
-
checkCurrentDc
Checks whether the current value on both sides of the specifiedBranch
should be considered asLimitViolation
(s). In case it should, feeds the consumer with it. In this DC power flow mode, the current is computed using the DC power factor if necessary.- Parameters:
branch
- The branch on which the current must be checked.dcPowerFactor
- The DC power factor used to convert the active power into current.consumer
- Will be fed with possibly created limit violations.
-
checkAll
Checks whether the current and voltage values on all equipments of the specifiedNetwork
should be considered asLimitViolation
s. In case it should, feeds the consumer with it.- Parameters:
network
- The network on which physical values must be checked.consumer
- Will be fed with possibly created limit violations.
-
checkAllDc
Checks whether the current and voltage values on all equipments of the specifiedNetwork
should be considered asLimitViolation
s. In case it should, feeds the consumer with it. In this DC power flow mode, the current is computed using the DC power factor if necessary.- Parameters:
network
- The network on which physical values must be checked.dcPowerFactor
- The DC power factor used to convert the active power into current.consumer
- Will be fed with possibly created limit violations.
-
toLimitViolationType
Helper function to convert a limit type to a limit violation type- Parameters:
type
- The limit type to convert.- Returns:
- The matching LimitViolationTYpe
-
checkPermanentLimit
default void checkPermanentLimit(Branch<?> branch, Branch.Side side, float limitReduction, double value, Consumer<LimitViolation> consumer, LimitType type) Generic implementation for permanent limit checks -
checkTemporary
default void checkTemporary(Branch<?> branch, Branch.Side side, float limitReduction, double value, Consumer<LimitViolation> consumer, LimitType type) Generic implementation for temporary limit checks
-