-
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.
Signed-off-by: Olivier Perrin <olivier.perrin@rte-france.com>
- Loading branch information
Showing
15 changed files
with
1,310 additions
and
2 deletions.
There are no files selected for viewing
26 changes: 26 additions & 0 deletions
26
iidm/iidm-api/src/main/java/com/powsybl/iidm/network/AutomationSystem.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) 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.iidm.network; | ||
|
||
/** | ||
* @author Olivier Perrin {@literal <olivier.perrin at rte-france.com>} | ||
*/ | ||
public interface AutomationSystem<I extends AutomationSystem<I>> extends Identifiable<I> { | ||
|
||
/** | ||
* Says if the system is active or not. | ||
* @return <code>true</code> is the automation system is enabled | ||
*/ | ||
boolean isEnabled(); | ||
|
||
/** | ||
* Change the state of the automation system | ||
* @param enabled <code>true</code> to enable the automation system | ||
*/ | ||
void setEnabled(boolean enabled); | ||
} |
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
145 changes: 145 additions & 0 deletions
145
iidm/iidm-api/src/main/java/com/powsybl/iidm/network/OverloadManagementSystem.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,145 @@ | ||
/** | ||
* 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.iidm.network; | ||
|
||
import java.util.List; | ||
|
||
/** | ||
* An overload management system. | ||
* | ||
* @author Olivier Perrin {@literal <olivier.perrin at rte-france.com>} | ||
*/ | ||
public interface OverloadManagementSystem extends AutomationSystem<OverloadManagementSystem> { | ||
|
||
interface Tripping { | ||
enum Type { | ||
BRANCH_TRIPPING, | ||
THREE_WINDINGS_TRANSFORMER_TRIPPING, | ||
SWITCH_TRIPPING | ||
} | ||
|
||
Type getType(); | ||
|
||
/** | ||
* Get the unique key of the tripping. | ||
* <p>This key is unique for a single overload management system, but it can be reused | ||
* for another overload management system).</p> | ||
* @return the tripping key | ||
*/ | ||
String getKey(); | ||
|
||
/** | ||
* Get the name (if available) or the key of the tripping. | ||
* <p>This method result is used for reporting purposes.</p> | ||
* @return the name (if available) or the key of the tripping | ||
*/ | ||
String getNameOrKey(); | ||
|
||
/** | ||
* Set the name of the tripping. | ||
* <p>This name is facultative. It is used only for reporting purposes.</p> | ||
* @param name the name of the tripping | ||
* @see #getNameOrKey() | ||
*/ | ||
Tripping setName(String name); | ||
|
||
/** | ||
* Return the maximum acceptable current value (in A). | ||
* @return the maximum current value | ||
*/ | ||
double getCurrentLimit(); | ||
|
||
Tripping setCurrentLimit(double currentLimit); | ||
|
||
/** | ||
* Tell if the tripping operation consists in opening (<code>true</code>) or closing (<code>false</code>) | ||
* the element (branch, three windings transformer or switch) to operate. | ||
* @return <code>true</code> it the operation consists in opening the element, else <code>false</code>. | ||
*/ | ||
boolean isOpenAction(); | ||
|
||
Tripping setOpenAction(boolean open); | ||
} | ||
|
||
interface SwitchTripping extends Tripping { | ||
@Override | ||
default Type getType() { | ||
return Type.SWITCH_TRIPPING; | ||
} | ||
|
||
String getSwitchToOperateId(); | ||
|
||
SwitchTripping setSwitchToOperateId(String switchToOperateId); | ||
} | ||
|
||
interface BranchTripping extends Tripping { | ||
@Override | ||
default Type getType() { | ||
return Type.BRANCH_TRIPPING; | ||
} | ||
|
||
String getBranchToOperateId(); | ||
|
||
BranchTripping setBranchToOperateId(String branch); | ||
|
||
TwoSides getSideToOperate(); | ||
|
||
BranchTripping setSideToOperate(TwoSides side); | ||
} | ||
|
||
interface ThreeWindingsTransformerTripping extends Tripping { | ||
@Override | ||
default Type getType() { | ||
return Type.THREE_WINDINGS_TRANSFORMER_TRIPPING; | ||
} | ||
|
||
String getThreeWindingsTransformerToOperateId(); | ||
|
||
ThreeWindingsTransformerTripping setThreeWindingsTransformerToOperateId(String threeWindingsTransformerId); | ||
|
||
ThreeSides getSideToOperate(); | ||
|
||
ThreeWindingsTransformerTripping setSideToOperate(ThreeSides side); | ||
} | ||
|
||
/** | ||
* Get the parent substation. | ||
* @return the parent substation | ||
*/ | ||
Substation getSubstation(); | ||
|
||
/** | ||
* Get the id of the element (branch or three windings transformer) which is monitored | ||
* @return the id of the monitored element | ||
*/ | ||
String getMonitoredElementId(); | ||
|
||
/** | ||
* Get the monitored side of the element. | ||
* @return the side | ||
* @see #getMonitoredElementId() | ||
*/ | ||
ThreeSides getMonitoredSide(); | ||
|
||
/** | ||
* Add a tripping (operation to perform when the current is out of an acceptable interval) | ||
* @param tripping the tripping to add | ||
*/ | ||
void addTripping(Tripping tripping); | ||
|
||
/** | ||
* Return the list of the defined trippings. | ||
* @return the trippings | ||
*/ | ||
List<Tripping> getTrippings(); | ||
|
||
@Override | ||
default IdentifiableType getType() { | ||
return IdentifiableType.OVERLOAD_MANAGEMENT_SYSTEM; | ||
} | ||
} |
100 changes: 100 additions & 0 deletions
100
iidm/iidm-api/src/main/java/com/powsybl/iidm/network/OverloadManagementSystemAdder.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,100 @@ | ||
/** | ||
* 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.iidm.network; | ||
|
||
/** | ||
* @author Olivier Perrin {@literal <olivier.perrin at rte-france.com>} | ||
*/ | ||
public interface OverloadManagementSystemAdder extends IdentifiableAdder<OverloadManagementSystem, OverloadManagementSystemAdder> { | ||
|
||
interface TrippingAdder<I extends TrippingAdder<I>> { | ||
/** | ||
* Set the unique key of the tripping. | ||
* <p>This key is unique for a single overload management system, but it can be reused | ||
* for another overload management system).</p> | ||
* @param key the tripping key | ||
*/ | ||
I setKey(String key); | ||
|
||
/** | ||
* Set the name of the tripping. | ||
* <p>This name is facultative. It is used only for reporting purposes.</p> | ||
* @param name the name of the tripping | ||
*/ | ||
I setName(String name); | ||
|
||
/** | ||
* Set the maximum acceptable current value (in A). | ||
* @param currentLimit the maximum current value | ||
*/ | ||
I setCurrentLimit(double currentLimit); | ||
|
||
I setOpenAction(boolean open); | ||
|
||
OverloadManagementSystem.Tripping.Type getType(); | ||
|
||
OverloadManagementSystemAdder add(); | ||
} | ||
|
||
interface SwitchTrippingAdder extends TrippingAdder<SwitchTrippingAdder> { | ||
@Override | ||
default OverloadManagementSystem.Tripping.Type getType() { | ||
return OverloadManagementSystem.Tripping.Type.SWITCH_TRIPPING; | ||
} | ||
|
||
SwitchTrippingAdder setSwitchToOperateId(String switchId); | ||
} | ||
|
||
interface BranchTrippingAdder extends TrippingAdder<BranchTrippingAdder> { | ||
@Override | ||
default OverloadManagementSystem.Tripping.Type getType() { | ||
return OverloadManagementSystem.Tripping.Type.BRANCH_TRIPPING; | ||
} | ||
|
||
BranchTrippingAdder setBranchToOperateId(String branchId); | ||
|
||
BranchTrippingAdder setSideToOperate(TwoSides side); | ||
} | ||
|
||
interface ThreeWindingsTransformerTrippingAdder extends TrippingAdder<ThreeWindingsTransformerTrippingAdder> { | ||
@Override | ||
default OverloadManagementSystem.Tripping.Type getType() { | ||
return OverloadManagementSystem.Tripping.Type.THREE_WINDINGS_TRANSFORMER_TRIPPING; | ||
} | ||
|
||
ThreeWindingsTransformerTrippingAdder setThreeWindingsTransformerToOperateId(String threeWindingsTransformerId); | ||
|
||
ThreeWindingsTransformerTrippingAdder setSideToOperate(ThreeSides side); | ||
|
||
} | ||
|
||
@Override | ||
OverloadManagementSystem add(); | ||
|
||
OverloadManagementSystemAdder setEnabled(boolean enabled); | ||
|
||
/** | ||
* Set the id of the element (branch or three windings transformer) which is monitored. | ||
* @param monitoredElementId the id of the monitored element | ||
* @return the adder | ||
*/ | ||
OverloadManagementSystemAdder setMonitoredElementId(String monitoredElementId); | ||
|
||
/** | ||
* Set the monitored side of the element. | ||
* @param monitoredElementSide the monitored side of the element | ||
* @return the adder | ||
*/ | ||
OverloadManagementSystemAdder setMonitoredElementSide(ThreeSides monitoredElementSide); | ||
|
||
SwitchTrippingAdder newSwitchTripping(); | ||
|
||
BranchTrippingAdder newBranchTripping(); | ||
|
||
ThreeWindingsTransformerTrippingAdder newThreeWindingsTransformerTripping(); | ||
} |
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.