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

LoadScalable: Do not apply constant power factor if P0 is zero #2897

Merged
merged 1 commit into from
Feb 13, 2024

Conversation

vmouradian
Copy link
Member

@vmouradian vmouradian commented Feb 9, 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)

Does this PR already have an issue describing the problem?

No

What kind of change does this PR introduce?

Bug fix (handle the case when Scaling a load with P0=0 and constantPowerFactor = true).

What is the current behavior?

The calculated new Q0 value will be NaN because of dividing by P0=0. Which will make setQ0() throw an error.

What is the new behavior (if this is a feature change)?
The value of Q0 is not updated ant stays as is, instead of throwing an error.

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

  • Yes
  • No

If yes, please check if the following requirements are fulfilled

  • The Breaking Change or Deprecated label has been added
  • The migration steps are described in the following section

What changes might users need to make in their application due to this PR? (migration steps)

Other information:

@vmouradian vmouradian changed the title LoadScalable : Apply constant power factor if P0 !=0 LoadScalable : Don't apply constant power factor if P0 = 0 Feb 9, 2024
Signed-off-by: vmouradian <valentin.mouradian@artelys.com>
@vmouradian vmouradian force-pushed the scaling-loads-P0-is-zero branch from 02d785e to 3ce07ab Compare February 9, 2024 16:15
Copy link

sonarqubecloud bot commented Feb 9, 2024

@jeandemanged jeandemanged changed the title LoadScalable : Don't apply constant power factor if P0 = 0 LoadScalable: Do not apply constant power factor if P0 is zero Feb 9, 2024
Copy link
Member

@jeandemanged jeandemanged 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, I'd argue this is a bugfix, not a "small feature"

Copy link
Member

@colinepiloquet colinepiloquet left a comment

Choose a reason for hiding this comment

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

I agree that it's more of a bug fix. I also think it might be worth mentioning in the documentation.

@olperr1 olperr1 added the bug label Feb 13, 2024
@olperr1 olperr1 merged commit c82fcdd into main Feb 13, 2024
6 checks passed
@olperr1 olperr1 deleted the scaling-loads-P0-is-zero branch February 13, 2024 07:20
olperr1 pushed a commit that referenced this pull request Feb 15, 2024
Signed-off-by: vmouradian <valentin.mouradian@artelys.com>
(cherry picked from commit c82fcdd)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants