本文整理了Java中com.powsybl.iidm.network.Line.getId()
方法的一些代码示例,展示了Line.getId()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Line.getId()
方法的具体详情如下:
包路径:com.powsybl.iidm.network.Line
类名称:Line
方法名:getId
暂无
代码示例来源:origin: itesla/ipst
@Override
public List<Contingency> getContingencies(Network network) {
List<Contingency> contingencies = new ArrayList<>(lineContigencyCount);
for (Line l : Iterables.limit(network.getLines(), lineContigencyCount)) {
contingencies.add(new Contingency(l.getId(), Arrays.<ContingencyElement>asList(new BranchContingency(l.getId()))));
}
return contingencies;
}
代码示例来源:origin: itesla/ipst
this.addRecord(writerMo, "// LINES");
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.");
} else {
LOGGER.warn("The model has an asymmetric line: {}.", line.getId());
LineRecord lineRecord = ModelConverter.getModelicaRecord(line, modContext, _ddbManager, modelicaSim, SNREF);
this.addRecord(lineRecord, writerMo, modContext, _ddbManager, modelicaSim);
代码示例来源:origin: itesla/ipst
double shortCircuitDistance = parameters.getBranchFaultShortCircuitDistance(contingency.getId(), element.getId());
if (shortCircuitDistance != 50) {
String shortCircuitSide = parameters.getBranchFaultShortCircuitSide(contingency.getId(), l.getId());
if (shortCircuitSide == null) {
throw new RuntimeException("Short circuit side has to be specified in detailed dynamic simulation configuration file when not at middle of the line");
shortCircuitDistance = 100 - shortCircuitDistance; // invert the distance because in Eurostag it is always defined from sending node (terminal 1 in iidm)
} else {
throw new RuntimeException("Bad side definition " + shortCircuitSide + " for line " + l.getId()
+ ": " + vl1.getId() + " or " + vl2.getId());
double shortCircuitDurationSide1 = parameters.getBranchSideOneFaultShortCircuitDuration(contingency.getId(), l.getId());
double shortCircuitDurationSide2 = parameters.getBranchSideOTwoFaultShortCircuitDuration(contingency.getId(), l.getId());
String esgId = dictionary.getEsgId(l.getId());
writer.append(String.format("%8s", parameters.getFaultEventInstant()))
.append(PADDING_1)
代码示例来源:origin: itesla/ipst
LOGGER.info("#------------------------ --------------- --------------- --------------- --------------- ");
for (Line line : network.getLines()) {
LOGGER.info(String.format("%s %15.8f %15.8f %15.8f %15.8f", line.getId(), line.getTerminal1().getQ(), line.getTerminal2().getQ(), line.getTerminal1().getP(), line.getTerminal2().getP()));
代码示例来源:origin: itesla/ipst
this.addRecord(writerMo, "// Connecting LINES");
for (Line line : connectLinesList) {
LOGGER.info("\t Exporting line connect " + line.getId());
Equipments.ConnectionInfo info1 = Equipments.getConnectionInfoInBusBreakerView(line.getTerminal1());
Bus b = info1.getConnectionBus();
代码示例来源:origin: itesla/ipst
@Override
public void createRecord(ModExportContext modContext, DDBManager ddbManager, SimulatorInst simulator) {
modContext.dictionary.add(this.line, this.line.getId());
代码示例来源:origin: com.powsybl/powsybl-ampl-converter
private static void fillLines(StringToIntMapper<AmplSubset> mapper, Network network) {
for (Line l : network.getLines()) {
mapper.newInt(AmplSubset.BRANCH, l.getId());
if (l.isTieLine()) {
TieLine tl = (TieLine) l;
mapper.newInt(AmplSubset.VOLTAGE_LEVEL, AmplUtil.getXnodeVoltageLevelId(tl));
mapper.newInt(AmplSubset.BUS, AmplUtil.getXnodeBusId(tl));
mapper.newInt(AmplSubset.BRANCH, tl.getHalf1().getId());
mapper.newInt(AmplSubset.BRANCH, tl.getHalf2().getId());
}
// limits
if (l.getCurrentLimits1() != null) {
createLimitsIds(mapper, l.getCurrentLimits1(), l.getId(), "_1_");
}
if (l.getCurrentLimits2() != null) {
createLimitsIds(mapper, l.getCurrentLimits2(), l.getId(), "_2_");
}
}
}
代码示例来源:origin: itesla/ipst
LOGGER.trace("line not mapped, not in main component: {}", l.getId());
continue;
EsgBranchName ebname = new EsgBranchName(new Esg8charName(dictionary.getEsgId(bus1.getId())),
new Esg8charName(dictionary.getEsgId(bus2.getId())),
parallelIndexes.getParallelIndex(l.getId()));
dictionary.addIfNotExist(l.getId(), ebname.toString());
代码示例来源:origin: com.powsybl/powsybl-iidm-api
public BranchData(Line line, double epsilonX, boolean applyReactanceCorrection) {
Objects.requireNonNull(line);
id = line.getId();
代码示例来源:origin: itesla/ipst
if (l.getTerminal1().getBusView().getBus() != null &&
l.getTerminal2().getBusView().getBus() != null) {
String str = idL + l.getId();
numberBranchIdMap.put(branchNumber, str);
idBranchNumberMap.put(str, branchNumber);
l.getTerminal2().getBusView().getBus() != null) {
double zBase = Math.pow(l.getTerminal1().getBusView().getBus().getVoltageLevel().getNominalV(), 2) / baseMVA;
String nameBranch = idL + l.getId();
int numberBranch = idBranchNumberMap.get(nameBranch);
int tapBusNumber = idBusNumberMap.get(l.getTerminal1().getBusView().getBus().getId());
代码示例来源:origin: com.powsybl/powsybl-iidm-reducer
private void replaceLineByDanglingLine(Line line, VoltageLevel vl, Terminal terminal) {
Branch.Side side = line.getSide(terminal);
DanglingLineAdder dlAdder = vl.newDanglingLine()
.setId(line.getId())
.setName(line.getName())
.setR(line.getR() / 2)
.setX(line.getX() / 2)
.setB(side == Branch.Side.ONE ? line.getB1() : line.getB2())
.setG(side == Branch.Side.ONE ? line.getG1() : line.getG2())
.setP0(checkP(terminal))
.setQ0(checkQ(terminal));
fillNodeOrBus(dlAdder, terminal);
line.remove();
DanglingLine dl = dlAdder.add();
dl.getTerminal()
.setP(terminal.getP())
.setQ(terminal.getQ());
observers.forEach(o -> o.lineReplaced(line, dl));
}
代码示例来源:origin: itesla/ipst
LOGGER.warn("not in main component, skipping Line: {}", l.getId());
continue;
esgNetwork.addLine(createLine(l.getId(), bus1, bus2, l.getTerminal1().getVoltageLevel().getNominalV(),
l.getR(), l.getX(), g, b, parameters));
String fictionalShuntId = "FKSH" + l.getId();
addToDictionary(fictionalShuntId, dictionary, EurostagNamingStrategy.NameType.BANK);
if (status.equals(EsgBranchConnectionStatus.CLOSED_AT_BOTH_SIDE)) {
esgNetwork.addDissymmetricalBranch(createDissymmetricalBranch(l.getId(), bus1, bus2, l.getTerminal1().getVoltageLevel().getNominalV(),
l.getR(), l.getX(), l.getG1(), l.getB1(), l.getG2(), l.getB2(), parameters));
} else {
esgNetwork.addLine(createLine(l.getId(), bus1, bus2, l.getTerminal1().getVoltageLevel().getNominalV(),
l.getR(), l.getX(), (l.getG1() + l.getG2()) / 2, (l.getB1() + l.getB2()) / 2, parameters));
代码示例来源: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: com.powsybl/powsybl-ampl-converter
Bus bus2 = AmplUtil.getBus(t2);
if (bus1 != null && bus2 != null && bus1 == bus2) {
LOGGER.warn("Skipping line '{}' connected to the same bus at both sides", l.getId());
continue;
context.voltageLevelIdsToExport.add(vl1.getId());
context.voltageLevelIdsToExport.add(vl2.getId());
String id = l.getId();
int num = mapper.getInt(AmplSubset.BRANCH, id);
int vl1Num = mapper.getInt(AmplSubset.VOLTAGE_LEVEL, vl1.getId());
内容来源于网络,如有侵权,请联系作者删除!