Skip to content

Commit

Permalink
Fix merge
Browse files Browse the repository at this point in the history
Signed-off-by: lisrte <[email protected]>
  • Loading branch information
Lisrte committed Jul 4, 2024
1 parent 61724d4 commit 2aa8922
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@
package com.powsybl.dynawaltz.models.automationsystems.phaseshifters;

import com.powsybl.commons.report.ReportNode;
import com.powsybl.dynawaltz.builders.BuilderReports;
import com.powsybl.dynawaltz.builders.ModelConfig;
import com.powsybl.dynawaltz.builders.ModelConfigs;
import com.powsybl.dynawaltz.builders.ModelConfigsHandler;
import com.powsybl.dynawaltz.builders.*;
import com.powsybl.dynawaltz.models.automationsystems.AbstractAutomationSystemModelBuilder;
import com.powsybl.iidm.network.Network;

Expand All @@ -33,21 +30,21 @@ public static PhaseShifterBlockingIAutomationSystemBuilder of(Network network, R
return new PhaseShifterBlockingIAutomationSystemBuilder(network, MODEL_CONFIGS.getDefaultModelConfig(), reportNode);
}

public static PhaseShifterBlockingIAutomationSystemBuilder of(Network network, String lib) {
return of(network, lib, ReportNode.NO_OP);
public static PhaseShifterBlockingIAutomationSystemBuilder of(Network network, String modelName) {
return of(network, modelName, ReportNode.NO_OP);
}

public static PhaseShifterBlockingIAutomationSystemBuilder of(Network network, String lib, ReportNode reportNode) {
ModelConfig modelConfig = MODEL_CONFIGS.getModelConfig(lib);
public static PhaseShifterBlockingIAutomationSystemBuilder of(Network network, String modelName, ReportNode reportNode) {
ModelConfig modelConfig = MODEL_CONFIGS.getModelConfig(modelName);
if (modelConfig == null) {
BuilderReports.reportLibNotFound(reportNode, PhaseShifterBlockingIAutomationSystemBuilder.class.getSimpleName(), lib);
BuilderReports.reportLibNotFound(reportNode, PhaseShifterBlockingIAutomationSystemBuilder.class.getSimpleName(), modelName);
return null;
}
return new PhaseShifterBlockingIAutomationSystemBuilder(network, modelConfig, reportNode);
}

public static Set<String> getSupportedLibs() {
return MODEL_CONFIGS.getSupportedLibs();
public static Set<ModelInfo> getSupportedModelInfos() {
return MODEL_CONFIGS.getModelInfos();
}

private String phaseShifterIDynamicId;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,21 +31,21 @@ public static BaseShuntBuilder of(Network network, ReportNode reportNode) {
return new BaseShuntBuilder(network, MODEL_CONFIGS.getDefaultModelConfig(), reportNode);
}

public static BaseShuntBuilder of(Network network, String lib) {
return of(network, lib, ReportNode.NO_OP);
public static BaseShuntBuilder of(Network network, String modelName) {
return of(network, modelName, ReportNode.NO_OP);
}

public static BaseShuntBuilder of(Network network, String lib, ReportNode reportNode) {
ModelConfig modelConfig = MODEL_CONFIGS.getModelConfig(lib);
public static BaseShuntBuilder of(Network network, String modelName, ReportNode reportNode) {
ModelConfig modelConfig = MODEL_CONFIGS.getModelConfig(modelName);
if (modelConfig == null) {
BuilderReports.reportLibNotFound(reportNode, BaseShuntBuilder.class.getSimpleName(), lib);
BuilderReports.reportLibNotFound(reportNode, BaseShuntBuilder.class.getSimpleName(), modelName);
return null;
}
return new BaseShuntBuilder(network, modelConfig, reportNode);
}

public static Set<String> getSupportedLibs() {
return MODEL_CONFIGS.getSupportedLibs();
public static Set<ModelInfo> getSupportedModelInfos() {
return MODEL_CONFIGS.getModelInfos();
}

protected BaseShuntBuilder(Network network, ModelConfig modelConfig, ReportNode reportNode) {
Expand Down

0 comments on commit 2aa8922

Please sign in to comment.