本文整理了Java中com.powsybl.iidm.network.Network.getThreeWindingsTransformer()
方法的一些代码示例,展示了Network.getThreeWindingsTransformer()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Network.getThreeWindingsTransformer()
方法的具体详情如下:
包路径:com.powsybl.iidm.network.Network
类名称:Network
方法名:getThreeWindingsTransformer
[英]Get a 3 windings transformer.
[中]买一个三绕组变压器。
代码示例来源: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: com.powsybl/powsybl-ampl-converter
private boolean readThreeWindingsTransformerBranch(String id, double p, double q, int busNum) {
if (id.endsWith(AmplConstants.LEG1_SUFFIX)) {
ThreeWindingsTransformer tht = network.getThreeWindingsTransformer(id.substring(0, id.indexOf(AmplConstants.LEG1_SUFFIX)));
if (tht != null) {
tht.getLeg1().getTerminal().setP(p).setQ(q);
busConnection(tht.getLeg1().getTerminal(), busNum);
} else {
throw new AmplException("Invalid branch (leg1) id '" + id + "'");
}
} else if (id.endsWith(AmplConstants.LEG2_SUFFIX)) {
ThreeWindingsTransformer tht = network.getThreeWindingsTransformer(id.substring(0, id.indexOf(AmplConstants.LEG2_SUFFIX)));
if (tht != null) {
tht.getLeg2().getTerminal().setP(p).setQ(q);
busConnection(tht.getLeg1().getTerminal(), busNum);
} else {
throw new AmplException("Invalid branch (leg2) id '" + id + "'");
}
} else if (id.endsWith(AmplConstants.LEG3_SUFFIX)) {
ThreeWindingsTransformer tht = network.getThreeWindingsTransformer(id.substring(0, id.indexOf(AmplConstants.LEG3_SUFFIX)));
if (tht != null) {
tht.getLeg3().getTerminal().setP(p).setQ(q);
busConnection(tht.getLeg1().getTerminal(), busNum);
} else {
throw new AmplException("Invalid branch (leg3) id '" + id + "'");
}
} else {
return false;
}
return true;
}
代码示例来源: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.getThreeWindingsTransformer(equipment).getSubstation().getTso() != null) {
tsos.add(network.getThreeWindingsTransformer(equipment).getSubstation().getTso());
代码示例来源:origin: com.powsybl/powsybl-iidm-test
public static Network createWithCurrentLimits() {
Network network = create();
network.getThreeWindingsTransformer("3WT").getLeg1().newCurrentLimits()
.setPermanentLimit(1000.0)
.beginTemporaryLimit()
.add();
network.getThreeWindingsTransformer("3WT").getLeg2().newCurrentLimits()
.setPermanentLimit(100.0)
.beginTemporaryLimit()
.add();
network.getThreeWindingsTransformer("3WT").getLeg3().newCurrentLimits()
.setPermanentLimit(10.0)
.beginTemporaryLimit()
内容来源于网络,如有侵权,请联系作者删除!