-
Notifications
You must be signed in to change notification settings - Fork 43
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
Matpower: export dclines #2932
Matpower: export dclines #2932
Conversation
Signed-off-by: José Antonio Marqués <marquesja@aia.es>
Signed-off-by: José Antonio Marqués <marquesja@aia.es>
Signed-off-by: José Antonio Marqués <marquesja@aia.es>
Signed-off-by: José Antonio Marqués <marquesja@aia.es>
Signed-off-by: José Antonio Marqués <marquesja@aia.es> # Conflicts: # matpower/matpower-converter/src/main/java/com/powsybl/matpower/converter/MatpowerExporter.java
Signed-off-by: Luma <zamarrenolm@aia.es>
Signed-off-by: Luma <zamarrenolm@aia.es>
Signed-off-by: Luma <zamarrenolm@aia.es>
Signed-off-by: Luma <zamarrenolm@aia.es>
public Context(double maxGeneratorActivePowerLimit, double maxGeneratorReactivePowerLimit) { | ||
this.maxGeneratorActivePowerLimit = maxGeneratorActivePowerLimit; | ||
this.maxGeneratorReactivePowerLimit = maxGeneratorReactivePowerLimit; | ||
} | ||
|
||
private void obtainBusesOutsideMainSynchronousComponentToBeConsidered(Network network) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
obtain is not a classic wording for this:
- getX for a direct access to data
- findX when there is some complex data traversal for instance
- updateX or calculateX when a method pre-calculate some data
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
public Context(double maxGeneratorActivePowerLimit, double maxGeneratorReactivePowerLimit) { | ||
this.maxGeneratorActivePowerLimit = maxGeneratorActivePowerLimit; | ||
this.maxGeneratorReactivePowerLimit = maxGeneratorReactivePowerLimit; | ||
} | ||
|
||
private void obtainBusesOutsideMainSynchronousComponentToBeConsidered(Network network) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should better explain why you are doing all this complex topology processing. I personnally didn't understand without additionnal explanations. We have to be aware that all this processing to get synhcronous components exclusing LCC is technical debt for the code. If there is no other way to support HVDC export, why not but at least we have to document it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I simplified the code using the synchronousComponents and I documented it. Now it is easier to understand.
// according to the busId of the import process | ||
private static OptionalInt extractBusNumber(String configuredBusId) { | ||
String busNumber = configuredBusId.replace("BUS-", ""); | ||
return busNumber.matches("[1-9]\\d*") ? OptionalInt.of(Integer.parseInt(busNumber)) : OptionalInt.empty(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we really need this ? Is it just for roundtrip tests?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not only for roundtrip tests. In matpower models, the bus number is the only way to identify it. We preserve the original ones if the iidm
model has been created by importing a matpower model.
Signed-off-by: Luma <zamarrenolm@aia.es>
Signed-off-by: José Antonio Marqués <marquesja@aia.es>
Signed-off-by: José Antonio Marqués <marquesja@aia.es>
…k for each synchronousComponent. Select as slack the bus with the highest generation Signed-off-by: José Antonio Marqués <marquesja@aia.es>
Signed-off-by: José Antonio Marqués <marquesja@aia.es>
Signed-off-by: José Antonio Marqués <marquesja@aia.es>
|
Please check if the PR fulfills these requirements
Does this PR already have an issue describing the problem?
What kind of change does this PR introduce?
Vsc HvdcLines
are exported asdcLines
.Only
Vsc
hvdcLines with regulationon
at both converters are exported as dcLines.The rest of
Vsc
converters are exported as generators when the regulation ison
and they are considered as load when the regulation isoff
.Lcc
converters are always considered as load.Matpower
needs aslack
bus for each synchronous component. Theslack
must be defined in a bus with generation or with dclines to serve the roles of both a voltage angle reference and a real power slack.Then a slack bus is defined for each synchronous component and the criteria to select it has been changed. Now the bus with highest active power generation is selected as slack instead of selecting the most meshed one.
What is the current behavior?
Vsc HvdcLines
are exported as two independent generators.What is the new behavior (if this is a feature change)?
Vsc HvdcLines
are exported asdcLines
Bus numbers are preserved if the
iidm
model has been imported frommatpower
.The
status
of thedcLine
is imported and exported.Disconnected hvdcLines are exported with
status 0
if the connectable buses are inside the main component.This change will be extended to all equipment in a separated PR.
Does this PR introduce a breaking change or deprecate an API?
If yes, please check if the following requirements are fulfilled
What changes might users need to make in their application due to this PR? (migration steps)
Other information: