Skip to content

Commit

Permalink
Rework writing of RatioTapChanger.tculControlMode
Browse files Browse the repository at this point in the history
Signed-off-by: Romain Courtier <[email protected]>
  • Loading branch information
rcourtier committed Feb 18, 2025
1 parent 04eff99 commit daf7dcf
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public static void writeRatio(String id, String tapChangerName, String transform
writer.writeCharacters(CgmesExportUtil.format(stepVoltageIncrement));
writer.writeEndElement();
writeSteps(lowStep, highStep, neutralStep, normalStep, neutralU, ltcFlag, cimNamespace, writer);
if (context.getCim().writeTculControlMode()) {
if (context.getCimVersion() <= 16) {
writer.writeEmptyElement(cimNamespace, "RatioTapChanger.tculControlMode");
writer.writeAttribute(RDF_NAMESPACE, CgmesNames.RESOURCE, String.format("%s%s.%s", cimNamespace, "TransformerControlMode", controlMode));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,6 @@ public interface Cim {
String getEuNamespace();

boolean writeConnectivityNodes();

boolean writeTculControlMode();
}

private abstract static class AbstractCim implements Cim {
Expand Down Expand Up @@ -151,11 +149,6 @@ public boolean writeConnectivityNodes() {
return false;
}

@Override
public boolean writeTculControlMode() {
return true;
}

private Cim14() {
super(14, CIM_14_NAMESPACE);
}
Expand Down Expand Up @@ -212,11 +205,6 @@ public boolean writeConnectivityNodes() {
return false;
}

@Override
public boolean writeTculControlMode() {
return true;
}

private Cim16() {
super(16, CIM_16_NAMESPACE, "entsoe", ENTSOE_NAMESPACE,
Map.of("EQ", CIM_16_EQ_PROFILE, "EQ_OP",
Expand All @@ -233,11 +221,6 @@ public boolean writeConnectivityNodes() {
return true;
}

@Override
public boolean writeTculControlMode() {
return false;
}

private Cim100() {
super(100, CIM_100_NAMESPACE, "eu", EU_NAMESPACE,
Map.of("EQ", CIM_100_EQ_PROFILE, "EQ_OP", CIM_100_EQ_OPERATION_PROFILE,
Expand Down

0 comments on commit daf7dcf

Please sign in to comment.