本文整理了Java中com.powsybl.iidm.network.Line.getTerminal1()
方法的一些代码示例,展示了Line.getTerminal1()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Line.getTerminal1()
方法的具体详情如下:
包路径:com.powsybl.iidm.network.Line
类名称:Line
方法名:getTerminal1
暂无
代码示例来源:origin: itesla/ipst
public Double getP(String equipment) {
logger.debug(" network " + network.getName() + " equipment: " + equipment);
Double returnValue = null;
EquipmentTypes eqType = equipmentType(equipment);
if (eqType != null) {
switch (eqType) {
case GEN:
logger.debug(" equipment == generator");
returnValue = network.getGenerator(equipment).getTerminal().getP();
break;
case LOAD:
logger.debug(" equipment == load");
returnValue = network.getLoad(equipment).getP0();
break;
case LINE:
logger.debug(" equipment == line");
if (network.getLine(equipment).getTerminal1() != null) {
returnValue = network.getLine(equipment).getTerminal1().getP();
}
if (network.getLine(equipment).getTerminal2() != null) {
returnValue = network.getLine(equipment).getTerminal2().getP();
}
break;
}
}
if (returnValue != null) {
logger.debug(" RETURN P: " + returnValue + " for Network: " + network.getName() + " Equipment: " + equipment);
}
return returnValue;
}
代码示例来源:origin: itesla/ipst
public Double getQ(String equipment) {
logger.debug(" network " + network.getName() + " equipment: " + equipment);
Double returnValue = null;
EquipmentTypes eqType = equipmentType(equipment);
if (eqType != null) {
switch (eqType) {
case GEN:
logger.debug(" equipment == generator");
returnValue = network.getGenerator(equipment).getTerminal().getQ();
break;
case LOAD:
logger.debug(" equipment == load");
returnValue = network.getLoad(equipment).getQ0();
break;
case LINE:
logger.debug(" equipment == line");
if (network.getLine(equipment).getTerminal1() != null) {
returnValue = network.getLine(equipment).getTerminal1().getQ();
}
if (network.getLine(equipment).getTerminal2() != null) {
returnValue = network.getLine(equipment).getTerminal2().getQ();
}
break;
}
}
if (returnValue != null) {
logger.debug(" RETURN Q: " + returnValue + " for Network: " + network.getName() + " Equipment: " + equipment);
}
return returnValue;
}
代码示例来源:origin: itesla/ipst
for (Line line : connectLinesList) {
LOGGER.info("\t Exporting line connect " + line.getId());
Equipments.ConnectionInfo info1 = Equipments.getConnectionInfoInBusBreakerView(line.getTerminal1());
Bus b = info1.getConnectionBus();
if (!Double.isNaN(b.getV())) {
代码示例来源:origin: itesla/ipst
private static void extractLinesData(Network network, NetworkData networkData) {
for (Line line : network.getLines()) {
if (line.getTerminal1().getVoltageLevel().getNominalV() >= 110) {
networkData.addLineData(new LineData(line.getId(),
(line.getTerminal1().getBusBreakerView().getBus() != null)
? line.getTerminal1().getBusBreakerView().getBus().getId()
: line.getTerminal1().getBusBreakerView().getConnectableBus().getId(),
(line.getTerminal2().getBusBreakerView().getBus() != null)
? line.getTerminal2().getBusBreakerView().getBus().getId()
: line.getTerminal2().getBusBreakerView().getConnectableBus().getId(),
line.getTerminal1().getI(),
line.getTerminal2().getI(),
(line.getCurrentLimits1() != null) ? line.getCurrentLimits1().getPermanentLimit() : Float.NaN,
(line.getCurrentLimits2() != null) ? line.getCurrentLimits2().getPermanentLimit() : Float.NaN)
);
}
}
}
代码示例来源:origin: itesla/ipst
Equipments.ConnectionInfo info1 = Equipments.getConnectionInfoInBusBreakerView(this.line.getTerminal1());
Bus b1 = info1.getConnectionBus();
Equipments.ConnectionInfo info2 = Equipments.getConnectionInfoInBusBreakerView(this.line.getTerminal2());
代码示例来源:origin: itesla/ipst
for (Line line : linesList) {
LOGGER.info("Exporting line " + line.getId());
if (line.getTerminal1().getBusBreakerView().getBus() == null && line.getTerminal2().getBusBreakerView().getBus() == null) {
LOGGER.info("LINE " + line.getId() + " OUT OF SERVICE.");
代码示例来源:origin: com.powsybl/powsybl-iidm-reducer
@Override
protected void reduce(Line line) {
Terminal terminal1 = line.getTerminal1();
Terminal terminal2 = line.getTerminal2();
VoltageLevel vl1 = terminal1.getVoltageLevel();
VoltageLevel vl2 = terminal2.getVoltageLevel();
if (getPredicate().test(vl1)) {
reduce(line, vl1, terminal1);
} else if (getPredicate().test(vl2)) {
reduce(line, vl2, terminal2);
} else {
line.remove();
}
observers.forEach(o -> o.lineRemoved(line));
}
代码示例来源:origin: com.powsybl/powsybl-iidm-api
Bus bus1 = line.getTerminal1().getBusView().getBus();
Bus bus2 = line.getTerminal2().getBusView().getBus();
Bus connectableBus1 = line.getTerminal1().getBusView().getConnectableBus();
Bus connectableBus2 = line.getTerminal2().getBusView().getConnectableBus();
b1 = line.getB1();
b2 = line.getB2();
p1 = line.getTerminal1().getP();
q1 = line.getTerminal1().getQ();
p2 = line.getTerminal2().getP();
q2 = line.getTerminal2().getQ();
代码示例来源:origin: itesla/ipst
public LineRecord(Line line, double snref) {
super(line);
this.line = line;
boolean isSendingOpen = line.getTerminal1().isConnected() ? true : false;
boolean isReceivingOpen = line.getTerminal2().isConnected() ? true : false;
if (!isSendingOpen && isReceivingOpen) { //Opening Sending
super.setDEFAULT_BRANCH_TYPE(DEFAULT_OPEN_LINE_TYPE);
super.addParameter(this.iidmbranchParameters, EurostagFixedData.OPENR, false);
} else if (isSendingOpen && !isReceivingOpen) { //Opening receiving
super.setDEFAULT_BRANCH_TYPE(DEFAULT_OPEN_LINE_TYPE);
super.addParameter(this.iidmbranchParameters, EurostagFixedData.OPENR, true);
} else {
super.setDEFAULT_BRANCH_TYPE(DEFAULT_LINE_TYPE);
}
super.setDEFAULT_BRANCH_PREFIX(StaticData.PREF_LINE);
this.setParameters(snref);
}
代码示例来源:origin: com.powsybl/powsybl-iidm-xml-converter
@Override
protected void writeRootElementAttributes(Line l, Network n, NetworkXmlWriterContext context) throws XMLStreamException {
XmlUtil.writeDouble("r", l.getR(), context.getWriter());
XmlUtil.writeDouble("x", l.getX(), context.getWriter());
XmlUtil.writeDouble("g1", l.getG1(), context.getWriter());
XmlUtil.writeDouble("b1", l.getB1(), context.getWriter());
XmlUtil.writeDouble("g2", l.getG2(), context.getWriter());
XmlUtil.writeDouble("b2", l.getB2(), context.getWriter());
writeNodeOrBus(1, l.getTerminal1(), context);
writeNodeOrBus(2, l.getTerminal2(), context);
if (context.getOptions().isWithBranchSV()) {
writePQ(1, l.getTerminal1(), context.getWriter());
writePQ(2, l.getTerminal2(), context.getWriter());
}
}
代码示例来源:origin: com.powsybl/powsybl-security-analysis-api
@Override
public void modify(Network network, ComputationManager computationManager) {
network.getLine("NHV1_NHV2_2").getTerminal1().disconnect();
network.getLine("NHV1_NHV2_2").getTerminal2().disconnect();
network.getLine("NHV1_NHV2_1").getTerminal2().setP(600.0);
}
});
代码示例来源:origin: com.powsybl/powsybl-cim1-converter
.setB2(0)
.add();
addTerminalMapping(tn1, line.getTerminal1());
addTerminalMapping(tn2, line.getTerminal2());
代码示例来源:origin: com.powsybl/powsybl-security-analysis-api
((Bus) network.getIdentifiable("NHV1")).setV(380.0);
((Bus) network.getIdentifiable("NHV2")).setV(380.0);
network.getLine("NHV1_NHV2_1").getTerminal1().setP(560.0).setQ(550.0);
network.getLine("NHV1_NHV2_1").getTerminal2().setP(560.0).setQ(550.0);
network.getLine("NHV1_NHV2_1").newCurrentLimits1().setPermanentLimit(1500.0).add();
代码示例来源:origin: com.powsybl/powsybl-iidm-xml-converter
@Override
protected Line readRootElementAttributes(LineAdder adder, NetworkXmlReaderContext context) {
double r = XmlUtil.readDoubleAttribute(context.getReader(), "r");
double x = XmlUtil.readDoubleAttribute(context.getReader(), "x");
double g1 = XmlUtil.readDoubleAttribute(context.getReader(), "g1");
double b1 = XmlUtil.readDoubleAttribute(context.getReader(), "b1");
double g2 = XmlUtil.readDoubleAttribute(context.getReader(), "g2");
double b2 = XmlUtil.readDoubleAttribute(context.getReader(), "b2");
adder.setR(r)
.setX(x)
.setG1(g1)
.setB1(b1)
.setG2(g2)
.setB2(b2);
readNodeOrBus(adder, context);
Line l = adder.add();
readPQ(1, l.getTerminal1(), context.getReader());
readPQ(2, l.getTerminal2(), context.getReader());
return l;
}
代码示例来源:origin: com.powsybl/powsybl-iidm-test
line.getTerminal1().setP(560.0).setQ(550.0);
line.getTerminal2().setP(560.0).setQ(550.0);
line.newCurrentLimits1().setPermanentLimit(500).add();
line.getTerminal1().setP(560.0).setQ(550.0);
line.getTerminal2().setP(560.0).setQ(550.0);
line.newCurrentLimits1()
代码示例来源:origin: com.powsybl/powsybl-cgmes-conversion
private void convertLine() {
double r = p.asDouble("r");
double x = p.asDouble("x");
double bch = p.asDouble("bch");
double gch = p.asDouble("gch", 0.0);
String busId1 = busId(1);
String busId2 = busId(2);
final Line l = context.network().newLine()
.setId(iidmId())
.setName(iidmName())
.setEnsureIdUnicity(false)
.setBus1(terminalConnected(1) ? busId1 : null)
.setBus2(terminalConnected(2) ? busId2 : null)
.setConnectableBus1(busId1)
.setConnectableBus2(busId2)
.setVoltageLevel1(iidmVoltageLevelId(1))
.setVoltageLevel2(iidmVoltageLevelId(2))
.setR(r)
.setX(x)
.setG1(gch / 2)
.setG2(gch / 2)
.setB1(bch / 2)
.setB2(bch / 2)
.add();
convertedTerminals(l.getTerminal1(), l.getTerminal2());
}
代码示例来源:origin: com.powsybl/powsybl-cgmes-conversion
@Override
public void convert() {
double r = p.asDouble("r");
double x = p.asDouble("x");
String busId1 = busId(1);
String busId2 = busId(2);
final Line l = context.network().newLine()
.setId(context.namingStrategy().getId(CgmesNames.SERIES_COMPENSATOR, id))
.setName(context.namingStrategy().getName(CgmesNames.SERIES_COMPENSATOR, name))
.setEnsureIdUnicity(false)
.setBus1(terminalConnected(1) ? busId1 : null)
.setBus2(terminalConnected(2) ? busId2 : null)
.setConnectableBus1(busId1)
.setConnectableBus2(busId2)
.setVoltageLevel1(iidmVoltageLevelId(1))
.setVoltageLevel2(iidmVoltageLevelId(2))
.setR(r)
.setX(x)
.setG1(0)
.setG2(0)
.setB1(0)
.setB2(0)
.add();
convertedTerminals(l.getTerminal1(), l.getTerminal2());
}
}
代码示例来源:origin: com.powsybl/powsybl-cgmes-conversion
.add();
convertedTerminals(l.getTerminal1(), l.getTerminal2());
代码示例来源:origin: itesla/ipst
l.getTerminal1().setP(Float.NaN).setQ(Float.NaN);
l.getTerminal2().setP(Float.NaN).setQ(Float.NaN);
代码示例来源:origin: com.powsybl/powsybl-cgmes-conversion
.setB2(0)
.add();
convertedTerminals(line.getTerminal1(), line.getTerminal2());
} else {
voltageLevel().getBusBreakerView().newSwitch()
内容来源于网络,如有侵权,请联系作者删除!