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

x33g5p2x  于2022-01-24 转载在 其他  
字(1.1k)|赞(0)|评价(0)|浏览(112)

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

Network.getShuntCompensator介绍

[英]Get a compensator shunt.
[中]做一个补偿分流。

代码示例

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

/**
 * @deprecated Use {@link #getShuntCompensator(String)} instead.
 */
@Deprecated
default ShuntCompensator getShunt(String id) {
  return getShuntCompensator(id);
}

代码示例来源:origin: com.powsybl/powsybl-ampl-converter

private Void readShunt(String[] tokens) {
  int num = Integer.parseInt(tokens[1]);
  int busNum = Integer.parseInt(tokens[2]);
  double q = readDouble(tokens[4]);
  int sections = Integer.parseInt(tokens[5]);
  String id = mapper.getId(AmplSubset.SHUNT, num);
  ShuntCompensator sc = network.getShuntCompensator(id);
  if (sc == null) {
    throw new AmplException("Invalid shunt compensator id '" + id + "'");
  }
  sc.setCurrentSectionCount(Math.max(0, Math.min(sc.getMaximumSectionCount(), sections)));
  Terminal t = sc.getTerminal();
  t.setQ(q);
  busConnection(t, busNum);
  return null;
}

相关文章