本文整理了Java中com.powsybl.iidm.network.Branch.getId()
方法的一些代码示例,展示了Branch.getId()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Branch.getId()
方法的具体详情如下:
包路径:com.powsybl.iidm.network.Branch
类名称:Branch
方法名:getId
暂无
代码示例来源:origin: itesla/ipst
public static LinkedHashMap<String, Double> getBranchesData(Network network) {
LinkedHashMap<String, Double> branchesData = new LinkedHashMap<>();
network.getBranchStream().forEach(branch -> {
addBranchSideData(branchesData, branch.getId(), branch.getTerminal1(), branch.getCurrentLimits1() == null ? Double.NaN : branch.getCurrentLimits1().getPermanentLimit());
addBranchSideData(branchesData, branch.getId(), branch.getTerminal2(), branch.getCurrentLimits2() == null ? Double.NaN : branch.getCurrentLimits2().getPermanentLimit());
});
return branchesData;
}
代码示例来源:origin: com.powsybl/powsybl-security-analysis-api
private void checkPermanentLimit(Branch branch, Branch.Side side, double value, Consumer<LimitViolation> consumer) {
if (LimitViolationUtils.checkPermanentLimit(branch, side, limitReduction, value)) {
consumer.accept(new LimitViolation(branch.getId(),
branch.getName(),
LimitViolationType.CURRENT,
null,
Integer.MAX_VALUE,
branch.getCurrentLimits(side).getPermanentLimit(),
limitReduction,
value,
side));
}
}
代码示例来源:origin: itesla/ipst
UniqueTopology topo1 = uniqueTopos.get(branch.getTerminal1().getVoltageLevel().getId());
UniqueTopology topo2 = uniqueTopos.get(branch.getTerminal2().getVoltageLevel().getId());
if (!topo1.containsEquipment(branch.getId()) && !topo2.containsEquipment(branch.getId())) {
if (branch.getId().contains(TopologyHistory.FICTIVE_PATTERN)) {
fictiveEquipmentsRemoved.add(branch.getId());
} else {
equipmentsRemoved.add(branch.getId());
代码示例来源:origin: itesla/ipst
LOGGER.info("#------------------------ --------------- --------------- --------------- --------------- ");
for (Branch trafo : network.getTwoWindingsTransformers()) {
LOGGER.info(String.format("%s %15.8f %15.8f %15.8f %15.8f", trafo.getId(), trafo.getTerminal1().getQ(), trafo.getTerminal2().getQ(), trafo.getTerminal1().getP(), trafo.getTerminal2().getP()));
代码示例来源:origin: com.powsybl/powsybl-security-analysis-api
@Override
public void checkCurrent(Branch branch, Branch.Side side, double value, Consumer<LimitViolation> consumer) {
Branch.Overload overload = LimitViolationUtils.checkTemporaryLimits(branch, side, limitReduction, value);
if (currentLimitTypes.contains(Security.CurrentLimitType.TATL) && (overload != null)) {
consumer.accept(new LimitViolation(branch.getId(),
branch.getName(),
LimitViolationType.CURRENT,
overload.getPreviousLimitName(),
overload.getTemporaryLimit().getAcceptableDuration(),
overload.getPreviousLimit(),
limitReduction,
branch.getTerminal(side).getI(),
side));
} else if (currentLimitTypes.contains(Security.CurrentLimitType.PATL)) {
checkPermanentLimit(branch, side, value, consumer);
}
}
代码示例来源:origin: itesla/ipst
valueMap.put(new HistoDbNetworkAttributeId(branch.getId(), t.getVoltageLevel().getId(), HistoDbAttr.P), context.p);
valueMap.put(new HistoDbNetworkAttributeId(branch.getId(), t.getVoltageLevel().getId(), HistoDbAttr.Q), context.q);
valueMap.put(new HistoDbNetworkAttributeId(branch.getId(), t.getVoltageLevel().getId(), HistoDbAttr.V), context.v);
valueMap.put(new HistoDbNetworkAttributeId(branch.getId(), t.getVoltageLevel().getId(), HistoDbAttr.I), context.i);
代码示例来源:origin: com.powsybl/powsybl-ampl-converter
private void writeBranchCurrentLimits(TableFormatter formatter) throws IOException {
for (Branch branch : network.getBranches()) {
String branchId = branch.getId();
if (branch.getCurrentLimits1() != null) {
writeTemporaryCurrentLimits(branch.getCurrentLimits1(), formatter, branchId, true, "_1_");
}
if (branch.getCurrentLimits2() != null) {
writeTemporaryCurrentLimits(branch.getCurrentLimits2(), formatter, branchId, false, "_2_");
}
}
}
代码示例来源:origin: itesla/ipst
private static void dumpLimits(EurostagDictionary dictionary, BufferedWriter writer, Branch branch) throws IOException {
dumpLimits(dictionary, writer, branch.getId(),
branch.getCurrentLimits1(),
branch.getCurrentLimits2(),
branch.getTerminal1().getVoltageLevel().getNominalV(),
branch.getTerminal2().getVoltageLevel().getNominalV());
}
代码示例来源:origin: itesla/ipst
LOGGER.debug("State {}: changing current limit 1 of branch {}: {} -> {}",
stateId,
branch.getId(),
violation.getLimit(),
newLimit);
LOGGER.debug("State {}: changing current limit 1 of branch {}: {} -> {}",
StateManagerConstants.INITIAL_STATE_ID,
branch.getId(),
violation.getLimit(),
newLimit);
LOGGER.debug("State {}: changing current limit 2 of branch {}: {} -> {}",
stateId,
branch.getId(),
violation.getLimit(),
newLimit);
LOGGER.debug("State {}: changing current limit 2 of branch {}: {} -> {}",
StateManagerConstants.INITIAL_STATE_ID,
branch.getId(),
violation.getLimit(),
newLimit);
代码示例来源:origin: itesla/ipst
nodeName2 = parseName(bus2.getId());
String branchName = parseName(branch.getId()); //CIM ID
代码示例来源:origin: itesla/ipst
if (equipIds != null && !equipIds.contains(l.getId())) {
continue;
&& (countries == null || countries.contains(
l.getTerminal1().getVoltageLevel().getSubstation().getCountry().toString()))) {
String terminalId = l.getId() + "__TO__" + l.getTerminal1().getVoltageLevel().getId();
if (measureTypes == null || measureTypes.contains("P")) {
attributes.add(new Attribute(terminalId + "_P"));
&& (countries == null || countries.contains(
l.getTerminal2().getVoltageLevel().getSubstation().getCountry().toString()))) {
String terminalId = l.getId() + "__TO__" + l.getTerminal2().getVoltageLevel().getId();
if (measureTypes == null || measureTypes.contains("P")) {
attributes.add(new Attribute(terminalId + "_P"));
代码示例来源:origin: com.powsybl/powsybl-iidm-reducer
private Load replaceBranchByLoad(Branch<?> branch, VoltageLevel vl, Terminal terminal) {
LoadAdder loadAdder = vl.newLoad()
.setId(branch.getId())
.setName(branch.getName())
.setLoadType(LoadType.FICTITIOUS)
.setP0(checkP(terminal))
.setQ0(checkQ(terminal));
fillNodeOrBus(loadAdder, terminal);
branch.remove();
Load load = loadAdder.add();
load.getTerminal()
.setP(terminal.getP())
.setQ(terminal.getQ());
return load;
}
内容来源于网络,如有侵权,请联系作者删除!