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

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

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

Network.getTwoWindingsTransformer介绍

[英]Get a two windings transformer.
[中]买一个双绕组变压器。

代码示例

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

private Void readPhaseTapChanger(String[] tokens) {
  int num = Integer.parseInt(tokens[1]);
  int tap = Integer.parseInt(tokens[2]);
  String id = mapper.getId(AmplSubset.PHASE_TAP_CHANGER, num);
  TwoWindingsTransformer twt = network.getTwoWindingsTransformer(id);
  if (twt == null) {
    throw new AmplException("Invalid two windings transformer id '" + id + "'");
  }
  PhaseTapChanger ptc = twt.getPhaseTapChanger();
  ptc.setTapPosition(ptc.getLowTapPosition() + tap - 1);
  return null;
}

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

private Void readRatioTapChanger(String[] tokens) {
  int num = Integer.parseInt(tokens[1]);
  int tap = Integer.parseInt(tokens[2]);
  String id = mapper.getId(AmplSubset.RATIO_TAP_CHANGER, num);
  if (id.endsWith(AmplConstants.LEG2_SUFFIX) || id.endsWith(AmplConstants.LEG3_SUFFIX)) {
    ThreeWindingsTransformer twt = network.getThreeWindingsTransformer(id.substring(0, id.indexOf(AmplConstants.LEG2_SUFFIX)));
    if (twt == null) {
      throw new AmplException("Invalid three windings transformer id '" + id + "'");
    }
    if (id.endsWith(AmplConstants.LEG2_SUFFIX)) {
      RatioTapChanger rtc2 = twt.getLeg2().getRatioTapChanger();
      rtc2.setTapPosition(rtc2.getLowTapPosition() + tap - 1);
    } else if (id.endsWith(AmplConstants.LEG3_SUFFIX)) {
      RatioTapChanger rtc3 = twt.getLeg3().getRatioTapChanger();
      rtc3.setTapPosition(rtc3.getLowTapPosition() + tap - 1);
    } else {
      throw new AssertionError();
    }
  } else {
    TwoWindingsTransformer twt = network.getTwoWindingsTransformer(id);
    if (twt == null) {
      throw new AmplException("Invalid two windings transformer id '" + id + "'");
    }
    RatioTapChanger rtc = twt.getRatioTapChanger();
    rtc.setTapPosition(rtc.getLowTapPosition() + tap - 1);
  }
  return null;
}

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

@Override
  public void modify(Network network, ComputationManager computationManager) {
    TwoWindingsTransformer transformer = network.getTwoWindingsTransformer(transformerId);
    if (transformer == null) {
      throw new PowsyblException("Two windings transformer '" + transformerId + "' not found");
    }
    PhaseTapChanger tapChanger = transformer.getPhaseTapChanger();
    if (tapChanger == null) {
      throw new PowsyblException("Transformer " + transformerId + " is not a PST");
    }
    tapChanger.setRegulationMode(PhaseTapChanger.RegulationMode.FIXED_TAP);
    tapChanger.setTapPosition(tapPosition);
  }
}

代码示例来源:origin: com.powsybl/powsybl-action-util

@Override
  public void modify(Network network, ComputationManager computationManager) {
    Objects.requireNonNull(network);
    TwoWindingsTransformer phaseShifter = network.getTwoWindingsTransformer(phaseShifterId);
    if (phaseShifter == null) {
      throw new PowsyblException("Transformer '" + phaseShifterId + "' not found");
    }
    if (phaseShifter.getPhaseTapChanger() == null) {
      throw new PowsyblException("Transformer '" + phaseShifterId + "' is not a phase shifter");
    }
    phaseShifter.getPhaseTapChanger().setTapPosition(tapPosition);
    phaseShifter.getPhaseTapChanger().setRegulating(false);
    phaseShifter.getPhaseTapChanger().setRegulationMode(PhaseTapChanger.RegulationMode.FIXED_TAP);
  }
}

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

public EquipmentTypes  equipmentType(String equipment) {
  if (network.getGenerator(equipment) != null) {
    return EquipmentTypes.GEN;
  }
  if (network.getLoad(equipment) != null) {
    return EquipmentTypes.LOAD;
  }
  if (network.getLine(equipment) != null) {
    return EquipmentTypes.LINE;
  }
  if (network.getTwoWindingsTransformer(equipment) != null) {
    return EquipmentTypes.TWOWINDTRASF;
  }
  if (network.getThreeWindingsTransformer(equipment) != null) {
    return EquipmentTypes.THREEWINDTRASF;
  }
  if (network.getVoltageLevel(equipment) != null) {
    return EquipmentTypes.VOLTAGELEVEL;
  }
  if (network.getShunt(equipment) != null) {
    return EquipmentTypes.SHUNT;
  }
  if (network.getSubstation(equipment) != null) {
    return EquipmentTypes.SUBSTATION;
  }
  logger.warn(" Type not found for equipment:" + equipment + " return NULL");
  return null;
}

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

if (network.getTwoWindingsTransformer(transformerId) != null) {
  if (pst.getAction().equals("shunt")) {
    elements.add(new ShuntAction(pst.getId(), pst.getImplementationTime(), pst.getAchievmentIndex()));

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

if (network.getTwoWindingsTransformer(equipment).getSubstation().getTso() != null) {
  tsos.add(network.getTwoWindingsTransformer(equipment).getSubstation().getTso());

代码示例来源:origin: com.powsybl/powsybl-action-util

@Override
public void findMaximalFlowTap(Network network, String phaseShifterId) {
  TwoWindingsTransformer phaseShifter = network.getTwoWindingsTransformer(phaseShifterId);
  if (phaseShifter == null) {
    throw new PowsyblException("Phase shifter '" + phaseShifterId + "' not found");

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

lineBE2.getCurrentLimits2().setPermanentLimit(2000.0);
network.getTwoWindingsTransformer("_e482b89a-fa84-4ea9-8e70-a83d44790957")
    .getRatioTapChanger().setTapPosition(20);
TwoWindingsTransformer txBE22 = network.getTwoWindingsTransformer("_b94318f6-6d24-4f56-96b9-df2531ad6543");
txBE22.getRatioTapChanger().remove();
TwoWindingsTransformer txBE21 = network.getTwoWindingsTransformer("_a708c3bc-465d-4fe7-b6ef-6fa6408a62b0");
txBE21.getPhaseTapChanger().remove();

相关文章