Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix hvdcAcEmulation option loading from a yaml config file #2966

Merged
merged 1 commit into from
Apr 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ protected static void load(LoadFlowParameters parameters, PlatformConfig platfor
parameters.setDcUseTransformerRatio(config.getBooleanProperty("dcUseTransformerRatio", DEFAULT_DC_USE_TRANSFORMER_RATIO_DEFAULT));
parameters.setCountriesToBalance(config.getEnumSetProperty("countriesToBalance", Country.class, DEFAULT_COUNTRIES_TO_BALANCE));
parameters.setConnectedComponentMode(config.getEnumProperty("connectedComponentMode", ConnectedComponentMode.class, DEFAULT_CONNECTED_COMPONENT_MODE));
parameters.setHvdcAcEmulation(config.getBooleanProperty("hvdcAcEmulation", DEFAULT_HVDC_AC_EMULATION_ON));
parameters.setDcPowerFactor(config.getDoubleProperty("dcPowerFactor", DEFAULT_DC_POWER_FACTOR));
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ void checkConfig() {
boolean dcUseTransformerRatio = true;
Set<Country> countriesToBalance = new HashSet<>();
LoadFlowParameters.ConnectedComponentMode computedConnectedComponent = LoadFlowParameters.ConnectedComponentMode.MAIN;
boolean hvdcAcEmulation = true;
boolean hvdcAcEmulation = false;

MapModuleConfig moduleConfig = platformConfig.createModuleConfig("load-flow-default-parameters");
moduleConfig.setStringProperty("voltageInitMode", "UNIFORM_VALUES");
Expand Down Expand Up @@ -294,7 +294,7 @@ void checkClone() {
boolean dcUseTransformerRatio = true;
Set<Country> countriesToBalance = new HashSet<>();
LoadFlowParameters.ConnectedComponentMode computedConnectedComponent = LoadFlowParameters.ConnectedComponentMode.MAIN;
boolean hvdcAcEmulation = true;
boolean hvdcAcEmulation = false;
LoadFlowParameters parameters = new LoadFlowParameters()
.setVoltageInitMode(voltageInitMode)
.setTransformerVoltageControlOn(transformerVoltageControlOn)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ void readJsonVersion16() {
void readJsonVersion17() {
LoadFlowParameters parameters = JsonLoadFlowParameters
.read(getClass().getResourceAsStream("/LoadFlowParametersVersion17.json"));
assertTrue(parameters.isHvdcAcEmulation());
assertFalse(parameters.isHvdcAcEmulation());
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@
"dcUseTransformerRatio" : true,
"countriesToBalance" : [ "FR" , "KI" ],
"connectedComponentMode" : "MAIN",
"hvdcAcEmulation" : true
"hvdcAcEmulation" : false
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@
"dcUseTransformerRatio" : true,
"countriesToBalance" : [ "FR" , "KI" ],
"connectedComponentMode" : "MAIN",
"hvdcAcEmulation" : true
"hvdcAcEmulation" : false
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@
"dcUseTransformerRatio" : true,
"countriesToBalance" : [ "FR" , "KI" ],
"connectedComponentMode" : "MAIN",
"hvdcAcEmulation" : true,
"hvdcAcEmulation" : false,
"dcPowerFactor": 0.8
}