-
Notifications
You must be signed in to change notification settings - Fork 2
Collect contingency lists and filter names for SA and sensi parameters #967
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
Open
carojeandat
wants to merge
1
commit into
main
Choose a base branch
from
enrich-with-element-names
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
60 changes: 60 additions & 0 deletions
60
src/main/java/org/gridsuite/study/server/dto/EquipmentsContainer.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,60 @@ | ||
| /** | ||
| * Copyright (c) 2023, RTE (http://www.rte-france.com) | ||
| * 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/. | ||
| */ | ||
| package org.gridsuite.study.server.dto; | ||
|
|
||
| import com.fasterxml.jackson.annotation.JsonCreator; | ||
| import io.swagger.v3.oas.annotations.media.Schema; | ||
| import lombok.Getter; | ||
| import lombok.Setter; | ||
| import lombok.NoArgsConstructor; | ||
| import lombok.AllArgsConstructor; | ||
|
|
||
| import java.util.List; | ||
| import java.util.Map; | ||
| import java.util.UUID; | ||
|
|
||
| import static com.fasterxml.jackson.annotation.JsonCreator.Mode.DELEGATING; | ||
|
|
||
| /** | ||
| * @author Ghazwa Rehili <ghazwa.rehili at rte-france.com> | ||
| */ | ||
| @Getter | ||
| @Setter | ||
| @NoArgsConstructor | ||
| @AllArgsConstructor | ||
| public class EquipmentsContainer { | ||
|
|
||
| @Schema(description = "container id") | ||
| private UUID containerId; | ||
|
|
||
| @Schema(description = "container name") | ||
| private String containerName; | ||
|
|
||
| @JsonCreator(mode = DELEGATING) | ||
| public EquipmentsContainer(String containerId) { | ||
| this.containerId = UUID.fromString(containerId); | ||
| } | ||
|
|
||
| public static List<EquipmentsContainer> enrichEquipmentsContainer(List<UUID> containerIds, Map<UUID, String> containerNames) { | ||
| if (containerIds == null) { | ||
| return null; | ||
| } | ||
| return containerIds.stream() | ||
| .map(id -> new EquipmentsContainer(id, containerNames.get(id))) | ||
| .toList(); | ||
| } | ||
|
|
||
| public static List<UUID> getEquipmentsContainerUuids(List<EquipmentsContainer> containers) { | ||
| if (containers == null) { | ||
| return null; | ||
| } | ||
| return containers.stream() | ||
| .map(EquipmentsContainer::getContainerId) | ||
| .toList(); | ||
| } | ||
| } | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
src/main/java/org/gridsuite/study/server/dto/securityanalysis/ContingencyLists.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| /** | ||
| * Copyright (c) 2026, RTE (http://www.rte-france.com) | ||
| * 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/. | ||
| */ | ||
| package org.gridsuite.study.server.dto.securityanalysis; | ||
|
|
||
| import lombok.*; | ||
|
|
||
| import java.util.List; | ||
| import java.util.UUID; | ||
|
|
||
| /** | ||
| * @author Caroline Jeandat {@literal <caroline.jeandat at rte-france.com>} | ||
| */ | ||
| @Builder | ||
| @AllArgsConstructor | ||
| @NoArgsConstructor | ||
| @Getter | ||
| @Setter | ||
| public class ContingencyLists { | ||
| private List<UUID> contingencyLists; | ||
| private String description; | ||
| private boolean activated; | ||
| } |
26 changes: 26 additions & 0 deletions
26
src/main/java/org/gridsuite/study/server/dto/securityanalysis/ContingencyListsInfos.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| /** | ||
| * Copyright (c) 2026, RTE (http://www.rte-france.com) | ||
| * 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/. | ||
| */ | ||
| package org.gridsuite.study.server.dto.securityanalysis; | ||
|
|
||
| import lombok.*; | ||
| import org.gridsuite.study.server.dto.EquipmentsContainer; | ||
|
|
||
| import java.util.List; | ||
|
|
||
| /** | ||
| * @author Caroline Jeandat {@literal <caroline.jeandat at rte-france.com>} | ||
| */ | ||
| @Builder | ||
| @AllArgsConstructor | ||
| @NoArgsConstructor | ||
| @Getter | ||
| @Setter | ||
| public class ContingencyListsInfos { | ||
| private List<EquipmentsContainer> contingencyLists; | ||
| private String description; | ||
| private boolean activated; | ||
| } |
7 changes: 5 additions & 2 deletions
7
...er/dto/LimitReductionsByVoltageLevel.java → ...alysis/LimitReductionsByVoltageLevel.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
...main/java/org/gridsuite/study/server/dto/securityanalysis/SecurityAnalysisParameters.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| /** | ||
| * Copyright (c) 2026, RTE (http://www.rte-france.com) | ||
| * 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/. | ||
| */ | ||
| package org.gridsuite.study.server.dto.securityanalysis; | ||
|
|
||
| import lombok.AllArgsConstructor; | ||
| import lombok.Builder; | ||
| import lombok.Getter; | ||
| import lombok.NoArgsConstructor; | ||
|
|
||
| import java.util.List; | ||
|
|
||
| /** | ||
| * @author Caroline Jeandat {@literal <caroline.jeandat at rte-france.com>} | ||
| */ | ||
| @NoArgsConstructor | ||
| @AllArgsConstructor | ||
| @Getter | ||
| @Builder | ||
| public class SecurityAnalysisParameters { | ||
| private String provider; | ||
|
|
||
| private double lowVoltageAbsoluteThreshold; | ||
|
|
||
| private double lowVoltageProportionalThreshold; | ||
|
|
||
| private double highVoltageAbsoluteThreshold; | ||
|
|
||
| private double highVoltageProportionalThreshold; | ||
|
|
||
| private double flowProportionalThreshold; | ||
|
|
||
| private List<ContingencyLists> contingencyListsInfos; | ||
|
|
||
| private List<LimitReductionsByVoltageLevel> limitReductions; | ||
| } |
39 changes: 39 additions & 0 deletions
39
...java/org/gridsuite/study/server/dto/securityanalysis/SecurityAnalysisParametersInfos.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| /** | ||
| * Copyright (c) 2026, RTE (http://www.rte-france.com) | ||
| * 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/. | ||
| */ | ||
| package org.gridsuite.study.server.dto.securityanalysis; | ||
|
|
||
| import lombok.AllArgsConstructor; | ||
| import lombok.Builder; | ||
| import lombok.Getter; | ||
| import lombok.NoArgsConstructor; | ||
|
|
||
| import java.util.List; | ||
|
|
||
| /** | ||
| * @author Caroline Jeandat {@literal <caroline.jeandat at rte-france.com>} | ||
| */ | ||
| @NoArgsConstructor | ||
| @AllArgsConstructor | ||
| @Getter | ||
| @Builder | ||
| public class SecurityAnalysisParametersInfos { | ||
| private String provider; | ||
|
|
||
| private double lowVoltageAbsoluteThreshold; | ||
|
|
||
| private double lowVoltageProportionalThreshold; | ||
|
|
||
| private double highVoltageAbsoluteThreshold; | ||
|
|
||
| private double highVoltageProportionalThreshold; | ||
|
|
||
| private double flowProportionalThreshold; | ||
|
|
||
| private List<ContingencyListsInfos> contingencyListsInfos; | ||
|
|
||
| private List<LimitReductionsByVoltageLevel> limitReductions; | ||
| } |
17 changes: 17 additions & 0 deletions
17
src/main/java/org/gridsuite/study/server/dto/sensianalysis/DistributionType.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| /** | ||
| * Copyright (c) 2026, RTE (http://www.rte-france.com) | ||
| * 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/. | ||
| */ | ||
| package org.gridsuite.study.server.dto.sensianalysis; | ||
|
|
||
| /** | ||
| * @author Caroline Jeandat {@literal <caroline.jeandat at rte-france.com>} | ||
| */ | ||
| public enum DistributionType { | ||
| PROPORTIONAL, | ||
| PROPORTIONAL_MAXP, | ||
| REGULAR, | ||
| VENTILATION | ||
| } |
33 changes: 33 additions & 0 deletions
33
...main/java/org/gridsuite/study/server/dto/sensianalysis/SensitivityAnalysisParameters.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| /** | ||
| * Copyright (c) 2026, RTE (http://www.rte-france.com) | ||
| * 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/. | ||
| */ | ||
| package org.gridsuite.study.server.dto.sensianalysis; | ||
|
|
||
| import lombok.Builder; | ||
| import lombok.Getter; | ||
| import lombok.Setter; | ||
|
|
||
| import java.util.List; | ||
| import java.util.UUID; | ||
|
|
||
| /** | ||
| * @author Caroline Jeandat {@literal <caroline.jeandat at rte-france.com>} | ||
| */ | ||
| @Getter | ||
| @Setter | ||
| @Builder | ||
| public class SensitivityAnalysisParameters { | ||
| private String provider; | ||
| private UUID uuid; | ||
| private double flowFlowSensitivityValueThreshold; | ||
| private double angleFlowSensitivityValueThreshold; | ||
| private double flowVoltageSensitivityValueThreshold; | ||
| List<SensitivityInjectionsSet> sensitivityInjectionsSet; | ||
| List<SensitivityInjection> sensitivityInjection; | ||
| List<SensitivityHVDC> sensitivityHVDC; | ||
| List<SensitivityPST> sensitivityPST; | ||
| List<SensitivityNodes> sensitivityNodes; | ||
| } |
35 changes: 35 additions & 0 deletions
35
...java/org/gridsuite/study/server/dto/sensianalysis/SensitivityAnalysisParametersInfos.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| /** | ||
| * Copyright (c) 2026, RTE (http://www.rte-france.com) | ||
| * 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/. | ||
| */ | ||
| package org.gridsuite.study.server.dto.sensianalysis; | ||
|
|
||
| import lombok.Builder; | ||
| import lombok.Getter; | ||
| import lombok.Setter; | ||
|
|
||
| import java.util.List; | ||
| import java.util.UUID; | ||
|
|
||
| /** | ||
| * @author Caroline Jeandat {@literal <caroline.jeandat at rte-france.com>} | ||
| */ | ||
| @Getter | ||
| @Setter | ||
| @Builder | ||
| public class SensitivityAnalysisParametersInfos { | ||
| private String provider; | ||
| private UUID uuid; | ||
| private double flowFlowSensitivityValueThreshold; | ||
| private double angleFlowSensitivityValueThreshold; | ||
| private double flowVoltageSensitivityValueThreshold; | ||
| List<SensitivityInjectionsSetInfos> sensitivityInjectionsSet; | ||
| List<SensitivityInjectionInfos> sensitivityInjection; | ||
| List<SensitivityHvdcInfos> sensitivityHVDC; | ||
| List<SensitivityPstInfos> sensitivityPST; | ||
| List<SensitivityNodesInfos> sensitivityNodes; | ||
|
|
||
|
|
||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the following 2 endpoints are used in explore-app