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

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

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

Network.getSubstation介绍

[英]Get a substation.
[中]找个变电站。

代码示例

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

public VoltageLevelConversion(PropertyBag vl, Conversion.Context context) {
  super("VoltageLevel", vl, context);
  cgmesSubstationId = p.getId("Substation");
  iidmSubstationId = context.substationIdMapping().iidm(cgmesSubstationId);
  substation = context.network().getSubstation(iidmSubstationId);
}

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

public String substationNameEqContainer(PropertyBag p) {
  String eqcId = p.getId("EquipmentContainer");
  if (eqcId == null) {
    return null;
  }
  Substation substation = network.getSubstation(substationIdMapping().iidm(eqcId));
  if (substation != null) {
    return substation.getName();
  }
  return eqcId;
}

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

Substation substation() {
  String sid = terminals[0].t.substation();
  return context.network().getSubstation(context.substationIdMapping().iidm(sid));
}

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

public EquipmentTypes  equipmentType(String equipment) {
  if (network.getGenerator(equipment) != null) {
    return EquipmentTypes.GEN;
  }
  if (network.getLoad(equipment) != null) {
    return EquipmentTypes.LOAD;
  }
  if (network.getLine(equipment) != null) {
    return EquipmentTypes.LINE;
  }
  if (network.getTwoWindingsTransformer(equipment) != null) {
    return EquipmentTypes.TWOWINDTRASF;
  }
  if (network.getThreeWindingsTransformer(equipment) != null) {
    return EquipmentTypes.THREEWINDTRASF;
  }
  if (network.getVoltageLevel(equipment) != null) {
    return EquipmentTypes.VOLTAGELEVEL;
  }
  if (network.getShunt(equipment) != null) {
    return EquipmentTypes.SHUNT;
  }
  if (network.getSubstation(equipment) != null) {
    return EquipmentTypes.SUBSTATION;
  }
  logger.warn(" Type not found for equipment:" + equipment + " return NULL");
  return null;
}

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

substationName = newS.getName();
Substation substation = network.getSubstation(substationId);
if (substation == null) {
  LOGGER.trace("Create substation {}", substationId);

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

case SUBSTATION:
  logger.debug("  equipment == SUBSTATION");
  if (network.getSubstation(equipment).getTso() != null) {
    tsos.add(network.getSubstation(equipment).getTso());

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

@Override
  public void convert() {
    String subRegion = p.getId("SubRegion");
    String subRegionName = p.get("subRegionName");
    String regionName = p.get("regionName");

    Country country = CountryConversion.fromRegionName(regionName)
        .orElse(CountryConversion.fromSubregionName(subRegionName)
            .orElse(CountryConversion.defaultCountry()));
    String geo = subRegion;

    // TODO add naminStrategy (for regions and substations)
    // After applying naming strategy it is possible that two CGMES substations are mapped
    // to the same Network substation, so we should check if corresponding substation has
    // already been created
    String geoTag = context.namingStrategy().getGeographicalTag(geo);

    String iidmSubstationId = context.substationIdMapping().iidm(id);
    Substation substation = context.network().getSubstation(iidmSubstationId);
    assert substation == null;
    context.network().newSubstation()
        .setId(iidmSubstationId)
        .setName(iidmName())
        .setEnsureIdUnicity(false)
        .setCountry(country)
        .setGeographicalTags(geoTag)
        .add();
  }
}

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

network.setCaseDate(DateTime.parse("2018-01-01T11:00:00+01:00"));
network.getSubstation("P2").setCountry(Country.BE);

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

Network network = microBE(modelId);
VoltageLevel vlAnvers225 = network.getSubstation("_87f7002b-056f-4a6a-a872-1744eea757e3")
    .newVoltageLevel()
    .setId("_69ef0dbd-da79-4eef-a02f-690cb8a28361")

相关文章