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

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

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

Network.getThreeWindingsTransformers介绍

[英]Get all 3 windings transformers.
[中]把三个绕组都装上变压器。

代码示例

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

private static void dumpLinesDictionary(Network network, EurostagDictionary dictionary, Path dir, EurostagEchExportConfig exportConfig) throws IOException {
  try (BufferedWriter os = Files.newBufferedWriter(dir.resolve("dict_lines.csv"), StandardCharsets.UTF_8)) {
    for (Identifiable obj : Identifiables.sort(Iterables.concat(
        network.getLineStream().filter(line -> !(exportConfig.isExportMainCCOnly() && !EchUtil.isInMainCc(line, exportConfig.isNoSwitch()))).collect(Collectors.toList()),
        network.getTwoWindingsTransformerStream().filter(twt -> !(exportConfig.isExportMainCCOnly() && !EchUtil.isInMainCc(twt, exportConfig.isNoSwitch()))).collect(Collectors.toList()),
        network.getDanglingLineStream().filter(dl -> !(exportConfig.isExportMainCCOnly() && !EchUtil.isInMainCc(dl, exportConfig.isNoSwitch()))).collect(Collectors.toList())
    ))) {
      os.write(obj.getId() + ";" + dictionary.getEsgId(obj.getId()));
      os.newLine();
    }
    for (ThreeWindingsTransformer twt : Identifiables.sort(network.getThreeWindingsTransformers())) {
      throw new AssertionError("TODO");
    }
  }
}

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

