本文整理了Java中com.powsybl.iidm.network.Bus.setAngle()
方法的一些代码示例,展示了Bus.setAngle()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Bus.setAngle()
方法的具体详情如下:
包路径:com.powsybl.iidm.network.Bus
类名称:Bus
方法名:setAngle
[英]Set the voltage angle of the bus in degree.
[中]以度为单位设置母线的电压角。
代码示例来源:origin: com.powsybl/powsybl-ampl-converter
private Void readBus(String[] tokens) {
int num = Integer.parseInt(tokens[1]);
double v = readDouble(tokens[2]);
double theta = readDouble(tokens[3]);
String id = mapper.getId(AmplSubset.BUS, num);
Bus bus = buses.get(id);
if (bus != null) {
bus.setV(v * bus.getVoltageLevel().getNominalV());
bus.setAngle(Math.toDegrees(theta));
} else {
throw new AmplException("Invalid bus id '" + id + "'");
}
return null;
}
代码示例来源:origin: com.powsybl/powsybl-iidm-xml-converter
private static void updateBus(XMLStreamReader reader, VoltageLevel[] vl) {
String id = reader.getAttributeValue(null, "id");
double v = XmlUtil.readDoubleAttribute(reader, "v");
double angle = XmlUtil.readDoubleAttribute(reader, "angle");
Bus b = vl[0].getBusBreakerView().getBus(id);
if (b == null) {
b = vl[0].getBusView().getBus(id);
}
b.setV(v > 0 ? v : Double.NaN).setAngle(angle);
}
代码示例来源:origin: itesla/ipst
bus.setAngle(voltage.adeg);
voltage.used = true;
代码示例来源:origin: com.powsybl/powsybl-iidm-xml-converter
@Override
protected Bus readRootElementAttributes(BusAdder adder, NetworkXmlReaderContext context) {
double v = XmlUtil.readOptionalDoubleAttribute(context.getReader(), "v");
double angle = XmlUtil.readOptionalDoubleAttribute(context.getReader(), "angle");
Bus b = adder.add();
b.setV(v);
b.setAngle(angle);
return b;
}
代码示例来源:origin: com.powsybl/powsybl-cim1-converter
Bus bus = entry.getKey();
cim1.model.SvVoltage svv = entry.getValue();
bus.setAngle(svv.getAngle());
if (svv.getV() > 0) {
bus.setV(svv.getV());
代码示例来源:origin: com.powsybl/powsybl-iidm-xml-converter
@Override
protected BusbarSection readRootElementAttributes(BusbarSectionAdder adder, NetworkXmlReaderContext context) {
int node = XmlUtil.readIntAttribute(context.getReader(), "node");
double v = XmlUtil.readOptionalDoubleAttribute(context.getReader(), "v");
double angle = XmlUtil.readOptionalDoubleAttribute(context.getReader(), "angle");
BusbarSection bbs = adder.setNode(node)
.add();
context.getEndTasks().add(() -> {
Bus b = bbs.getTerminal().getBusView().getBus();
if (b != null) {
b.setV(v).setAngle(angle);
}
});
return bbs;
}
代码示例来源:origin: com.powsybl/powsybl-cgmes-conversion
private void createBus(VoltageLevel voltageLevel) {
Bus bus = voltageLevel.getBusBreakerView().newBus()
.setId(context.namingStrategy().getId("Bus", id))
.setName(context.namingStrategy().getName("Bus", name))
.add();
double v = p.asDouble("v");
double angle = p.asDouble("angle");
if (valid(v, angle)) {
bus.setV(v);
bus.setAngle(angle);
} else {
String reason = String.format(
"v = %f, angle = %f. Substation, Voltage level = %s %s",
v,
angle,
voltageLevel.getSubstation().getName(),
voltageLevel.getName());
context.invalid("SvVoltage", reason);
}
}
代码示例来源:origin: itesla/ipst
destBus.setAngle(destTargetSv.theta);
代码示例来源:origin: itesla/ipst
b.setAngle(Float.NaN);
代码示例来源:origin: com.powsybl/powsybl-cgmes-conformity
.add()
.setV(223.435281)
.setAngle(-17.412200);
.getBus("_f96d552a-618d-4d0c-a39a-2dea3c411dee")
.setV(21.987000)
.setAngle(-20.588300);
Bus busBrussels110 = network
.getVoltageLevel("_8bbd7e74-ae20-4dce-8780-c20f8e18c2e0")
.getBus("_5c74cb26-ce2f-40c6-951d-89091eb781b6")
.setV(115.5)
.setAngle(-22.029800);
Bus busBrussels10 = network
.getVoltageLevel("_4ba71b59-ee2f-450b-9f7d-cc2f1cc5e386")
.getBus("_a81d08ed-f51d-4538-8d1e-fb2d0dbd128e")
.setV(10.816961)
.setAngle(-19.642100);
.getBus("_e44141af-f1dc-44d3-bfa4-b674e5c953d7")
.setV(414.114413)
.setAngle(-21.526500);
.getBus("_99b219f3-4593-428b-a4da-124a54630178")
.setV(224.156562)
.setAngle(-21.796200);
.getBus("_f70f6bad-eb8d-4b8f-8431-4ab93581514e")
代码示例来源:origin: com.powsybl/powsybl-iidm-test
.setId("BUS_132")
.add();
bus132.setV(133.584).setAngle(-9.62);
vl1.newLoad()
.setId("LOAD_132")
.setId("BUS_33")
.add();
bus33.setV(34.881).setAngle(-15.24);
Load load33 = vl2.newLoad()
.setId("LOAD_33")
.setId("BUS_11")
.add();
bus11.setV(11.781).setAngle(-15.24);
Load load11 = vl3.newLoad()
.setId("LOAD_11")
代码示例来源:origin: com.powsybl/powsybl-iidm-test
.setId("B1")
.add();
b1.setV(400).setAngle(0);
Generator g1 = vl1.newGenerator()
.setId("G1")
.setId("B2")
.add();
b2.setV(385.6934).setAngle(-3.6792064);
Load ld2 = vl2.newLoad()
.setId("LD2")
.setId("B3")
.add();
b3.setV(392.6443).setAngle(-1.8060945);
TwoWindingsTransformer ps1 = s1.newTwoWindingsTransformer()
.setId("PS1")
代码示例来源:origin: com.powsybl/powsybl-iidm-test
.setAngle(0.0);
busbarSectionO.getTerminal().getBusView().getBus()
.setV(236.44736)
.setAngle(15250391);
busbarSectionP.getTerminal().getBusView().getBus()
.setV(236.44736)
.setAngle(15.250391);
代码示例来源:origin: com.powsybl/powsybl-cgmes-conformity
.add();
busAnvers220.setV(224.871595);
busAnvers220.setAngle(-7.624900);
Load loadAnvers220 = vlAnvers220.newLoad()
.setId("_b1480a00-b427-4001-a26c-51954d2bb7e9")
.add();
busBrussels225.setV(224.315268);
busBrussels225.setAngle(-8.770120);
Load loadBrussels225 = vlBrussels225.newLoad()
.setId("_1c6beed6-1acf-42e7-ba55-0cc9f04bddd8")
.add();
busBrussels110.setV(115.5);
busBrussels110.setAngle(-9.391330);
Load loadBrussels110 = vlBrussels110.newLoad()
.setId("_cb459405-cc14-4215-a45c-416789205904")
.add();
busBrussels380.setV(412.989001);
busBrussels380.setAngle(-6.780710);
ShuntCompensator shBrussels380 = vlBrussels380.newShuntCompensator()
.setId("_002b0a40-3957-46db-b84a-30420083558f")
.add();
busBrussels21.setV(21.987000);
busBrussels21.setAngle(-6.650800);
.add();
内容来源于网络,如有侵权,请联系作者删除!