本文整理了Java中com.powsybl.iidm.network.Network.getBusView()
方法的一些代码示例,展示了Network.getBusView()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Network.getBusView()
方法的具体详情如下:
包路径:com.powsybl.iidm.network.Network
类名称:Network
方法名:getBusView
[英]Get a bus view of the network.
[中]获取网络的总线视图。
代码示例来源:origin: com.powsybl/powsybl-ampl-converter
public AmplNetworkReader(ReadOnlyDataSource dataSource, Network network, int variantIndex, StringToIntMapper<AmplSubset> mapper) {
this.dataSource = dataSource;
this.network = network;
this.mapper = mapper;
this.buses = network.getBusView().getBusStream().collect(Collectors.toMap(Identifiable::getId, Function.identity()));
this.variantIndex = variantIndex;
}
代码示例来源:origin: com.powsybl/powsybl-ampl-converter
public static Iterable<Bus> getBuses(Network n) {
return n.getBusView().getBuses();
}
代码示例来源:origin: itesla/ipst
public static Iterable<Bus> getBuses(Network n, EurostagEchExportConfig config) {
if (config.isNoSwitch()) {
return n.getBusView().getBuses();
} else {
return n.getBusBreakerView().getBuses();
}
}
代码示例来源:origin: com.powsybl/powsybl-iidm-converter-api
static void addBusOfMainCC(Set<String> buses, Network n, ExportOptions options) {
// keep bus of main cc
if (options.getTopologyLevel() == TopologyLevel.BUS_BRANCH) {
for (Bus b : n.getBusView().getBuses()) {
if (b.isInMainConnectedComponent()) {
buses.add(b.getId());
}
}
} else {
for (Bus b : n.getBusBreakerView().getBuses()) {
if (b.isInMainConnectedComponent()) {
buses.add(b.getId());
}
}
}
}
代码示例来源:origin: com.powsybl/powsybl-iidm-api
public void write(OutputStream os) {
Graph graph = new Graph().id("\"" + network.getId() + "\"");
int maxCC = network.getBusView().getBusStream().mapToInt(b -> b.getConnectedComponent().getNum()).max().getAsInt();
String[] colors = Colors.generateColorScale(maxCC + 1);
Map<String, Node> nodes = new HashMap<>();
for (Bus b : network.getBusView().getBuses()) {
long load = Math.round(b.getLoadStream().mapToDouble(Load::getP0).sum());
long maxGeneration = Math.round(b.getGeneratorStream().mapToDouble(Generator::getMaxP).sum());
代码示例来源:origin: itesla/ipst
for (Bus b : n.getBusView().getBuses()) {
String str = b.getId();
numberBusIdMap.put(busNumber, str);
for (Bus b : n.getBusView().getBuses()) {
double zBase = Math.pow(b.getVoltageLevel().getNominalV(), 2) / baseMVA;
double baseKV = b.getVoltageLevel().getNominalV();
内容来源于网络,如有侵权,请联系作者删除!