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

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

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

Terminal.disconnect介绍

[英]Disconnect the terminal.

Depends on the working variant.
[中]断开端子。
取决于工作变量。

代码示例

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

private void busConnection(Terminal t, int busNum) {
  if (busNum == -1) {
    t.disconnect();
  } else {
    String busId = mapper.getId(AmplSubset.BUS, busNum);
    Bus connectable = AmplUtil.getConnectableBus(t);
    if (connectable != null && connectable.getId().equals(busId)) {
      t.connect();
    }
  }
}

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

@Override
  public void modify(Network network, ComputationManager computationManager) {
    network.getLine("NHV1_NHV2_2").getTerminal1().disconnect();
    network.getLine("NHV1_NHV2_2").getTerminal2().disconnect();
    network.getLine("NHV1_NHV2_1").getTerminal2().setP(600.0);
  }
});

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

private boolean removeSwitchandBus(VoltageLevel vl, Switch s, Bus toRemove, Bus toKeep) {
  List<Terminal> terminals = getTerminals(toRemove);
  if (terminals.size() <= 1) {
    terminals.forEach(t -> {
      boolean reconnect = false;
      if (t.isConnected()) {
        t.disconnect();
        reconnect = true;
      }
      t.getBusBreakerView().setConnectableBus(toKeep.getId());
      if (!s.isOpen() && reconnect) {
        t.connect();
      }
    });
    vl.getBusBreakerView().removeSwitch(s.getId());
    vl.getBusBreakerView().removeBus(toRemove.getId());
    return true;
  }
  return false;
}

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

throw new RuntimeException("Equipment " + eq + "not found in the history");
t.disconnect();
t.getBusBreakerView().setConnectableBus(newBusId);
t.connect();

相关文章