本文整理了Java中com.powsybl.iidm.network.Network.getHvdcLine()
方法的一些代码示例,展示了Network.getHvdcLine()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Network.getHvdcLine()
方法的具体详情如下:
包路径:com.powsybl.iidm.network.Network
类名称:Network
方法名:getHvdcLine
[英]Get an HVDC line.
[中]接通高压直流输电线路。
代码示例来源:origin: com.powsybl/powsybl-ampl-converter
private Void readHvdcLine(String[] tokens) {
int num = Integer.parseInt(tokens[1]);
String converterMode = tokens[2].replace("\"", "");
double targetP = readDouble(tokens[3]);
String id = mapper.getId(AmplSubset.HVDC_LINE, num);
HvdcLine hl = network.getHvdcLine(id);
if (hl == null) {
throw new AmplException("Invalid HvdcLine id '" + id + "'");
}
hl.setConvertersMode(ConvertersMode.valueOf(converterMode));
hl.setActivePowerSetpoint(targetP);
return null;
}
代码示例来源:origin: com.powsybl/powsybl-iidm-impl
/**
* Throw a {@link com.powsybl.commons.PowsyblException} if this voltage level contains at least one {@link Branch} or
* one {@link ThreeWindingsTransformer} or one {@link HvdcConverterStation}.
*/
static void checkRemovability(VoltageLevel voltageLevel) {
Network network = voltageLevel.getSubstation().getNetwork();
for (Connectable connectable : voltageLevel.getConnectables()) {
ConnectableType type = connectable.getType();
if (MULTIPLE_TERMINALS_CONNECTABLE_TYPES.contains(type)) {
// Reject lines, 2WT and 3WT
throw new AssertionError("The voltage level '" + voltageLevel.getId() + "' cannot be removed because of a remaining " + type);
} else if ((type == ConnectableType.HVDC_CONVERTER_STATION) && (network.getHvdcLine((HvdcConverterStation) connectable) != null)) {
// Reject all converter stations connected to a HVDC line
throw new AssertionError("The voltage level '" + voltageLevel.getId() + "' cannot be removed because of a remaining HVDC line");
}
}
}
}
代码示例来源:origin: com.powsybl/powsybl-iidm-impl
private static void checkRemovability(Substation substation, HvdcConverterStation station) {
HvdcLine hvdcLine = substation.getNetwork().getHvdcLine(station);
if (hvdcLine != null) {
Substation s1 = hvdcLine.getConverterStation1().getTerminal().getVoltageLevel().getSubstation();
Substation s2 = hvdcLine.getConverterStation2().getTerminal().getVoltageLevel().getSubstation();
if ((s1 != substation) || (s2 != substation)) {
throw createIsolationException(substation);
}
}
}
内容来源于网络,如有侵权,请联系作者删除!