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

change and add some logs in generator dispatch modification #332

Merged
merged 6 commits into from
Sep 26, 2023

Conversation

dbraquart
Copy link
Contributor

No description provided.

if (nbNoCost > 0) {
report(reporter, reporterSuffixKey, "NbGeneratorsWithNoCost", "${nbNoCost} generator${isPlural} been discarded from generation dispatch because of missing marginal cost. Their active power set point has been set to 0",
Map.of("nbNoCost", nbNoCost,
"isPlural", nbNoCost > 1 ? "s have" : " has"),
Copy link
Contributor

Choose a reason for hiding this comment

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

"isPlural" is used for 5 times in this file, use a constant will be better ?

disconnectedGeneratorCounter.getAndIncrement();
});
if (disconnectedGeneratorCounter.get() > 0) {
report(reporter, Integer.toString(componentNum), "TotalDisconnectedGenerator", "${nbDisconnectedGenerator} generator${isPlural} been discarded from generation dispatch because their are disconnected. Their active power set point remains unchanged",
Copy link
Contributor

Choose a reason for hiding this comment

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

Add the synthetic report before each individual disconnected generator report ?

}
return marginalCost != null;
}).collect(Collectors.toList());

int nbNoCost = generators.size() - generatorsWithMarginalCost.size();
if (nbNoCost > 0) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Add this synthetic report before each individual generator without marginal cost report ?

.forEach(g -> report(reporter, suffixKey, "GeneratorUnchangedTargetP", "Generator ${generator} has not been selected by the merit order algorithm. Its active power set point has been set to 0",
Map.of(GENERATOR, g.getId()), TypedValue.TRACE_SEVERITY));
int nbUnchangedGenerators = adjustableGenerators.size() - updatedGenerators.size();
if (nbUnchangedGenerators > 0) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Add this synthetic report before each individual unchanged generator report ?

Copy link
Contributor Author

@dbraquart dbraquart Sep 25, 2023

Choose a reason for hiding this comment

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

also made for updated generators (synthetic before details)

Signed-off-by: David BRAQUART <[email protected]>
@dbraquart dbraquart force-pushed the change-functional-logs-for-generator-dispatch branch from d5d4f8d to 75566ee Compare September 25, 2023 12:48
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 2 Code Smells

89.8% 89.8% Coverage
0.0% 0.0% Duplication

@dbraquart dbraquart merged commit d807f4c into main Sep 26, 2023
4 checks passed
@dbraquart dbraquart deleted the change-functional-logs-for-generator-dispatch branch September 26, 2023 10:44
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