Class LimitReduction.Builder

java.lang.Object
com.powsybl.security.limitreduction.LimitReduction.Builder
Enclosing class:
LimitReduction

public static class LimitReduction.Builder extends Object

Builder used to create a LimitReduction.

The default values for the LimitReduction are the following:

  • monitoringOnly: false. The limit reduction is applied for monitoring limit violations and conditions of operator strategies;
  • contingencyContext: ContingencyContext.all(). The limit reduction is used on pre-contingency state and after each contingency state.
  • networkElementCriteria: Collections.emptyList(). The limit reduction is applied on each network element (that holds a limit on this type).
  • limitDurationCriteria: Collections.emptyList(). The limit reduction is applied for all permanent and temporary limits.

  • Constructor Details

    • Builder

      protected Builder(LimitType limitType, double value)
  • Method Details

    • withMonitoringOnly

      public LimitReduction.Builder withMonitoringOnly(boolean monitoringOnly)

      Define if the limit reduction is applied only for limit violations report or also inside conditions of operator strategies.

      By default, the limit reduction is apply for both steps.

      Parameters:
      monitoringOnly - true if the limit reduction is applied for monitoring only, false otherwise.
      Returns:
      the current LimitReduction.Builder
    • withContingencyContext

      public LimitReduction.Builder withContingencyContext(ContingencyContext contingencyContext)

      Define in which contingency context the limit reduction is applied.

      By default, the limit reduction is used in pre-contingency state and after each contingency state.

      Parameters:
      contingencyContext - the contingency context of the limit reduction to be applied.
      Returns:
      the current LimitReduction.Builder
    • withNetworkElementCriteria

      public LimitReduction.Builder withNetworkElementCriteria(NetworkElementCriterion... networkElementCriteria)

      Define criteria on network elements.

      By default, the limit reduction is applied on each network element that holds a limit of the good type.

      This method is not cumulative and clean previous definitions.

      Parameters:
      networkElementCriteria - criteria on network elements on which the limit reduction is applied.
      Returns:
      the current LimitReduction.Builder
    • withNetworkElementCriteria

      public LimitReduction.Builder withNetworkElementCriteria(List<NetworkElementCriterion> networkElementCriteria)

      Define criteria on network elements.

      By default, the limit reduction is applied on each network element that holds a limit of the good type.

      This method is not cumulative and clean previous definitions.

      Parameters:
      networkElementCriteria - criteria on network elements on which the limit reduction is applied.
      Returns:
      the current LimitReduction.Builder
    • withLimitDurationCriteria

      public LimitReduction.Builder withLimitDurationCriteria(LimitDurationCriterion... limitDurationCriteria)

      Define criteria on permanent limit and/or on acceptable durations of temporary limits within a specific range.

      By default, the limit reduction is applied for all permanent and temporary limits of the good type.

      This method is not cumulative and clean previous definitions.

      Parameters:
      limitDurationCriteria - criteria to restrict the limit reduction to specific durations.
      Returns:
      the current LimitReduction.Builder
    • withLimitDurationCriteria

      public LimitReduction.Builder withLimitDurationCriteria(List<LimitDurationCriterion> limitDurationCriteria)

      Define criteria on permanent limit and/or on acceptable durations of temporary limits within a specific range.

      By default, the limit reduction is applied for all permanent and temporary limits of the good type.

      This method is not cumulative and clean previous definitions.

      Parameters:
      limitDurationCriteria - criteria to restrict the limit reduction to specific durations.
      Returns:
      the current LimitReduction.Builder
    • build

      public LimitReduction build()

      Build the LimitReduction with the defined parameters.

      Returns:
      a new LimitReduction