Skip to content
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
28 changes: 26 additions & 2 deletions src/main/java/org/gridsuite/network/map/NetworkMapController.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,14 @@
import io.swagger.v3.oas.annotations.responses.ApiResponses;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.AllArgsConstructor;
import org.gridsuite.network.map.dto.*;
import org.gridsuite.network.map.dto.AllElementsInfos;
import org.gridsuite.network.map.dto.ElementInfos;
import org.gridsuite.network.map.dto.ElementType;
import org.gridsuite.network.map.dto.InfoTypeParameters;
import org.gridsuite.network.map.dto.definition.hvdc.HvdcShuntCompensatorsInfos;
import org.gridsuite.network.map.dto.definition.topology.BusBarSectionsInfos;
import org.gridsuite.network.map.dto.definition.topology.FeederBaysBusBarSectionsInfos;
import org.gridsuite.network.map.dto.definition.topology.SwitchInfos;
import org.gridsuite.network.map.services.NetworkMapService;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.web.bind.annotation.*;
Expand Down Expand Up @@ -89,13 +95,31 @@ public List<ElementInfos> getVoltageLevelBusesOrBusBarSections(@Parameter(descri
return networkMapService.getVoltageLevelBusesOrBusbarSections(networkUuid, voltageLevelId, variantId);
}

@GetMapping(value = "/networks/{networkUuid}/voltage-levels/{voltageLevelId}/feeder-bays-and-bus-bar-sections", produces = APPLICATION_JSON_VALUE)
@Operation(summary = "get feeder bays and bus bar sections information")
@ApiResponses(value = {@ApiResponse(responseCode = "200", description = " feeder bays and bus bar sections information retrieved")})
public FeederBaysBusBarSectionsInfos getFeederBaysInfos(@Parameter(description = "Network UUID") @PathVariable("networkUuid") UUID networkUuid,
@Parameter(description = "Voltage level id") @PathVariable("voltageLevelId") String voltageLevelId,
@Parameter(description = "Variant Id") @RequestParam(name = "variantId", required = false) String variantId) {
return networkMapService.getFeederBaysInfos(networkUuid, voltageLevelId, variantId);
}

@GetMapping(value = "/networks/{networkUuid}/voltage-levels/{voltageLevelId}/bus-bar-sections", produces = APPLICATION_JSON_VALUE)
@Operation(summary = "get bus bar sections information")
@ApiResponses(value = {@ApiResponse(responseCode = "200", description = "bus bar sections information retrieved")})
public BusBarSectionsInfos getBusBarSectionsInfos(@Parameter(description = "Network UUID") @PathVariable("networkUuid") UUID networkUuid,
@Parameter(description = "Voltage level id") @PathVariable("voltageLevelId") String voltageLevelId,
@Parameter(description = "Variant Id") @RequestParam(name = "variantId", required = false) String variantId) {
return networkMapService.getBusBarSectionsInfos(networkUuid, voltageLevelId, variantId);
}

@GetMapping(value = "/networks/{networkUuid}/voltage-levels/{voltageLevelId}/switches", produces = APPLICATION_JSON_VALUE)
@Operation(summary = "Get switches description for a voltage level")
@ApiResponses(value = {@ApiResponse(responseCode = "200", description = "Switches description")})
public List<SwitchInfos> getVoltageLevelSwitches(@Parameter(description = "Network UUID") @PathVariable("networkUuid") UUID networkUuid,
@Parameter(description = "Voltage level id") @PathVariable("voltageLevelId") String voltageLevelId,
@Parameter(description = "Variant Id") @RequestParam(name = "variantId", required = false) String variantId) {
return networkMapService.getVoltageLevelSwitches(networkUuid, voltageLevelId, variantId);
return networkMapService.getSwitchInfos(networkUuid, voltageLevelId, variantId);
}

@GetMapping(value = "/networks/{networkUuid}/voltage-levels/{voltageLevelId}/substation-id", produces = APPLICATION_JSON_VALUE)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/**
* Copyright (c) 2025, 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.network.map.dto.definition.topology;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.powsybl.iidm.network.TopologyKind;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.SuperBuilder;

import java.util.List;
import java.util.Map;

/**
* @author Rehili Ghazwa <ghazwa.rehili at rte-france.com>
*/
@SuperBuilder
@Getter
@Setter
public class BusBarSectionsInfos {

@JsonInclude(JsonInclude.Include.NON_NULL)
private TopologyKind topologyKind;

@JsonInclude(JsonInclude.Include.NON_NULL)
private Boolean isSymmetrical;

@JsonInclude(JsonInclude.Include.NON_NULL)
Boolean isBusbarSectionPositionFound;

@JsonInclude(JsonInclude.Include.NON_NULL)
Map<String, List<String>> busBarSections;
}

Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* 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.network.map.dto.definition.voltagelevel;
package org.gridsuite.network.map.dto.definition.topology;

import com.powsybl.iidm.network.TwoSides;
import org.gridsuite.network.map.dto.definition.extension.ConnectablePositionInfos;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/**
* Copyright (c) 2025, 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.network.map.dto.definition.topology;

import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.SuperBuilder;

import java.util.List;
import java.util.Map;

/**
* @author Etienne Lesot <etienne.lesot at rte-france.com>
*/
@SuperBuilder
@Getter
@Setter
public class FeederBaysBusBarSectionsInfos {

@JsonInclude(JsonInclude.Include.NON_NULL)
private Map<String, List<FeederBayInfos>> feederBaysInfos;
@JsonInclude(JsonInclude.Include.NON_NULL)
private BusBarSectionsInfos busBarSectionsInfos;
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@
* 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.network.map.dto;
package org.gridsuite.network.map.dto.definition.topology;

import lombok.Getter;
import lombok.experimental.SuperBuilder;
import org.gridsuite.network.map.dto.ElementInfos;

/**
* @author Rehili Ghazwa <ghazwa.rehili at rte-france.com>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,38 +10,25 @@
import com.powsybl.iidm.network.SwitchKind;
import com.powsybl.iidm.network.TopologyKind;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.SuperBuilder;
import org.gridsuite.network.map.dto.ElementInfosWithProperties;
import org.gridsuite.network.map.dto.definition.extension.IdentifiableShortCircuitInfos;

import java.util.List;
import java.util.Map;
import java.util.Optional;

/**
* @author Slimane Amar <slimane.amar at rte-france.com>
*/
@SuperBuilder
@Getter
@Setter
public class VoltageLevelFormInfos extends ElementInfosWithProperties {

@JsonInclude(JsonInclude.Include.NON_NULL)
private TopologyKind topologyKind;

@JsonInclude(JsonInclude.Include.NON_NULL)
private String substationId;

private double nominalV;

@JsonInclude(JsonInclude.Include.NON_NULL)
private Double lowVoltageLimit;

@JsonInclude(JsonInclude.Include.NON_NULL)
private Double highVoltageLimit;

@JsonInclude(JsonInclude.Include.NON_ABSENT)
private Optional<IdentifiableShortCircuitInfos> identifiableShortCircuit;

@JsonInclude(JsonInclude.Include.NON_NULL)
private Integer busbarCount;

Expand All @@ -52,14 +39,19 @@ public class VoltageLevelFormInfos extends ElementInfosWithProperties {
private List<SwitchKind> switchKinds;

@JsonInclude(JsonInclude.Include.NON_NULL)
private Boolean isRetrievedBusbarSections;
private Boolean isSymmetrical;

@JsonInclude(JsonInclude.Include.NON_NULL)
private Boolean isBusbarSectionPositionFound;
private String substationId;

private double nominalV;

@JsonInclude(JsonInclude.Include.NON_NULL)
private Map<String, List<String>> busBarSectionInfos;
private Double lowVoltageLimit;

@JsonInclude(JsonInclude.Include.NON_NULL)
private Map<String, List<FeederBayInfos>> feederBaysInfos;
private Double highVoltageLimit;

@JsonInclude(JsonInclude.Include.NON_ABSENT)
private Optional<IdentifiableShortCircuitInfos> identifiableShortCircuit;
}
Loading