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

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

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

Network.getDanglingLine介绍

[英]Get a dangling line.
[中]拿一根悬挂的绳子。

代码示例

代码示例来源:origin: com.powsybl/powsybl-cgmes-conversion

public OperationalLimitConversion(PropertyBag l, Conversion.Context context) {
  super("OperationalLimitSet", l, context);
  // Limit can associated to a Terminal or to an Equipment
  terminalId = l.getId("Terminal");
  if (terminalId != null) {
    terminal = context.terminalMapping().find(terminalId);
  }
  equipmentId = l.getId("Equipment");
  if (equipmentId != null) {
    // The equipment may be a Branch, a Dangling line, a Switch ...
    branch = context.network().getBranch(equipmentId);
    if (branch == null) {
      danglingLine = context.network().getDanglingLine(equipmentId);
      if (danglingLine == null) {
        aswitch = context.network().getSwitch(equipmentId);
      }
    }
  }
}

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

DanglingLine dl = network.getDanglingLine(ls.id);
if (dl == null) {
  throw new RuntimeException("Dangling line '" + ls.id + "' not found");

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

private Void readBranch(String[] tokens) {
  int num = Integer.parseInt(tokens[1]);
  int busNum = Integer.parseInt(tokens[2]);
  int busNum2 = Integer.parseInt(tokens[3]);
  double p1 = readDouble(tokens[4]);
  double p2 = readDouble(tokens[5]);
  double q1 = readDouble(tokens[6]);
  double q2 = readDouble(tokens[7]);
  String id = mapper.getId(AmplSubset.BRANCH, num);
  Branch br = network.getBranch(id);
  if (br != null) {
    br.getTerminal1().setP(p1).setQ(q1);
    br.getTerminal2().setP(p2).setQ(q2);
    busConnection(br.getTerminal1(), busNum);
    busConnection(br.getTerminal2(), busNum2);
    return null;
  }
  if (readThreeWindingsTransformerBranch(id, p1, q1, busNum)) {
    return null;
  }
  DanglingLine dl = network.getDanglingLine(id);
  if (dl != null) {
    dl.getTerminal().setP(p1).setQ(q1);
    busConnection(dl.getTerminal(), busNum);
  } else {
    throw new AmplException("Invalid branch id '" + id + "'");
  }
  return null;
}

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

private Void readLoad(String[] tokens) {
  int num = Integer.parseInt(tokens[1]);
  int busNum = Integer.parseInt(tokens[2]);
  double p = readDouble(tokens[3]);
  double q = readDouble(tokens[4]);
  double p0 = readDouble(tokens[5]);
  double q0 = readDouble(tokens[6]);
  String id = mapper.getId(AmplSubset.LOAD, num);
  Load l = network.getLoad(id);
  if (l != null) {
    l.setP0(p0).setQ0(q0);
    l.getTerminal().setP(p).setQ(q);
    busConnection(l.getTerminal(), busNum);
  } else {
    DanglingLine dl = network.getDanglingLine(id);
    if (dl != null) {
      dl.setP0(p0).setQ0(q0);
      dl.getTerminal().setP(p).setQ(q);
      busConnection(dl.getTerminal(), busNum);
    } else {
      throw new AmplException("Invalid load id '" + id + "'");
    }
  }
  return null;
}

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

DanglingLine dl = network.getDanglingLine(attrId.getEquipmentId());
if (dl != null) {
  entityType = 1;

代码示例来源:origin: com.powsybl/powsybl-cgmes-conformity

network.getDanglingLine("_a16b4a6c-70b1-4abf-9a9d-bd0fa47f9fe4")
    .setP0(-86.814383)
    .setQ0(4.958972);
network.getDanglingLine("_17086487-56ba-4979-b8de-064025a6b4da")
    .setP0(-89.462903)
    .setQ0(1.519011);
network.getDanglingLine("_78736387-5f60-4832-b3fe-d50daf81b0a6")
    .setP0(-16.452661)
    .setQ0(64.018020);
network.getDanglingLine("_b18cd1aa-7808-49b9-a7cf-605eaf07b006")
    .setP0(-31.579291)
    .setQ0(120.813763);
network.getDanglingLine("_ed0c5d75-4a54-43c8-b782-b20d7431630b")
    .setP0(-11.518775)
    .setQ0(67.377544);

相关文章