Skip to content

Add missing log message for generators discarded from active power control because targetP < minP #1200

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

SylvestreSakti
Copy link
Contributor

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)
  • A PR or issue has been opened in all impacted repositories (if any)

Does this PR already have an issue describing the problem?
No

What kind of change does this PR introduce?
Add a missing log message

What is the current behavior?
Generators discarded from active power control for targetP < minP are counted but the count is never logged

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

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

  • Yes
  • No

Signed-off-by: PRABAKARAN Sylvestre <[email protected]>
@SylvestreSakti SylvestreSakti changed the title Add missing log message for generators dicarded from active power control for targetP < minP Add missing log message for generators discarded from active power control for targetP < minP Mar 7, 2025
@SylvestreSakti SylvestreSakti changed the title Add missing log message for generators discarded from active power control for targetP < minP Add missing log message for generators discarded from active power control because targetP < minP Mar 7, 2025
if (report.generatorsDiscardedFromActivePowerControlBecauseTargetPLowerThanMinP > 0) {
LOGGER.warn("Network {}: {} generators have been discarded from active power control because of a targetP < minP",
lfNetwork, report.generatorsDiscardedFromActivePowerControlBecauseTargetPLowerThanMinP);
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Now that this log is displayed it show an issue.
Generators with targetP=0 (or close to 0) appear in the category of stopped generators, but also in this category (if minP > 0).
The criteria that increments generatorsDiscardedFromActivePowerControlBecauseTargetPLowerThanMinP should probably exclude stopped generators.

Copy link
Collaborator

@vidaldid-rte vidaldid-rte left a comment

Choose a reason for hiding this comment

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

Before displaying the log, we should exclude the stop generators from this list of starting generators.

@SylvestreSakti
Copy link
Contributor Author

It was also the case with all the other checks, e.g. generators stopped but having targetP > maxTargetP were counted twice, generators stopped but having maxTargetP=minTargetP were counted twice, etc.

It's now fixed

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.

2 participants