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

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

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

Network.getSwitch介绍

[英]Get a switch from its id.
[中]从其id获取一个开关。

代码示例

代码示例来源:origin: com.powsybl/powsybl-action-util

@Override
  public void modify(Network network, ComputationManager computationManager) {
    Switch sw = network.getSwitch(switchId);
    if (sw == null) {
      throw new PowsyblException("Switch '" + switchId + "' not found");
    }
    sw.setOpen(false);
  }
}

代码示例来源:origin: com.powsybl/powsybl-action-util

@Override
  public void modify(Network network, ComputationManager computationManager) {
    Switch sw = network.getSwitch(switchId);
    if (sw == null) {
      throw new PowsyblException("Switch '" + switchId + "' not found");
    }
    sw.setOpen(true);
  }
}

代码示例来源:origin: com.powsybl/powsybl-cgmes-conversion

public OperationalLimitConversion(PropertyBag l, Conversion.Context context) {
  super("OperationalLimitSet", l, context);
  // Limit can associated to a Terminal or to an Equipment
  terminalId = l.getId("Terminal");
  if (terminalId != null) {
    terminal = context.terminalMapping().find(terminalId);
  }
  equipmentId = l.getId("Equipment");
  if (equipmentId != null) {
    // The equipment may be a Branch, a Dangling line, a Switch ...
    branch = context.network().getBranch(equipmentId);
    if (branch == null) {
      danglingLine = context.network().getDanglingLine(equipmentId);
      if (danglingLine == null) {
        aswitch = context.network().getSwitch(equipmentId);
      }
    }
  }
}

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

Switch sw = network.getSwitch(switchId);
if (sw != null) {
  if (swOp.getAction().equals("opening")) {

相关文章