Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
pjeanmarie opened this issue Jan 25, 2024 · 1 comment · May be fixed by #1032 or #920
Assignees
Labels
cleaning This issue or pull request only concerns improving the overall state of the code

Comments

@pjeanmarie
Copy link
Member

pjeanmarie commented Jan 25, 2024

Describe the current behavior

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

  • core: interface com.powsybl.iidm.modification.NetworkModification (not the Tripping subtypes which is for contingencies and not for remedial actions) for the iidm network modification and com.powsybl.security.action.Action for the security analysis (no modif of iidm network, use another network model)
  • rao: interface com.powsybl.openrao.data.cracapi.networkaction.NetworkAction (extends RemedialAction), composed of ElementaryAction, which define a type and an element, as in core remedial action, but also an iidm network modification (via its apply method). NetworkAction is used in Crac.

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:

  • when there is similar elements -> modify rao to use the one in core
  • when there is necessary elements in rao which do not exist in core -> add them in core

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 pjeanmarie linked a pull request Jan 25, 2024 that will close this issue
7 tasks
@pjeanmarie pjeanmarie changed the title Remove rao contingency to use core contingency instead Remove rao contingency and network-action to use core contingency and core network-modification instead Jan 30, 2024
@pjeanmarie pjeanmarie changed the title Remove rao contingency and network-action to use core contingency and core network-modification instead Remove rao contingency and network-action to use core contingency and network-modification instead Jan 30, 2024
@pjeanmarie pjeanmarie changed the title Remove rao contingency and network-action to use core contingency and network-modification instead In RAO: replace RAO Contingency by Core Contingency, In Core: Extends Contingency to cover open-rao needs Feb 19, 2024
@pjeanmarie pjeanmarie linked a pull request Feb 19, 2024 that will close this issue
7 tasks
@pjeanmarie pjeanmarie changed the title In RAO: replace RAO Contingency by Core Contingency, In Core: Extends Contingency to cover open-rao needs In RAO: replace RAO ElementaryAction by Core NetworkModification/Security Action, In Core: Extract Action from security analysis and link them to NetworkModification Feb 19, 2024
@pjeanmarie
Copy link
Member Author

@pjeanmarie pjeanmarie linked a pull request Mar 11, 2024 that will close this issue
7 tasks
@pet-mit pet-mit added the cleaning This issue or pull request only concerns improving the overall state of the code label Apr 11, 2024
@pjeanmarie pjeanmarie linked a pull request Jun 4, 2024 that will close this issue
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cleaning This issue or pull request only concerns improving the overall state of the code
Projects
None yet
3 participants