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

Add DecomposedFlow rescaler proportional to max AC current load #156

Merged
merged 18 commits into from
Sep 20, 2024

Conversation

caioluke
Copy link
Member

@caioluke caioluke commented Jul 18, 2024

Please check if the PR fulfills these requirements

  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

What kind of change does this PR introduce?

Feature

What is the current behavior?

What is the new behavior (if this is a feature change)?

  • Refactor DecomposedFlowRescaler API
  • Add new DecomposedFlowRescaler based on the maximum current overload
  • Retrieve acFlows for both terminals in FlowDecompositionObserver
  • Retrieve acCurrents for both terminals in FlowDecompositionObserver

Does this PR introduce a breaking change or deprecate an API?

  • Yes
  • No

Signed-off-by: Caio Luke <caioluke97@gmail.com>
@caioluke caioluke requested a review from OpenSuze July 18, 2024 08:10
@caioluke caioluke self-assigned this Jul 18, 2024
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
6.1% Duplication on New Code (required ≤ 3%)

See analysis details on SonarCloud

@OpenSuze
Copy link
Contributor

OpenSuze commented Aug 26, 2024

Hi @caioluke,
Sorry for the delay, I was in training and vacations.
Could you share some details about your metier needs that justify adding another rescaler ?
To me it seems that this new rescaler requires to make a bit too much modification on DecomposedFlow (to add a lot of new information).
Best,
Hugo

@caioluke
Copy link
Member Author

Welcome back, Hugo :)

Yes, indeed this PR adds quite some new stuff in the rescaler.

What I need is to rescale DC flows in such a way that I get the same level of current overload as in the AC case.

Therefore, I compare AC current overloads to find the terminal (1 or 2) with the highest current overload, and get the associated active power to rescale DC flows.
In case there are missing limits, I just compare AC currents.

Another subtlety is that I need to calculate these rescaling AC active powers with nominal voltage - as I have done in the code.

Copy link
Contributor

@OpenSuze OpenSuze left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the PR !

Sorry for the delay, I had other projects to attend to...

Could you rename your PR with a less generic name ?

I know that I ask for a lot of modifications.

I do not what to do another PR to fix yours.

Feel free to ask more details about this feedback

@caioluke caioluke changed the title Add new DecomposedFlow rescaler Add DecomposedFlow rescaler proportional to max AC current load Sep 6, 2024
caioluke and others added 10 commits September 9, 2024 15:45
Signed-off-by: Caio Luke <caioluke97@gmail.com>
Signed-off-by: Caio Luke <caioluke97@gmail.com>
Signed-off-by: Caio Luke <caioluke97@gmail.com>
Signed-off-by: Caio Luke <caioluke97@gmail.com>
Signed-off-by: Caio Luke <caioluke97@gmail.com>
Signed-off-by: Caio Luke <caioluke97@gmail.com>
Signed-off-by: Caio Luke <caioluke97@gmail.com>
Signed-off-by: Caio Luke <caioluke97@gmail.com>
Signed-off-by: Caio Luke <caioluke97@gmail.com>
Copy link
Contributor

@OpenSuze OpenSuze left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your changes ! I appreciate your new DecomposedFlowRescaler API :)

@OpenSuze
Copy link
Contributor

Could you add a bit of documentation please ?

…lers

Signed-off-by: Caio Luke <caioluke97@gmail.com>
Signed-off-by: Caio Luke <caioluke97@gmail.com>
@caioluke
Copy link
Member Author

caioluke commented Sep 13, 2024

Could you add a bit of documentation please ?

@OpenSuze
I added some documentation.
I was wondering what to write about the parameter proportional-rescaler-min-flow-tolerance, since now it's also used by the new Rescaler...
Do you have a suggestion? Maybe change it's name?

@OpenSuze
Copy link
Contributor

Could you add a bit of documentation please ?

@OpenSuze I added some documentation. I was wondering what to write about the parameter proportional-rescaler-min-flow-tolerance, since now it's also used by the new Rescaler... Do you have a suggestion? Maybe change it's name?

Thank you for the documentation !

I think that I am ok with the parameter name. Both rescalers have some kind of proportionality.

Signed-off-by: Caio Luke <caioluke97@gmail.com>
Signed-off-by: Caio Luke <caioluke97@gmail.com>
Signed-off-by: Caio Luke <caioluke97@gmail.com>
Copy link
Contributor

@OpenSuze OpenSuze left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your PR !

Signed-off-by: Caio Luke <caioluke97@gmail.com>
Copy link

@phiedw phiedw merged commit da53ae2 into main Sep 20, 2024
7 checks passed
@phiedw phiedw deleted the max_current_overload_rescaler branch September 20, 2024 07:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants