com.powsybl.iidm.network.Branch.getCurrentLimits()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(1.8k)|赞(0)|评价(0)|浏览(119)

本文整理了Java中com.powsybl.iidm.network.Branch.getCurrentLimits()方法的一些代码示例,展示了Branch.getCurrentLimits()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Branch.getCurrentLimits()方法的具体详情如下:
包路径:com.powsybl.iidm.network.Branch
类名称:Branch
方法名:getCurrentLimits

Branch.getCurrentLimits介绍

暂无

代码示例

代码示例来源:origin: com.powsybl/powsybl-iidm-api

public static boolean checkPermanentLimit(Branch branch, Branch.Side side, float limitReduction, double i) {
  CurrentLimits limits = branch.getCurrentLimits(side);
  return limits != null &&
      !Double.isNaN(limits.getPermanentLimit()) &&
      !Double.isNaN(i) &&
      (i >= limits.getPermanentLimit() * limitReduction);
}

代码示例来源:origin: com.powsybl/powsybl-iidm-api

public static Branch.Overload checkTemporaryLimits(Branch branch, Branch.Side side, float limitReduction, double i) {
  Objects.requireNonNull(branch);
  Objects.requireNonNull(side);
  CurrentLimits limits = branch.getCurrentLimits(side);
  if (limits != null && !Double.isNaN(limits.getPermanentLimit()) && !Double.isNaN(i)) {
    String previousLimitName = null;
    double previousLimit = limits.getPermanentLimit();
    for (CurrentLimits.TemporaryLimit tl : limits.getTemporaryLimits()) { // iterate in ascending order
      if (i >= previousLimit * limitReduction && i < tl.getValue() * limitReduction) {
        return new OverloadImpl(tl, previousLimitName, previousLimit);
      }
      previousLimitName = tl.getName();
      previousLimit = tl.getValue();
    }
  }
  return null;
}

代码示例来源:origin: com.powsybl/powsybl-security-analysis-api

private void checkPermanentLimit(Branch branch, Branch.Side side, double value, Consumer<LimitViolation> consumer) {
  if (LimitViolationUtils.checkPermanentLimit(branch, side, limitReduction, value)) {
    consumer.accept(new LimitViolation(branch.getId(),
        branch.getName(),
        LimitViolationType.CURRENT,
        null,
        Integer.MAX_VALUE,
        branch.getCurrentLimits(side).getPermanentLimit(),
        limitReduction,
        value,
        side));
  }
}

相关文章