-
Notifications
You must be signed in to change notification settings - Fork 8
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
Check too far generator voltage remote control #1119
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: PRABAKARAN Sylvestre <[email protected]>
Signed-off-by: PRABAKARAN Sylvestre <[email protected]>
Signed-off-by: PRABAKARAN Sylvestre <[email protected]>
Signed-off-by: PRABAKARAN Sylvestre <[email protected]>
Signed-off-by: PRABAKARAN Sylvestre <[email protected]>
Signed-off-by: PRABAKARAN Sylvestre <[email protected]>
Signed-off-by: PRABAKARAN Sylvestre <[email protected]>
Signed-off-by: PRABAKARAN Sylvestre <[email protected]>
Signed-off-by: PRABAKARAN Sylvestre <[email protected]>
Signed-off-by: PRABAKARAN Sylvestre <[email protected]>
Signed-off-by: PRABAKARAN Sylvestre <[email protected]>
Signed-off-by: PRABAKARAN Sylvestre <[email protected]>
Signed-off-by: PRABAKARAN Sylvestre <[email protected]>
Signed-off-by: PRABAKARAN Sylvestre <[email protected]>
Signed-off-by: PRABAKARAN Sylvestre <[email protected]>
As discussed, can you also run this test during a contingence propagation (and make sure the status is correctly restored at the end). |
Signed-off-by: PRABAKARAN Sylvestre <[email protected]>
* @param maxDistanceSearch the algorithm searches until this range and stops after this limit (or if every bus have been checked) | ||
* @return measured distance (number of branches) or Integer.MAX_VALUE if bus2 is not found | ||
*/ | ||
public static int distanceBetweenBuses(LfBus bus1, LfBus bus2, int maxDistanceSearch) { |
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.
This is an unusual way to implement a BFS. We can do it much simpler without these kind of set manipulation (busesToCheck.removeAll(checkedBuses)). Also we should take care for a BFS to have an orderer neighbors traversal (be careful with HashSets)
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.
Can you add a unit test for the method with various cases (exected distance, farther than maxDistance etc..)
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.
This is an unusual way to implement a BFS. We can do it much simpler without these kind of set manipulation (busesToCheck.removeAll(checkedBuses)). Also we should take care for a BFS to have an orderer neighbors traversal (be careful with HashSets)
Reading again more conventional ways to implement breadth First Search (e.g. https://www.baeldung.com/java-breadth-first-search), I don't know (or I don't find) simpler ways to implement this. Here I chose this way of using sets for multiple reasons :
- Instead of iterating over LfBus (in a classical Queue), I prefered to iterate over levels of distance to easily keep track of this growing distance which is the main output
- This way of iterating goes well with the findNeighbors() method of LfBus that returns a map and its keySet listing all the neighbors
With this way of iteration (levels of distance) is it important to have an ordered neighbors traversal ?
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.
Ok
src/main/java/com/powsybl/openloadflow/network/LfNetworkParameters.java
Outdated
Show resolved
Hide resolved
src/main/java/com/powsybl/openloadflow/network/impl/LfNetworkLoaderImpl.java
Outdated
Show resolved
Hide resolved
src/main/java/com/powsybl/openloadflow/network/impl/LfNetworkLoaderImpl.java
Outdated
Show resolved
Hide resolved
@geofjamg @SylvestreSakti shouldn't this be put into #1115
|
This is somehow related to #1115 indeed but #1115 is already quite large and we should keep it separatly. |
OK. Let's put this on hold for now. My note was more related to the idea of creating a service as we have in #115 to detect inconsistent voltage control in an IIDM network. If we do that then I wonder if we should not show all voltage controls that are removed by OLF (such as this one - too far control) but also others existing (unrealistic / qmax-qmin to small etc...) [EDIT] In breaker mode, we may want to ignore zero impedance branches such as switch. |
Signed-off-by: PRABAKARAN Sylvestre <[email protected]>
Signed-off-by: PRABAKARAN Sylvestre <[email protected]>
Signed-off-by: PRABAKARAN Sylvestre <[email protected]>
Signed-off-by: PRABAKARAN Sylvestre <[email protected]>
Signed-off-by: PRABAKARAN Sylvestre <[email protected]>
As discussed - let's keep that refinement for later, it we see a problem with that. |
src/test/java/com/powsybl/openloadflow/ac/GeneratorRemoteControlTest.java
Show resolved
Hide resolved
Signed-off-by: PRABAKARAN Sylvestre <[email protected]>
Signed-off-by: PRABAKARAN Sylvestre <[email protected]>
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.
Please clarify that this is only for generator remote voltage control:
- in MR title
- in parameter name
- in documentation
And also precising in the doc that generator means here: generators + svcs + vsc converters.
Signed-off-by: PRABAKARAN Sylvestre <[email protected]>
Signed-off-by: PRABAKARAN Sylvestre <[email protected]>
Quality Gate passedIssues Measures |
Thanks for this precision. Done ! |
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 delay my approval since we are not certain of the right default. I would like to better understand what is a legitimate distance.
Please check if the PR fulfills these requirements
Does this PR already have an issue describing the problem?
No
What kind of change does this PR introduce?
This change introduces a new feature that checks if a controller bus is too far from its generator controlled bus when using voltage remote control (introducing a new parameter which is
maxGeneratorVoltageRemoteControlDistance
)What is the current behavior?
There is no check of distance between buses
What is the new behavior (if this is a feature change)?
If a controller bus has a distance (number of branches) to its controlled bus that is higher than
maxGeneratorVoltageRemoteControlDistance
, then the voltage remote control switches to local voltage control.(
maxGeneratorVoltageRemoteControlDistance = 0
(or a negative value) deactivates the distance check. Default value for this parameter is2
)Does this PR introduce a breaking change or deprecate an API?