Class LimitViolation

  • All Implemented Interfaces:
    Extendable<LimitViolation>

    public class LimitViolation
    extends AbstractExtendable<LimitViolation>
    A generic representation of a violation of a network equipment security limit. For example, it may represent a current overload on a line.
    Author:
    Geoffroy Jamgotchian
    • Constructor Detail

      • LimitViolation

        public LimitViolation​(String subjectId,
                              @Nullable
                              String subjectName,
                              LimitViolationType limitType,
                              @Nullable
                              String limitName,
                              int acceptableDuration,
                              double limit,
                              float limitReduction,
                              double value,
                              @Nullable
                              Branch.Side side)
        Create a new LimitViolation.

        According to the violation type, all parameters may not be mandatory. See constructor overloads for particular types.

        Parameters:
        subjectId - The identifier of the network equipment on which the violation occurred.
        subjectName - An optional name of the network equipment on which the violation occurred.
        limitType - The type of limit which has been violated.
        limitName - An optional name for the limit which has been violated.
        acceptableDuration - The acceptable duration, in seconds, associated to the current violation value. Only relevant for current limits.
        limit - The value of the limit which has been violated.
        limitReduction - The limit reduction factor used for violation detection.
        value - The actual value of the physical value which triggered the detection of a violation.
        side - The side of the equipment where the violation occurred. May be null for non-branch equipments.
      • LimitViolation

        public LimitViolation​(String subjectId,
                              LimitViolationType limitType,
                              String limitName,
                              int acceptableDuration,
                              double limit,
                              float limitReduction,
                              double value,
                              Branch.Side side)
        Create a new LimitViolation.

        According to the violation type, all parameters may not be mandatory. See constructor overloads for particular types.

        Parameters:
        subjectId - The identifier of the network equipment on which the violation occurred.
        limitType - The type of limit which has been violated.
        limitName - An optional name for the limit which has been violated.
        acceptableDuration - The acceptable duration, in seconds, associated to the current violation value. Only relevant for current limits.
        limit - The value of the limit which has been violated.
        limitReduction - The limit reduction factor used for violation detection.
        value - The actual value of the physical value which triggered the detection of a violation.
        side - The side of the equipment where the violation occurred. May be null for non-branch equipments.
      • LimitViolation

        public LimitViolation​(String subjectId,
                              String subjectName,
                              LimitViolationType limitType,
                              double limit,
                              float limitReduction,
                              double value)
        Create a new LimitViolation, for types other than current limits.

        According to the violation type, all parameters may not be mandatory. See constructor overloads for particular types.

        Parameters:
        subjectId - The identifier of the network equipment on which the violation occurred.
        subjectName - An optional name of the network equipment on which the violation occurred.
        limitType - The type of limit which has been violated.
        limit - The value of the limit which has been violated.
        limitReduction - The limit reduction factor used for violation detection.
        value - The actual value of the physical value which triggered the detection of a violation.
      • LimitViolation

        public LimitViolation​(String subjectId,
                              LimitViolationType limitType,
                              double limit,
                              float limitReduction,
                              double value)
        Create a new LimitViolation, for types other than current limits.

        According to the violation type, all parameters may not be mandatory. See constructor overloads for particular types.

        Parameters:
        subjectId - The identifier of the network equipment on which the violation occurred.
        limitType - The type of limit which has been violated.
        limit - The value of the limit which has been violated.
        limitReduction - The limit reduction factor used for violation detection.
        value - The actual value of the physical value which triggered the detection of a violation.
    • Method Detail

      • getSubjectId

        public String getSubjectId()
        The identifier of the network equipment on which the violation occurred.
        Returns:
        the identifier of the network equipment on which the violation occurred.
      • getSubjectName

        @Nullable
        public String getSubjectName()
        The name of the network equipment on which the violation occurred. May be null.
        Returns:
        the name of the network equipment on which the violation occurred.
      • getLimitType

        public LimitViolationType getLimitType()
        The type of limit which has been violated.
        Returns:
        the type of limit which has been violated.
      • getLimit

        public double getLimit()
        The value of the limit which has been violated.
        Returns:
        the value of the limit which has been violated.
      • getLimitName

        @Nullable
        public String getLimitName()
        The name of the limit which has been violated. May be null.
        Returns:
        the value of the limit which has been violated. May be null.
      • getAcceptableDuration

        public int getAcceptableDuration()
        The acceptable duration, in seconds, associated to the current violation value. Only relevant for current limits.
        Returns:
        the acceptable duration, in seconds, associated to the current violation value.
      • getLimitReduction

        public float getLimitReduction()
        The limit reduction factor used for violation detection. For example when monitoring values above 95% of a given limit, this will return 0.95f
        Returns:
        the limit reduction factor used for violation detection.
      • getValue

        public double getValue()
        The actual value of the physical value which triggered the detection of a violation.
        Returns:
        the actual value of the physical value which triggered the detection of a violation.
      • getSide

        @Nullable
        public Branch.Side getSide()
        The side of the equipment where the violation occurred. Will be null for equipments other than branches.
        Returns:
        the side of the equipment where the violation occurred. Will be null for equipments other than branches.