From 74c79605b4411a6e1ddb50aa9f2a6476625fc91a Mon Sep 17 00:00:00 2001 From: vmouradian Date: Mon, 23 Dec 2024 15:55:51 +0100 Subject: [PATCH] change name parameter + add copyrigth/author Signed-off-by: vmouradian --- .../sa/extensions/ContingencyLoadFlowParameters.java | 2 +- .../ContingencyLoadFlowParametersJsonSerializer.java | 12 +++++++++++- .../OpenSecurityAnalysisExtensionsTest.java | 2 +- src/test/resources/contingencies.json | 2 +- 4 files changed, 14 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/powsybl/openloadflow/sa/extensions/ContingencyLoadFlowParameters.java b/src/main/java/com/powsybl/openloadflow/sa/extensions/ContingencyLoadFlowParameters.java index c9a17b3a43..4e16d472c2 100644 --- a/src/main/java/com/powsybl/openloadflow/sa/extensions/ContingencyLoadFlowParameters.java +++ b/src/main/java/com/powsybl/openloadflow/sa/extensions/ContingencyLoadFlowParameters.java @@ -30,7 +30,7 @@ public ContingencyLoadFlowParameters(boolean distributedSlack, boolean areaInter @Override public String getName() { - return "contingency-parameters"; + return "contingency-load-flow-parameters"; } public boolean isDistributedSlack() { diff --git a/src/main/java/com/powsybl/openloadflow/sa/extensions/ContingencyLoadFlowParametersJsonSerializer.java b/src/main/java/com/powsybl/openloadflow/sa/extensions/ContingencyLoadFlowParametersJsonSerializer.java index 80d8cc16af..85f4b3e3d3 100644 --- a/src/main/java/com/powsybl/openloadflow/sa/extensions/ContingencyLoadFlowParametersJsonSerializer.java +++ b/src/main/java/com/powsybl/openloadflow/sa/extensions/ContingencyLoadFlowParametersJsonSerializer.java @@ -1,3 +1,10 @@ +/** + * Copyright (c) 2024, Coreso SA (https://www.coreso.eu/) and TSCNET Services GmbH (https://www.tscnet.eu/) + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * SPDX-License-Identifier: MPL-2.0 + */ package com.powsybl.openloadflow.sa.extensions; import com.fasterxml.jackson.annotation.JsonIgnore; @@ -13,12 +20,15 @@ import java.io.IOException; +/** + * @author Valentin Mouradian {@literal } + */ @AutoService(ExtensionJsonSerializer.class) public class ContingencyLoadFlowParametersJsonSerializer implements ExtensionJsonSerializer { @Override public String getExtensionName() { - return "contingency-parameters"; + return "contingency-load-flow-parameters"; } @Override diff --git a/src/test/java/com/powsybl/openloadflow/sa/extensions/OpenSecurityAnalysisExtensionsTest.java b/src/test/java/com/powsybl/openloadflow/sa/extensions/OpenSecurityAnalysisExtensionsTest.java index 02257a0cbd..48239dad50 100644 --- a/src/test/java/com/powsybl/openloadflow/sa/extensions/OpenSecurityAnalysisExtensionsTest.java +++ b/src/test/java/com/powsybl/openloadflow/sa/extensions/OpenSecurityAnalysisExtensionsTest.java @@ -41,7 +41,7 @@ void testContingencyLoadFlowParametersExtension() { ContingencyLoadFlowParameters contingencyLoadFlowParameters = contingency.getExtension(ContingencyLoadFlowParameters.class); - assertEquals(contingencyLoadFlowParameters, contingency.getExtensionByName("contingency-parameters")); + assertEquals(contingencyLoadFlowParameters, contingency.getExtensionByName("contingency-load-flow-parameters")); assertFalse(contingencyLoadFlowParameters.isDistributedSlack()); assertTrue(contingencyLoadFlowParameters.isAreaInterchangeControl()); assertEquals(LoadFlowParameters.BalanceType.PROPORTIONAL_TO_LOAD, contingencyLoadFlowParameters.getBalanceType()); diff --git a/src/test/resources/contingencies.json b/src/test/resources/contingencies.json index 771a4c21e6..4b1a9ea4d8 100644 --- a/src/test/resources/contingencies.json +++ b/src/test/resources/contingencies.json @@ -5,7 +5,7 @@ "type" : "BRANCH" } ], "extensions" : { - "contingency-parameters" : { + "contingency-load-flow-parameters" : { "distributedSlack" : false, "areaInterchangeControl" : true, "balanceType" : "PROPORTIONAL_TO_LOAD"