本文整理了Java中com.powsybl.iidm.network.Generator.setTargetV()
方法的一些代码示例,展示了Generator.setTargetV()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Generator.setTargetV()
方法的具体详情如下:
包路径:com.powsybl.iidm.network.Generator
类名称:Generator
方法名:setTargetV
[英]Set the voltage target in kV.
Depends on the working variant.
[中]以千伏为单位设置电压目标。
取决于工作变量。
代码示例来源:origin: com.powsybl/powsybl-action-util
private static void connectGenerator(Generator g) {
Terminal t = g.getTerminal();
t.connect();
if (g.isVoltageRegulatorOn()) {
Bus bus = t.getBusView().getBus();
if (bus != null) {
// set voltage setpoint to the same as other generators connected to the bus
double targetV = bus.getGeneratorStream().findFirst().map(Generator::getTargetV).orElse(Double.NaN);
// if no other generator connected to the bus, set voltage setpoint to network voltage
if (Double.isNaN(targetV) && !Double.isNaN(bus.getV())) {
g.setTargetV(bus.getV());
}
}
}
LOGGER.info("Connecting {}", g.getId());
}
}
代码示例来源:origin: com.powsybl/powsybl-ampl-converter
public AmplNetworkReader readGenerators() throws IOException {
// Bug fix, to avoid generators out of main cc to have a different target voltage while connected to same bus (Eurostag check)
// In that case it will not be part of result file, so not overwritten. So first reset all target voltages to nominal voltage
for (Generator g : network.getGenerators()) {
g.setTargetV(g.getTerminal().getVoltageLevel().getNominalV());
}
read("_generators", 9, this::readGenerator);
return this;
}
代码示例来源:origin: itesla/ipst
double newV = b.getV();
if (oldV != newV) {
g.setTargetV(newV);
LOGGER.debug("LF result reintegration: targetV {} -> {}", oldV, newV);
代码示例来源:origin: com.powsybl/powsybl-ampl-converter
private Void readGenerator(String[] tokens) {
int num = Integer.parseInt(tokens[1]);
int busNum = Integer.parseInt(tokens[2]);
boolean vregul = Boolean.parseBoolean(tokens[3]);
double targetV = readDouble(tokens[4]);
double targetP = readDouble(tokens[5]);
double targetQ = readDouble(tokens[6]);
double p = readDouble(tokens[7]);
double q = readDouble(tokens[8]);
String id = mapper.getId(AmplSubset.GENERATOR, num);
Generator g = network.getGenerator(id);
if (g == null) {
throw new AmplException("Invalid generator id '" + id + "'");
}
g.setVoltageRegulatorOn(vregul);
g.setTargetP(targetP);
g.setTargetQ(targetQ);
Terminal t = g.getTerminal();
t.setP(p).setQ(q);
double vb = t.getVoltageLevel().getNominalV();
g.setTargetV(targetV * vb);
busConnection(t, busNum);
return null;
}
内容来源于网络,如有侵权,请联系作者删除!