-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor the tap changer adder interfaces (#2828)
* Factorize the tap changer adder interfaces * Use new factorization in deserialization Signed-off-by: Florent MILLOT <millotflo@gmail.com> Co-authored-by: Florian Dupuy <florian.dupuy@rte-france.com>
- Loading branch information
Showing
9 changed files
with
144 additions
and
140 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
16 changes: 16 additions & 0 deletions
16
iidm/iidm-api/src/main/java/com/powsybl/iidm/network/PhaseTapChangerStepAdder.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,16 @@ | ||
/** | ||
* 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/. | ||
* SPDX-License-Identifier: MPL-2.0 | ||
*/ | ||
|
||
package com.powsybl.iidm.network; | ||
|
||
/** | ||
* @author Florent MILLOT {@literal <florent.millot at rte-france.com>} | ||
*/ | ||
public interface PhaseTapChangerStepAdder extends TapChangerStepAdder<PhaseTapChangerStepAdder, PhaseTapChangerAdder> { | ||
PhaseTapChangerStepAdder setAlpha(double alpha); | ||
} |
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
14 changes: 14 additions & 0 deletions
14
iidm/iidm-api/src/main/java/com/powsybl/iidm/network/RatioTapChangerStepAdder.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,14 @@ | ||
/** | ||
* 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/. | ||
* SPDX-License-Identifier: MPL-2.0 | ||
*/ | ||
package com.powsybl.iidm.network; | ||
|
||
/** | ||
* @author Florent MILLOT {@literal <florent.millot at rte-france.com>} | ||
*/ | ||
public interface RatioTapChangerStepAdder extends TapChangerStepAdder<RatioTapChangerStepAdder, RatioTapChangerAdder> { | ||
} |
32 changes: 32 additions & 0 deletions
32
iidm/iidm-api/src/main/java/com/powsybl/iidm/network/TapChangerAdder.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,32 @@ | ||
/** | ||
* 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/. | ||
* SPDX-License-Identifier: MPL-2.0 | ||
*/ | ||
|
||
package com.powsybl.iidm.network; | ||
|
||
/** | ||
* @author Florent MILLOT {@literal <florent.millot at rte-france.com>} | ||
*/ | ||
public interface TapChangerAdder<S extends TapChangerAdder<S, A, C>, A extends TapChangerStepAdder<A, S>, C extends TapChanger<C, ?>> { | ||
|
||
S setLowTapPosition(int lowTapPosition); | ||
|
||
S setTapPosition(int tapPosition); | ||
|
||
S setRegulating(boolean regulating); | ||
|
||
S setRegulationTerminal(Terminal regulationTerminal); | ||
|
||
default S setTargetDeadband(double targetDeadband) { | ||
throw new UnsupportedOperationException(); | ||
} | ||
|
||
A beginStep(); | ||
|
||
C add(); | ||
|
||
} |
26 changes: 26 additions & 0 deletions
26
iidm/iidm-api/src/main/java/com/powsybl/iidm/network/TapChangerStepAdder.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,26 @@ | ||
/** | ||
* 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/. | ||
* SPDX-License-Identifier: MPL-2.0 | ||
*/ | ||
|
||
package com.powsybl.iidm.network; | ||
|
||
/** | ||
* @author Florent MILLOT {@literal <florent.millot at rte-france.com>} | ||
*/ | ||
public interface TapChangerStepAdder<S extends TapChangerStepAdder<S, A>, A extends TapChangerAdder<A, S, ?>> { | ||
S setRho(double rho); | ||
|
||
S setR(double r); | ||
|
||
S setX(double x); | ||
|
||
S setG(double g); | ||
|
||
S setB(double b); | ||
|
||
A endStep(); | ||
} |
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
Oops, something went wrong.