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

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

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

Network.getHvdcLineStream介绍

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

代码示例

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

protected HvdcLine getHvdcLineFromConverterStation(VscConverterStation vscStation) {
  return  network.getHvdcLineStream()
      .filter(hLine -> hLine.getConverterStation1().getId().equals(vscStation.getId()) || hLine.getConverterStation2().getId().equals(vscStation.getId()))
      .findFirst()
      .orElse(null);
}

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

List<HvdcLine> hvdcLines = network.getHvdcLineStream()
    .filter(h -> !test(h))
    .collect(Collectors.toList());

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

public static void fillMapper(StringToIntMapper<AmplSubset> mapper, Network network) {
  // Voltage levels
  network.getVoltageLevelStream().forEach(vl -> mapper.newInt(AmplSubset.VOLTAGE_LEVEL, vl.getId()));
  // Buses
  getBuses(network).forEach(b -> mapper.newInt(AmplSubset.BUS, b.getId()));
  // Lines
  fillLines(mapper, network);
  // Two windings transformers
  fillTwoWindingsTransformers(mapper, network);
  // Three windings transformers
  fillThreeWindingsTransformers(mapper, network);
  // Dangling lines
  fillDanglingLines(mapper, network);
  // loads
  network.getLoadStream().forEach(l -> mapper.newInt(AmplSubset.LOAD, l.getId()));
  // shunts
  network.getShuntCompensatorStream().forEach(sc -> mapper.newInt(AmplSubset.SHUNT, sc.getId()));
  // generators
  network.getGeneratorStream().forEach(g -> mapper.newInt(AmplSubset.GENERATOR, g.getId()));
  // static var compensators
  network.getStaticVarCompensatorStream().forEach(svc -> mapper.newInt(AmplSubset.STATIC_VAR_COMPENSATOR, svc.getId()));
  // HVDC lines
  network.getHvdcLineStream().forEach(hvdc -> mapper.newInt(AmplSubset.HVDC_LINE, hvdc.getId()));
  // HvdcConverterStations
  network.getHvdcConverterStations().forEach(conv ->
      mapper.newInt(conv.getHvdcType().equals(HvdcType.VSC) ? AmplSubset.VSC_CONVERTER_STATION : AmplSubset.LCC_CONVERTER_STATION,  conv.getId()));
}

相关文章