com.powsybl.iidm.network.Network.getSubstations()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(1.4k)|赞(0)|评价(0)|浏览(120)

本文整理了Java中com.powsybl.iidm.network.Network.getSubstations()方法的一些代码示例,展示了Network.getSubstations()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Network.getSubstations()方法的具体详情如下:
包路径:com.powsybl.iidm.network.Network
类名称:Network
方法名:getSubstations

Network.getSubstations介绍

[英]Get all substations.
[中]把所有的变电站都接过来。

代码示例

代码示例来源:origin: com.powsybl/powsybl-afs-core

@Before
public void setup() throws IOException {
  network = Mockito.mock(Network.class);
  Substation s = Mockito.mock(Substation.class);
  Mockito.when(s.getId()).thenReturn("s1");
  Mockito.when(network.getSubstations()).thenReturn(Collections.singletonList(s));
  ComputationManager computationManager = Mockito.mock(ComputationManager.class);
  storage = createStorage();
  afs = new AppFileSystem("mem", false, storage);
  ad = new AppData(computationManager, computationManager,
           Collections.singletonList(computationManager1 -> Collections.singletonList(afs)),
           getFileExtensions(),
           getProjectFileExtensions(),
           getServiceExtensions());
  afs.setData(ad);
}

代码示例来源:origin: com.powsybl/powsybl-iidm-xml-converter

Anonymizer anonymizer = options.isAnonymized() ? new SimpleAnonymizer() : null;
NetworkXmlWriterContext context = new NetworkXmlWriterContext(anonymizer, writer, options, filter);
for (Substation s : n.getSubstations()) {
  SubstationXml.INSTANCE.write(s, null, context);

代码示例来源:origin: itesla/ipst

for (Substation ss : n.getSubstations()) {

相关文章