private void createACDCVscConverters(EsgNetwork esgNetwork) {
for (HvdcLine hvdcLine : Identifiables.sort(network.getHvdcLines())) {
if (config.isExportMainCCOnly() && (!EchUtil.isInMainCc(hvdcLine.getConverterStation1(), config.isNoSwitch()) || !EchUtil.isInMainCc(hvdcLine.getConverterStation2(), config.isNoSwitch()))) {
LOGGER.warn("skipped HVDC line {}: at least one converter station is not in main component", hvdcLine.getId());
continue;
}
HvdcConverterStation convStation1 = hvdcLine.getConverterStation1();
HvdcConverterStation convStation2 = hvdcLine.getConverterStation2();
Esg8charName hvdcNodeName1 = new Esg8charName(addToDictionary("DC_" + convStation1.getId(), dictionary, EurostagNamingStrategy.NameType.NODE));
Esg8charName hvdcNodeName2 = new Esg8charName(addToDictionary("DC_" + convStation2.getId(), dictionary, EurostagNamingStrategy.NameType.NODE));
double dcVoltage = EchUtil.getHvdcLineDcVoltage(hvdcLine);
esgNetwork.addDCNode(new EsgDCNode(new Esg2charName("DC"), hvdcNodeName1, dcVoltage, 1));
esgNetwork.addDCNode(new EsgDCNode(new Esg2charName("DC"), hvdcNodeName2, dcVoltage, 1));
float r = 1.0f;
esgNetwork.addDCLink(new EsgDCLink(hvdcNodeName1, hvdcNodeName2, '1', r, EsgDCLink.LinkStatus.ON));
EsgACDCVscConverter esgConv1 = createACDCVscConverter(network.getVscConverterStation(convStation1.getId()), hvdcLine, hvdcNodeName1);
EsgACDCVscConverter esgConv2 = createACDCVscConverter(network.getVscConverterStation(convStation2.getId()), hvdcLine, hvdcNodeName2);
esgNetwork.addACDCVscConverter(esgConv1);
esgNetwork.addACDCVscConverter(esgConv2);
esgNetwork.addLoad(createConverterStationAdditionalLoad(hvdcLine, convStation1));
esgNetwork.addLoad(createConverterStationAdditionalLoad(hvdcLine, convStation2));
}
}