-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Rehili Ghazwa <[email protected]>
- Loading branch information
1 parent
8112014
commit da0b580
Showing
9 changed files
with
674 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
This file contains 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
53 changes: 53 additions & 0 deletions
53
src/main/java/org/gridsuite/modification/dto/LccConverterStationCreationInfos.java
This file contains 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,53 @@ | ||
/** | ||
* Copyright (c) 2024, 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.modification.dto; | ||
|
||
import com.fasterxml.jackson.annotation.JsonInclude; | ||
import com.fasterxml.jackson.annotation.JsonTypeName; | ||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import lombok.*; | ||
import lombok.experimental.SuperBuilder; | ||
import org.gridsuite.modification.dto.annotation.ModificationErrorTypeName; | ||
|
||
import java.util.List; | ||
|
||
/** | ||
* @author Ghazwa Rehili <ghazwa.rehili at rte-france.com> | ||
*/ | ||
|
||
@SuperBuilder | ||
@NoArgsConstructor | ||
@Getter | ||
@Setter | ||
@ToString(callSuper = true) | ||
@Schema(description = "Lcc converter station creation") | ||
@JsonTypeName("LCC_CONVERTER_STATION_CREATION") | ||
@ModificationErrorTypeName("LCC_CREATE_CONVERTER_STATION_ERROR") | ||
public class LccConverterStationCreationInfos extends InjectionCreationInfos { | ||
@Builder | ||
@Getter | ||
@Setter | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
public static class ShuntCompensatorInfos { | ||
private String id; | ||
private String name; | ||
private Double maxQAtNominalV; | ||
private Boolean connectedToHvdc; | ||
} | ||
|
||
@Schema(description = "Loss Factor") | ||
private Float lossFactor; | ||
|
||
@Schema(description = "Power Factor") | ||
private Float powerFactor; | ||
|
||
@Schema(description = "LCC HVDC Converter Station Shunt Compensator") | ||
@JsonInclude(JsonInclude.Include.NON_NULL) | ||
private List<ShuntCompensatorInfos> shuntCompensatorsOnSide; | ||
} |
69 changes: 69 additions & 0 deletions
69
src/main/java/org/gridsuite/modification/dto/LccCreationInfos.java
This file contains 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,69 @@ | ||
/** | ||
* Copyright (c) 2024, 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.modification.dto; | ||
|
||
import com.fasterxml.jackson.annotation.JsonTypeName; | ||
import com.powsybl.commons.report.ReportNode; | ||
import com.powsybl.iidm.network.HvdcLine; | ||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import lombok.Setter; | ||
import lombok.ToString; | ||
import lombok.experimental.SuperBuilder; | ||
import org.gridsuite.modification.dto.annotation.ModificationErrorTypeName; | ||
import org.gridsuite.modification.modifications.AbstractModification; | ||
import org.gridsuite.modification.modifications.LccCreation; | ||
|
||
/** | ||
* @author Ghazwa Rehili <ghazwa.rehili at rte-france.com> | ||
*/ | ||
|
||
@SuperBuilder | ||
@NoArgsConstructor | ||
@Getter | ||
@Setter | ||
@ToString(callSuper = true) | ||
@Schema(description = "LCC creation") | ||
@JsonTypeName("LCC_CREATION") | ||
@ModificationErrorTypeName("CREATE_LCC_ERROR") | ||
public class LccCreationInfos extends EquipmentCreationInfos { | ||
@Schema(description = "DC nominal voltage") | ||
private Double nominalV; | ||
|
||
@Schema(description = "DC resistance") | ||
private Double r; | ||
|
||
@Schema(description = "Maximum active power") | ||
private Double maxP; | ||
|
||
@Schema(description = "Converters mode") | ||
private HvdcLine.ConvertersMode convertersMode; | ||
|
||
@Schema(description = "Active power setpoint") | ||
private Double activePowerSetpoint; | ||
|
||
@Schema(description = "Converter station 1") | ||
private LccConverterStationCreationInfos converterStation1; | ||
|
||
@Schema(description = "Converter station 2") | ||
private LccConverterStationCreationInfos converterStation2; | ||
|
||
@Override | ||
public AbstractModification toModification() { | ||
return new LccCreation(this); | ||
} | ||
|
||
@Override | ||
public ReportNode createSubReportNode(ReportNode reportNode) { | ||
return reportNode.newReportNode() | ||
.withMessageTemplate(getType().name(), "Lcc creation ${lccId}") | ||
.withUntypedValue("lccId", getEquipmentId()) | ||
.add(); | ||
} | ||
} |
This file contains 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
Oops, something went wrong.