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

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

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

Network.getHvdcLines介绍

[英]Get all HVDC lines.
[中]获取所有高压直流输电线路。

代码示例

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

private HashMap<String, HvdcLine> getHvdcLinesMap() {
  HashMap<String, HvdcLine> lineMap = new HashMap<>();
  network.getHvdcLines().forEach(line -> {
    if (line.getConverterStation1() != null) {
      lineMap.put(line.getConverterStation1().getId(), line);
    }
    if (line.getConverterStation2() != null) {
      lineMap.put(line.getConverterStation2().getId(), line);
    }
  });
  return lineMap;
}

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

for (HvdcLine hvdcLine : Identifiables.sort(network.getHvdcLines())) {

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

for (HvdcLine l : n.getHvdcLines()) {
  if (!filter.test(l.getConverterStation1()) || !filter.test(l.getConverterStation2())) {
    continue;

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

private void createACDCVscConverters(EsgNetwork esgNetwork) {
  //creates 2 DC nodes, for each hvdc line (one node per converter station)
  for (HvdcLine hvdcLine : Identifiables.sort(network.getHvdcLines())) {
    // skip lines with converter stations not in the main connected component
    if (config.isExportMainCCOnly() && (!EchUtil.isInMainCc(hvdcLine.getConverterStation1(), config.isNoSwitch()) || !EchUtil.isInMainCc(hvdcLine.getConverterStation2(), config.isNoSwitch()))) {
      LOGGER.warn("skipped HVDC line {}: at least one converter station is not in main component", hvdcLine.getId());
      continue;
    }
    HvdcConverterStation convStation1 = hvdcLine.getConverterStation1();
    HvdcConverterStation convStation2 = hvdcLine.getConverterStation2();
    //create two dc nodes, one for each conv. station
    Esg8charName hvdcNodeName1 = new Esg8charName(addToDictionary("DC_" + convStation1.getId(), dictionary, EurostagNamingStrategy.NameType.NODE));
    Esg8charName hvdcNodeName2 = new Esg8charName(addToDictionary("DC_" + convStation2.getId(), dictionary, EurostagNamingStrategy.NameType.NODE));
    double dcVoltage = EchUtil.getHvdcLineDcVoltage(hvdcLine);
    esgNetwork.addDCNode(new EsgDCNode(new Esg2charName("DC"), hvdcNodeName1, dcVoltage, 1));
    esgNetwork.addDCNode(new EsgDCNode(new Esg2charName("DC"), hvdcNodeName2, dcVoltage, 1));
    //create a dc link, representing the hvdc line
    //Eurostag model requires a resistance of 1 ohm (not hvdcLine.getR())
    float r = 1.0f;
    esgNetwork.addDCLink(new EsgDCLink(hvdcNodeName1, hvdcNodeName2, '1', r, EsgDCLink.LinkStatus.ON));
    //create the two converter stations
    EsgACDCVscConverter esgConv1 = createACDCVscConverter(network.getVscConverterStation(convStation1.getId()), hvdcLine, hvdcNodeName1);
    EsgACDCVscConverter esgConv2 = createACDCVscConverter(network.getVscConverterStation(convStation2.getId()), hvdcLine, hvdcNodeName2);
    esgNetwork.addACDCVscConverter(esgConv1);
    esgNetwork.addACDCVscConverter(esgConv2);
    //Create one load on the node to which converters stations are connected
    esgNetwork.addLoad(createConverterStationAdditionalLoad(hvdcLine, convStation1));
    esgNetwork.addLoad(createConverterStationAdditionalLoad(hvdcLine, convStation2));
  }
}

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

new Column("id"),
     new Column(DESCRIPTION))) {
for (HvdcLine hvdcLine : network.getHvdcLines()) {
  String id = hvdcLine.getId();
  int num = mapper.getInt(AmplSubset.HVDC_LINE, id);

相关文章