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

Simplify synchronous generator models declaration #146

Merged
merged 7 commits into from
Jan 4, 2023
Merged

Conversation

dimbdr
Copy link
Contributor

@dimbdr dimbdr commented Dec 21, 2022

Please check if the PR fulfills these requirements (please use '[x]' to check the checkboxes, or submit the PR and then click the checkboxes)

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

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
Creating synchronous generator model is redundant, we want to have a way to allocate as many different synchronous generators as necessary, but with a configuration file.
It's a proposal on how to answer to this problem.

@dimbdr dimbdr changed the title Simplify synchronous generator models declaration [WIP] Simplify synchronous generator models declaration Dec 21, 2022
@dimbdr dimbdr force-pushed the simplify_generators branch from 881a20c to 16f3a45 Compare December 21, 2022 14:45
@dimbdr dimbdr force-pushed the simplify_generators branch from 16f3a45 to 140fc29 Compare December 21, 2022 14:57
BAUDRIER Dimitri added 2 commits December 22, 2022 11:28
The only thing that distinguishes a synchronous generator from another is the lib. Then it's just an attribute

Signed-off-by: BAUDRIER Dimitri <dimitri.baudrier@rte-france.com>
Signed-off-by: BAUDRIER Dimitri <dimitri.baudrier@rte-france.com>
@dimbdr dimbdr force-pushed the simplify_generators branch from 140fc29 to d527920 Compare December 22, 2022 10:29
BAUDRIER Dimitri added 3 commits December 22, 2022 15:27
…n file.

Problem: right order of generators is not guaranteed
Signed-off-by: BAUDRIER Dimitri <dimitri.baudrier@rte-france.com>
# Conflicts:
#	dynawaltz-dsl/src/main/groovy/com/powsybl/dynawaltz/dsl/models/generators/GeneratorSynchronousFourWindingsGroovyExtension.groovy
#	dynawaltz-dsl/src/main/groovy/com/powsybl/dynawaltz/dsl/models/generators/GeneratorSynchronousFourWindingsProportionalRegulationsGroovyExtension.groovy
#	dynawaltz-dsl/src/main/groovy/com/powsybl/dynawaltz/dsl/models/generators/GeneratorSynchronousFourWindingsProportionalRegulationsStepPmGroovyExtension.groovy
#	dynawaltz-dsl/src/main/groovy/com/powsybl/dynawaltz/dsl/models/generators/GeneratorSynchronousThreeWindingsGroovyExtension.groovy
#	dynawaltz-dsl/src/main/groovy/com/powsybl/dynawaltz/dsl/models/generators/GeneratorSynchronousThreeWindingsProportionalRegulationsGroovyExtension.groovy
#	dynawaltz-dsl/src/test/java/com/powsybl/dynawaltz/dsl/DynaWaltzGroovyDynamicModelsSupplierTest.java
Signed-off-by: BAUDRIER Dimitri <dimitri.baudrier@rte-france.com>
@dimbdr dimbdr changed the title [WIP] Simplify synchronous generator models declaration Simplify synchronous generator models declaration Dec 23, 2022
@dimbdr dimbdr marked this pull request as ready for review December 23, 2022 10:39
Signed-off-by: BAUDRIER Dimitri <dimitri.baudrier@rte-france.com>
Copy link
Contributor

@flo-dup flo-dup left a comment

Choose a reason for hiding this comment

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

Nice!

Copy link
Contributor

@flo-dup flo-dup left a comment

Choose a reason for hiding this comment

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

A couple of remarks after some further thinking

@AutoService(DynamicModelGroovyExtension.class)
class GeneratorModelGroovyExtension implements DynamicModelGroovyExtension {

private static final String GENERATORS_CONFIG = "synchronous_generators.cfg";
Copy link
Contributor

Choose a reason for hiding this comment

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

How could we extend this, to add more generators than current ones?
It would be more flexible to be able to set that file.

Signed-off-by: BAUDRIER Dimitri <dimitri.baudrier@rte-france.com>
@sonarqubecloud
Copy link

sonarqubecloud bot commented Jan 4, 2023

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 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

@flo-dup flo-dup merged commit 00d9e7c into main Jan 4, 2023
@flo-dup flo-dup deleted the simplify_generators branch January 4, 2023 16:30
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.

2 participants