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

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

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

Load.getP0介绍

[英]Get the constant active power in MW.

Depends on the working variant.
[中]获得恒定有功功率,单位为MW。
取决于工作变量。

代码示例

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

@Override
public double getP() {
  return load.getP0();
}

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

private static void addLoads(Network network, ConnectedPower balanceMainCC, ConnectedPower balanceOtherCC) {
  for (Load l : network.getLoads()) {
    Terminal.BusBreakerView view = l.getTerminal().getBusBreakerView();
    if (view.getBus() != null) {
      if (view.getBus().isInMainConnectedComponent()) {
        balanceMainCC.connectedLoads.add(l.getId());
        balanceMainCC.connectedLoadVolume += l.getP0();
      } else {
        balanceOtherCC.connectedLoads.add(l.getId());
        balanceOtherCC.connectedLoadVolume += l.getP0();
      }
    } else {
      if (view.getConnectableBus().isInMainConnectedComponent()) {
        balanceMainCC.disconnectedLoads.add(l.getId());
        balanceMainCC.disconnectedLoadVolume += l.getP0();
      } else {
        balanceOtherCC.disconnectedLoads.add(l.getId());
        balanceOtherCC.disconnectedLoadVolume += l.getP0();
      }
    }
  }
}

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

double boundariesQ = 0.0;
for (Load l : network.getLoads()) {
  if (l.getP0() > 0) {
    loadPositiveP += l.getP0();
  } else {
    loadNegativeP += l.getP0();

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

public Double getP(String equipment) {
  logger.debug("  network " + network.getName()  + " equipment: " + equipment);
  Double returnValue = null;
  EquipmentTypes     eqType = equipmentType(equipment);
  if (eqType != null) {
    switch (eqType) {
      case GEN:
        logger.debug("  equipment == generator");
        returnValue = network.getGenerator(equipment).getTerminal().getP();
        break;
      case LOAD:
        logger.debug("  equipment == load");
        returnValue = network.getLoad(equipment).getP0();
        break;
      case LINE:
        logger.debug(" equipment == line");
        if (network.getLine(equipment).getTerminal1() != null) {
          returnValue = network.getLine(equipment).getTerminal1().getP();
        }
        if (network.getLine(equipment).getTerminal2() != null) {
          returnValue = network.getLine(equipment).getTerminal2().getP();
        }
        break;
    }
  }
  if (returnValue != null) {
    logger.debug(" RETURN P: " + returnValue + " for Network: " + network.getName() + " Equipment: " + equipment);
  }
  return returnValue;
}

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

@Override
protected void writeRootElementAttributes(Load l, VoltageLevel vl, NetworkXmlWriterContext context) throws XMLStreamException {
  context.getWriter().writeAttribute("loadType", l.getLoadType().name());
  XmlUtil.writeDouble("p0", l.getP0(), context.getWriter());
  XmlUtil.writeDouble("q0", l.getQ0(), context.getWriter());
  writeNodeOrBus(null, l.getTerminal(), context);
  writePQ(null, l.getTerminal(), context.getWriter());
}

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

throw new RuntimeException("Load '" + ls.id + "' not found");
double oldP0 = l.getP0();
double oldQ0 = l.getQ0();
LOGGER.trace(" load {} - P:{}, Q:{} -> P:{}, Q:{} ", l.getId(), oldP0, oldQ0, ls.p, ls.q);

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

StateVariable hlSvAux = fct.apply(new StateVariable(-aux.getP0(), -aux.getQ0(), v, a));
    aux.getId(), aux.getP0(), newP0, aux.getQ0(), newQ0);

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

public LoadRecord(Load load, ConnectBusInfo busInfo, double snref, SourceEngine sourceEngine) {
  this.load = load;
  this.busInfo = busInfo;
  this.loadId = load.getId();
  this.busConnected = busInfo.isConnected();
  this.p0 = this.load.getP0();
  this.q0 = this.load.getQ0();
  this.busVoltage = Double.NaN;
  this.busAngle = Double.NaN;
  this.sourceEngine = sourceEngine;
  if (this.busConnected) {
    if (load.getTerminal().getBusView().getBus() != null) {
      if (!Double.isNaN(load.getTerminal().getBusView().getBus().getV())) {
        busVoltage = load.getTerminal().getBusView().getBus().getV() / load.getTerminal().getVoltageLevel().getNominalV();
      }
      if (!Double.isNaN(load.getTerminal().getBusView().getBus().getAngle())) {
        busAngle = load.getTerminal().getBusView().getBus().getAngle();
      }
    }
    addLfParameters();
  } else {
    LOGGER.warn("Load " + this.getModelicaName() + " disconnected.");
    this.addValue(StaticData.COMMENT + " Load " + this.getModelicaName() + " disconnected.");
  }
  if (this.busVoltage == 0) {
    LOGGER.info("Voltage 0");
  }
}

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

private void createLoads(EsgNetwork esgNetwork) {
  for (Load l : Identifiables.sort(network.getLoads())) {
    // skip loads not in the main connected component
    if (config.isExportMainCCOnly() && !EchUtil.isInMainCc(l, config.isNoSwitch())) {
      LOGGER.warn("not in main component, skipping Load: {}", l.getId());
      continue;
    }
    ConnectionBus bus = ConnectionBus.fromTerminal(l.getTerminal(), config, fakeNodes);
    esgNetwork.addLoad(createLoad(bus, l.getId(), l.getP0(), l.getQ0()));
  }
  for (DanglingLine dl : Identifiables.sort(network.getDanglingLines())) {
    // skip dls not in the main connected component
    if (config.isExportMainCCOnly() && !EchUtil.isInMainCc(dl, config.isNoSwitch())) {
      LOGGER.warn("not in main component, skipping DanglingLine: {}", dl.getId());
      continue;
    }
    ConnectionBus bus = new ConnectionBus(true, EchUtil.getBusId(dl));
    esgNetwork.addLoad(createLoad(bus, EchUtil.getLoadId(dl), dl.getP0(), dl.getQ0()));
  }
}

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

Load load = itrL.next();
System.out.println(" Load id: " + load.getId());
loadMW += load.getP0();
loadMVAR += load.getQ0();
if (uncertainties != null) {

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

.writeCell(busNum)
.writeCell(vlNum)
.writeCell(l.getP0())
.writeCell(l.getQ0())
.writeCell(faultNum)

相关文章