-
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.
Merge branch 'main' into criteria_parameter
- Loading branch information
Showing
13 changed files
with
110 additions
and
239 deletions.
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
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
40 changes: 0 additions & 40 deletions
40
dynawo-simulation/src/main/java/com/powsybl/dynawo/models/hvdc/DanglingSide.java
This file was deleted.
Oops, something went wrong.
57 changes: 57 additions & 0 deletions
57
dynawo-simulation/src/main/java/com/powsybl/dynawo/models/hvdc/HvdcDangling.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,57 @@ | ||
/** | ||
* 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/. | ||
* SPDX-License-Identifier: MPL-2.0 | ||
*/ | ||
package com.powsybl.dynawo.models.hvdc; | ||
|
||
import com.powsybl.commons.PowsyblException; | ||
import com.powsybl.dynawo.models.VarConnection; | ||
import com.powsybl.dynawo.models.buses.EquipmentConnectionPoint; | ||
import com.powsybl.dynawo.models.macroconnections.MacroConnectionsAdder; | ||
import com.powsybl.dynawo.models.utils.SideUtils; | ||
import com.powsybl.iidm.network.HvdcConverterStation; | ||
import com.powsybl.iidm.network.HvdcLine; | ||
import com.powsybl.iidm.network.TwoSides; | ||
|
||
import java.util.List; | ||
import java.util.function.Function; | ||
|
||
/** | ||
* @author Laurent Issertial {@literal <laurent.issertial at rte-france.com>} | ||
*/ | ||
public class HvdcDangling extends BaseHvdc { | ||
|
||
private final TwoSides danglingSide; | ||
|
||
protected HvdcDangling(String dynamicModelId, HvdcLine hvdc, String parameterSetId, String hvdcLib, | ||
Function<TwoSides, String> eventVarNameSupplier, TwoSides danglingSide) { | ||
super(dynamicModelId, hvdc, parameterSetId, hvdcLib, eventVarNameSupplier); | ||
this.danglingSide = danglingSide; | ||
} | ||
|
||
@Override | ||
public void createMacroConnections(MacroConnectionsAdder adder) { | ||
adder.createTerminalMacroConnections(this, equipment, this::getVarConnectionsWithDangling, danglingSide); | ||
adder.createTerminalMacroConnections(this, equipment, this::getVarConnectionsWith, SideUtils.getOppositeSide(danglingSide)); | ||
} | ||
|
||
@Override | ||
public String getSwitchOffSignalEventVarName(TwoSides side) { | ||
if (danglingSide == side) { | ||
throw new PowsyblException(String.format("Equipment %s side %s is dangling and can't be disconnected with an event", getLib(), side.getNum())); | ||
} | ||
return super.getSwitchOffSignalEventVarName(side); | ||
} | ||
|
||
@Override | ||
public List<HvdcConverterStation<?>> getConnectedStations() { | ||
return List.of(danglingSide == TwoSides.ONE ? equipment.getConverterStation2() : equipment.getConverterStation1()); | ||
} | ||
|
||
private List<VarConnection> getVarConnectionsWithDangling(EquipmentConnectionPoint connected, TwoSides side) { | ||
return List.of(new VarConnection(TERMINAL_PREFIX + side.getNum(), connected.getTerminalVarName(side))); | ||
} | ||
} |
27 changes: 0 additions & 27 deletions
27
dynawo-simulation/src/main/java/com/powsybl/dynawo/models/hvdc/HvdcP.java
This file was deleted.
Oops, something went wrong.
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
50 changes: 0 additions & 50 deletions
50
dynawo-simulation/src/main/java/com/powsybl/dynawo/models/hvdc/HvdcPDangling.java
This file was deleted.
Oops, something went wrong.
26 changes: 0 additions & 26 deletions
26
dynawo-simulation/src/main/java/com/powsybl/dynawo/models/hvdc/HvdcVsc.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.