for (ThreeWindingsTransformer twt : network.getThreeWindingsTransformers()) {
  throw new RuntimeException("TODO support 3 windings tfo");

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

for (ThreeWindingsTransformer twt : network.getThreeWindingsTransformers()) {
  RatioTapChanger rtc2 = twt.getLeg2().getRatioTapChanger();
  if (rtc2 != null) {

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

for (ThreeWindingsTransformer wt3 : latestNetwork.getThreeWindingsTransformers()) {
  if (equipIds != null && !equipIds.contains(wt3.getId())) {
    continue;

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

private void writeThreeWindingsTransformerMiddleBuses(AmplExportContext context, TableFormatter formatter) throws IOException {
  for (ThreeWindingsTransformer twt : network.getThreeWindingsTransformers()) {
    int middleCcNum = getThreeWindingsTransformerMiddleBusComponentNum(context, twt);
    if (connectedComponentToExport(middleCcNum)) {
      String middleBusId = getThreeWindingsTransformerMiddleBusId(twt);
      String middleVlId = getThreeWindingsTransformerMiddleVoltageLevelId(twt);
      context.busIdsToExport.add(middleBusId);
      int middleBusNum = mapper.getInt(AmplSubset.BUS, middleBusId);
      int middleVlNum = mapper.getInt(AmplSubset.VOLTAGE_LEVEL, middleVlId);
      formatter.writeCell(variantIndex)
          .writeCell(middleBusNum)
          .writeCell(middleVlNum)
          .writeCell(middleCcNum)
          .writeCell(Float.NaN)
          .writeCell(Double.NaN)
          .writeCell(0.0)
          .writeCell(0.0)
          .writeCell(faultNum)
          .writeCell(actionNum)
          .writeCell(middleBusId);
    }
  }
}

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

for (ThreeWindingsTransformer twt : Identifiables.sort(network.getThreeWindingsTransformers())) {
  LOGGER.error("NOT YET IMPLEMENTED");
  throw new AssertionError("TODO");

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

private void writeThreeWindingsTransformerCurrentLimits(TableFormatter formatter) throws IOException {
  for (ThreeWindingsTransformer twt : network.getThreeWindingsTransformers()) {
    if (twt.getLeg1().getCurrentLimits() != null) {
      String branchId = twt.getId() + AmplConstants.LEG1_SUFFIX;
      writeTemporaryCurrentLimits(twt.getLeg1().getCurrentLimits(), formatter, branchId, false, "");
    }
    if (twt.getLeg2().getCurrentLimits() != null) {
      String branchId = twt.getId() + AmplConstants.LEG2_SUFFIX;
      writeTemporaryCurrentLimits(twt.getLeg2().getCurrentLimits(), formatter, branchId, true, "");
    }
    if (twt.getLeg3().getCurrentLimits() != null) {
      String branchId = twt.getId() + AmplConstants.LEG3_SUFFIX;
      writeTemporaryCurrentLimits(twt.getLeg3().getCurrentLimits(), formatter, branchId, true, "");
    }
  }
}

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

for (ThreeWindingsTransformer t : n.getThreeWindingsTransformers()) {
  if (t.getLeg1().getTerminal().getBusView().getBus() != null &&
      t.getLeg2().getTerminal().getBusView().getBus() != null &&
for (ThreeWindingsTransformer t : n.getThreeWindingsTransformers()) {
  if (t.getLeg1().getTerminal().getBusView().getBus() != null &&
      t.getLeg2().getTerminal().getBusView().getBus() != null &&
for (ThreeWindingsTransformer t : n.getThreeWindingsTransformers()) {
  if (t.getLeg1().getTerminal().getBusView().getBus() != null &&
      t.getLeg2().getTerminal().getBusView().getBus() != null &&

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

for (ThreeWindingsTransformer twt : network.getThreeWindingsTransformers()) {
  throw new AssertionError("TODO");

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

private void writeThreeWindingsTransformerTapChangerTable(TableFormatter formatter) throws IOException {
  for (ThreeWindingsTransformer twt : network.getThreeWindingsTransformers()) {
    RatioTapChanger rtc2 = twt.getLeg2().getRatioTapChanger();
    if (rtc2 != null) {
      String id = twt.getId() + "_leg2_ratio_table";
      Terminal t2 = twt.getLeg2().getTerminal();
      double vb2 = t2.getVoltageLevel().getNominalV();
      double zb2 = vb2 * vb2 / AmplConstants.SB;
      writeRatioTapChanger(formatter, id, zb2, twt.getLeg2().getX(), rtc2);
    }
    RatioTapChanger rtc3 = twt.getLeg3().getRatioTapChanger();
    if (rtc3 != null) {
      String id = twt.getId() + "_leg3_ratio_table";
      Terminal t3 = twt.getLeg3().getTerminal();
      double vb3 = t3.getVoltageLevel().getNominalV();
      double zb3 = vb3 * vb3 / AmplConstants.SB;
      writeRatioTapChanger(formatter, id, zb3, twt.getLeg3().getX(), rtc3);
    }
  }
}

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

private static void fillThreeWindingsTransformers(StringToIntMapper<AmplSubset> mapper, Network network) {
  for (ThreeWindingsTransformer twt : network.getThreeWindingsTransformers()) {
    mapper.newInt(AmplSubset.VOLTAGE_LEVEL, twt.getId());
    mapper.newInt(AmplSubset.BUS, twt.getId());
    mapper.newInt(AmplSubset.THREE_WINDINGS_TRANSFO, twt.getId());
    mapper.newInt(AmplSubset.BRANCH, twt.getId() + AmplConstants.LEG1_SUFFIX);
    mapper.newInt(AmplSubset.BRANCH, twt.getId() + AmplConstants.LEG2_SUFFIX);
    mapper.newInt(AmplSubset.BRANCH, twt.getId() + AmplConstants.LEG3_SUFFIX);
    if (twt.getLeg2().getRatioTapChanger() != null) {
      mapper.newInt(AmplSubset.TAP_CHANGER_TABLE, twt.getId() + "_leg2_ratio_table");
      mapper.newInt(AmplSubset.RATIO_TAP_CHANGER, twt.getId() + AmplConstants.LEG2_SUFFIX);
    }
    if (twt.getLeg3().getRatioTapChanger() != null) {
      mapper.newInt(AmplSubset.TAP_CHANGER_TABLE, twt.getId() + "_leg3_ratio_table");
      mapper.newInt(AmplSubset.RATIO_TAP_CHANGER, twt.getId() + AmplConstants.LEG3_SUFFIX);
    }
    // limits
    if (twt.getLeg1().getCurrentLimits() != null) {
      createLimitsIds(mapper, twt.getLeg1().getCurrentLimits(), twt.getId() + AmplConstants.LEG1_SUFFIX, "");
    }
    if (twt.getLeg2().getCurrentLimits() != null) {
      createLimitsIds(mapper, twt.getLeg2().getCurrentLimits(),  twt.getId() + AmplConstants.LEG2_SUFFIX, "");
    }
    if (twt.getLeg3().getCurrentLimits() != null) {
      createLimitsIds(mapper, twt.getLeg3().getCurrentLimits(),  twt.getId() + AmplConstants.LEG3_SUFFIX, "");
    }
  }
}

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

twt.getTerminal2().setP(Float.NaN).setQ(Float.NaN);
for (ThreeWindingsTransformer twt : network.getThreeWindingsTransformers()) {
  twt.getLeg1().getTerminal().setP(Float.NaN).setQ(Float.NaN);
  twt.getLeg2().getTerminal().setP(Float.NaN).setQ(Float.NaN);

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

private static void extractTfo3WData(Network network, NetworkData networkData) {
  for (ThreeWindingsTransformer tfo : network.getThreeWindingsTransformers()) {
    networkData.addTfo3WData(new Tfo3WData(tfo.getId(),
                        (tfo.getLeg1().getTerminal().getBusBreakerView().getBus() != null)
                            ? tfo.getLeg1().getTerminal().getBusBreakerView().getBus().getId()
                            : tfo.getLeg1().getTerminal().getBusBreakerView().getConnectableBus().getId(),
                        (tfo.getLeg2().getTerminal().getBusBreakerView().getBus() != null)
                            ? tfo.getLeg2().getTerminal().getBusBreakerView().getBus().getId()
                            : tfo.getLeg2().getTerminal().getBusBreakerView().getConnectableBus().getId(),
                        (tfo.getLeg3().getTerminal().getBusBreakerView().getBus() != null)
                            ? tfo.getLeg3().getTerminal().getBusBreakerView().getBus().getId()
                            : tfo.getLeg3().getTerminal().getBusBreakerView().getConnectableBus().getId(),
                        apparentPower(tfo.getLeg1().getTerminal()),
                        apparentPower(tfo.getLeg2().getTerminal()),
                        apparentPower(tfo.getLeg3().getTerminal()),
                        tfo.getLeg1().getTerminal().getVoltageLevel().getNominalV(),
                        tfo.getLeg1().getTerminal().getVoltageLevel().getNominalV(),
                        tfo.getLeg3().getTerminal().getVoltageLevel().getNominalV(),
                        (tfo.getLeg1().getCurrentLimits() != null) ? tfo.getLeg1().getCurrentLimits().getPermanentLimit() : Float.NaN,
                        (tfo.getLeg2().getCurrentLimits() != null) ? tfo.getLeg2().getCurrentLimits().getPermanentLimit() : Float.NaN,
                        (tfo.getLeg3().getCurrentLimits() != null) ? tfo.getLeg3().getCurrentLimits().getPermanentLimit() : Float.NaN)
    );
  }
}

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

private void writeThreeWindingsTransformers(AmplExportContext context, TableFormatter formatter) throws IOException {
  for (ThreeWindingsTransformer twt : network.getThreeWindingsTransformers()) {
    Terminal t1 = twt.getLeg1().getTerminal();
    Terminal t2 = twt.getLeg2().getTerminal();

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

for (ThreeWindingsTransformer twt : network.getThreeWindingsTransformers()) {
  String vlId = getThreeWindingsTransformerMiddleVoltageLevelId(twt);
  int num = mapper.getInt(AmplSubset.VOLTAGE_LEVEL, vlId);

相关文章