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

x33g5p2x  于2022-01-30 转载在 其他  
字(4.8k)|赞(0)|评价(0)|浏览(123)

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

Terminal.getI介绍

[英]Get the current in A at the terminal.

Depends on the working variant.
[中]在终端获取A中的电流。
取决于工作变量。

代码示例

代码示例来源:origin: com.powsybl/powsybl-action-util

private static double getI(TwoWindingsTransformer phaseShifter) {
  return phaseShifter.getTerminal1().getI();
}

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

/**
 * This implementation takes the current value to be checked from the Network.
 */
@Override
public void checkCurrent(Branch branch, Branch.Side side, Consumer<LimitViolation> consumer) {
  checkCurrent(branch, side, branch.getTerminal(side).getI(), consumer);
}

代码示例来源:origin: itesla/ipst

private static void addBranchSideData(LinkedHashMap<String, Double> branchesData, String branchId, Terminal terminal, double currentLimit) {
  branchesData.put(getAttributeKey(branchId, terminal.getVoltageLevel().getId(), HistoDbAttr.I.name()), terminal.getI());
  branchesData.put(getAttributeKey(branchId, terminal.getVoltageLevel().getId(), HistoDbAttr.P.name()), terminal.getP());
  branchesData.put(getAttributeKey(branchId, terminal.getVoltageLevel().getId(), "IMAX"), currentLimit);
}

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

@Override
public void checkCurrent(Branch branch, Branch.Side side, double value, Consumer<LimitViolation> consumer) {
  Branch.Overload overload = LimitViolationUtils.checkTemporaryLimits(branch, side, limitReduction, value);
  if (currentLimitTypes.contains(Security.CurrentLimitType.TATL) && (overload != null)) {
    consumer.accept(new LimitViolation(branch.getId(),
        branch.getName(),
        LimitViolationType.CURRENT,
        overload.getPreviousLimitName(),
        overload.getTemporaryLimit().getAcceptableDuration(),
        overload.getPreviousLimit(),
        limitReduction,
        branch.getTerminal(side).getI(),
        side));
  } else if (currentLimitTypes.contains(Security.CurrentLimitType.PATL)) {
    checkPermanentLimit(branch, side, value, consumer);
  }
}

代码示例来源:origin: itesla/ipst

private void update(Terminal t) {
  if (t.getBusView().getBus() != null) {
    p = t.getP();
    q = t.getQ();
    v = t.getBusView().getBus().getV();
    i = t.getI();
  }
}

代码示例来源:origin: itesla/ipst

if (branch != null) {
  double newLimit = getNewUpperLimit(violation, margin);
  if (branch.getTerminal1().getI() == violation.getValue()) {
    LOGGER.debug("State {}: changing current limit 1 of branch {}: {} -> {}",
        stateId,
      network.getStateManager().setWorkingState(stateId);
  } else if (branch.getTerminal2().getI() == violation.getValue()) {
    LOGGER.debug("State {}: changing current limit 2 of branch {}: {} -> {}",
        stateId,

代码示例来源:origin: itesla/ipst

private static void extractLinesData(Network network, NetworkData networkData) {
  for (Line line : network.getLines()) {
    if (line.getTerminal1().getVoltageLevel().getNominalV() >= 110) {
      networkData.addLineData(new LineData(line.getId(),
                         (line.getTerminal1().getBusBreakerView().getBus() != null)
                           ? line.getTerminal1().getBusBreakerView().getBus().getId()
                           : line.getTerminal1().getBusBreakerView().getConnectableBus().getId(),
                         (line.getTerminal2().getBusBreakerView().getBus() != null)
                           ? line.getTerminal2().getBusBreakerView().getBus().getId()
                           : line.getTerminal2().getBusBreakerView().getConnectableBus().getId(),
                         line.getTerminal1().getI(),
                         line.getTerminal2().getI(),
                         (line.getCurrentLimits1() != null) ? line.getCurrentLimits1().getPermanentLimit() : Float.NaN,
                         (line.getCurrentLimits2() != null) ? line.getCurrentLimits2().getPermanentLimit() : Float.NaN)
      );
    }
  }
}

代码示例来源:origin: com.powsybl/powsybl-action-util

LoadFlow loadFlow = loadFlowFactory.create(network, computationManager, 0);
runLoadFlow(loadFlow, tmpStateId);
if (phaseShifter.getTerminal1().getI() >= phaseShifter.getCurrentLimits1().getPermanentLimit()) {
  throw new PowsyblException("Phase shifter already overloaded");

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

@Override
  public void onPostContingencyResult(RunningContext context, PostContingencyResult postContingencyResult) {
    String workingStateId = context.getNetwork().getVariantManager().getWorkingVariantId();

    for (LimitViolation limitViolation : postContingencyResult.getLimitViolationsResult().getLimitViolations()) {
      if (limitViolation.getLimitType() == LimitViolationType.CURRENT) {
        Branch branch = context.getNetwork().getBranch(limitViolation.getSubjectId());

        context.getNetwork().getVariantManager().setWorkingVariant(context.getInitialStateId());
        limitViolation.addExtension(CurrentExtension.class, new CurrentExtension(branch.getTerminal(limitViolation.getSide()).getI()));
        double preContingencyValue = branch.getTerminal(limitViolation.getSide()).getP();

        context.getNetwork().getVariantManager().setWorkingVariant(workingStateId);
        double postContingencyValue = branch.getTerminal(limitViolation.getSide()).getP();

        limitViolation.addExtension(ActivePowerExtension.class, new ActivePowerExtension(preContingencyValue, postContingencyValue));
      }
    }
  }
}

相关文章