本文整理了Java中com.powsybl.iidm.network.Network.getShuntCompensator()
方法的一些代码示例,展示了Network.getShuntCompensator()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Network.getShuntCompensator()
方法的具体详情如下:
包路径:com.powsybl.iidm.network.Network
类名称:Network
方法名:getShuntCompensator
[英]Get a compensator shunt.
[中]做一个补偿分流。
代码示例来源:origin: com.powsybl/powsybl-iidm-api
/**
* @deprecated Use {@link #getShuntCompensator(String)} instead.
*/
@Deprecated
default ShuntCompensator getShunt(String id) {
return getShuntCompensator(id);
}
代码示例来源:origin: com.powsybl/powsybl-ampl-converter
private Void readShunt(String[] tokens) {
int num = Integer.parseInt(tokens[1]);
int busNum = Integer.parseInt(tokens[2]);
double q = readDouble(tokens[4]);
int sections = Integer.parseInt(tokens[5]);
String id = mapper.getId(AmplSubset.SHUNT, num);
ShuntCompensator sc = network.getShuntCompensator(id);
if (sc == null) {
throw new AmplException("Invalid shunt compensator id '" + id + "'");
}
sc.setCurrentSectionCount(Math.max(0, Math.min(sc.getMaximumSectionCount(), sections)));
Terminal t = sc.getTerminal();
t.setQ(q);
busConnection(t, busNum);
return null;
}
内容来源于网络,如有侵权,请联系作者删除!