powsybl / powsybl-open-rao

A toolbox based on powsybl framework dedicated to power systems coordinated capacity calculation and security analysis projects
Mozilla Public License 2.0
16 stars 6 forks source link

In RAO: replace RAO ElementaryAction by Core NetworkModification/Security Action, In Core: Extract Action from security analysis and link them to NetworkModification #880

Closed pjeanmarie closed 2 months ago

pjeanmarie commented 8 months ago

Describe the current behavior

Core project and open-rao project have each have their own definition of a remedial action which impact the network:

Describe the expected behavior

Core project and open-rao project should share a common definition and implementation of a remedial action as much as possible and it will be define in core.

The idea is:

Link between rao actions and core security action based on attributs (no network modification):

rao attributes core remedial action
RemedialAction -> RangeAction:
--> PstRangeAction NetworkElement networkElement; List\<TapRange> ranges; int initialTapPosition; Map<Integer, Double> tapToAngleConversionMap; double smallestAngleStep; int lowTapPosition; int highTapPosition;
--> StandardRangeAction:
---> CounterTradeRangeAction Country exportingCountry; Country importingCountry; List\<StandardRange> ranges; double initialSetpoint;
---> HvdcRangeAction NetworkElement networkElement; List\<StandardRange> ranges; double initialSetpoint;
---> InjectionRangeAction Map<NetworkElement, Double> injectionDistributionKeys; List\<StandardRange> ranges; double initialSetpoint;
RemedialAction -> NetworkAction:
contains ElementaryActions:
--> InjectionSetPoint NetworkElement networkElement; double setpoint; Unit unit; GeneratorAction and LoadAction ?
--> PstSetpoint NetworkElement networkElement; int setpoint; Ratio/PhaseTapChnagerTapPositionAction
--> SwitchPair NetworkElement switchToOpen; NetworkElement switchToClose; SwitchAction?
--> TopologicalAction NetworkElement networkElement; ActionType actionType; TerminalsConnectionAction and SwitchAction?

Link between rao actions and core network modification based on apply aka network modification:

rao elements used which network modif?
RemedialAction -> RangeAction:
--> PstRangeAction 1 network element + double targetAngle phaseTapChanger (getTwoWindingsTransformer(networkElement.getId())) -> setTapPosition(tap (targetAngle) )
--> StandardRangeAction:
---> CounterTradeRangeAction apply -> throw exception
---> HvdcRangeAction 1 network element + double targetSetpoint hvdcLines (droop) .setEnabled(false) + hvdc line (networkElement.getId()) -> setConvertersMode + setActivePowerSetpoint (targetSetpoint)
---> InjectionRangeAction map: (NetworkElement, double (distribution key)) + double targetSetpoint injectionDistributionKeys.forEach((ne, sk) -> applyInjection(network, ne.getId(), targetSetpoint * sk)) -> generator.setTargetP
RemedialAction -> NetworkAction:
contains ElementaryActions:
--> InjectionSetPoint 1 NetworkElement + set point generator.setTargetP or danglingLine.setP0 or shuntCompensator.setSectionCount
--> PstSetpoint 1 NetworkElement + set point phaseTapChanger.setTapPosition(normalizedSetPoint)
--> SwitchPair 2 NetworkElement switch.setOpen(true) or switch.setOpen(false)
--> TopologicalAction 1 NetworkElement + actionType branch.getTerminal(1-2)().(dis)connect() or sw.setOpen(actionType == ActionType.OPEN)

Describe the motivation

Do not multiply definitions of similar objects now that open-rao is part of powsybl.

Extra Information

NetworkModification are linked to an Action (not in security analysis) which have a DSL in powsybl core. Crac has Network Elements as child by composition of contingency and network-action, they will be both removed...

pjeanmarie commented 6 months ago

https://github.com/powsybl/powsybl-core/pull/2924