Closed VeikoAunapuu closed 4 days ago
if #125 is solved then pypowsybl ver 1.6.0 can solve this issue (maybe need to check duplicate values). Update: still an issue over there: for one boundary node between two igms it gives two separate sets values (probably calculated from each igm side).
In newer version it iterates over the dangling lines to get the voltage values
private static void writeVoltagesForBoundaryNodes(Network network, String cimNamespace, XMLStreamWriter writer, CgmesExportContext context) throws XMLStreamException {
for (DanglingLine dl : network.getDanglingLines(DanglingLineFilter.ALL)) {
Bus b = dl.getTerminal().getBusView().getBus();
String topologicalNode = dl.getProperty(Conversion.CGMES_PREFIX_ALIAS_PROPERTIES + CgmesNames.TOPOLOGICAL_NODE_BOUNDARY);
if (topologicalNode != null) {
if (dl.hasProperty("v") && dl.hasProperty("angle")) {
writeVoltage(topologicalNode, Double.parseDouble(dl.getProperty("v", "NaN")), Double.parseDouble(dl.getProperty("angle", "NaN")), cimNamespace, writer, context);
} else if (b != null) {
writeVoltage(topologicalNode, dl.getBoundary().getV(), dl.getBoundary().getAngle(), cimNamespace, writer, context);
} else {
writeVoltage(topologicalNode, 0.0, 0.0, cimNamespace, writer, context);
}
}
}
}
in powsybl-core/cgmes/cgmes-conversion/src/main/java/com/powsybl/cgmes/conversion/export/StateVariablesExport.java
Quick Fix, drop one of the boundary SV results in post processing.
TODO - @mr0321 please reports this issue to Powsybl project
It seems that this is an intentional behaviour: If two dangling lines with the same Xnode are in the same geographical region in a CGMES file, they are not merged #2389
Possible fix