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

connectableBus throws exception in topology calculated from node-breaker all switches open #981

Closed
zamarrenolm opened this issue Oct 15, 2019 · 4 comments · Fixed by #1008
Labels

Comments

@zamarrenolm
Copy link
Member

  • Do you want to request a feature or report a bug?
    Report a bug

  • What is the current behavior?
    Exception is thrown when BusView of a Terminal is queried for calculatedBus in some situations.
    Specifically: the voltage level has topology kind of node-breaker and all switches are opened. In this situation no bus is calculated, and the search for a calculatedBus fails, throwing an exception.

  • If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem
    A minimal example has been created as a unit test case in the branch issue_nb_connectableBus (module iidm-impl, class NodeBreakerTest, method issueConnectableBus). The following graph shows the export of the voltage level topology:

Screen Shot 2019-10-15 at 23 02 19

  • What is the expected behavior?
    A bus should be calculated in the voltage level. If no bus is calculated by design, then null could be a valid return value from the method connectableBus.

  • Please tell us about your environment:

    • PowSyBl Version: 3.0.0-SNAPSHOT
    • OS Version: *
  • Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, spectrum, etc)
    It seems the current behavior is related to change in commit 0e25787 where the condition for throwing the exception was changed (fixed).

@miovd
Copy link
Contributor

miovd commented Oct 16, 2019

Yes, this seems like the same issue as #939 ... What do you think @geofjamg @mathbagu, should getConnectableBus() be allowed to return null if there is no bus in the voltage level/the whole voltage level is disconnected?

@geofjamg
Copy link
Member

That would lead to a mess in existing code.
It would be simpler to return a fictitiou bus.

@zamarrenolm
Copy link
Member Author

There are some points on the current code that already check for connectableBus returning null: iidm-converter-api BusFilter as an example (when the exported topology is the bus-branch).

@annetill
Copy link
Member

annetill commented Nov 8, 2019

Can we in a first approach retruns null and wait for the possible resulting problems ? I prefer to return a null than to introduce the notion of fictitious bus. For me, the definition of a bus is that it is connected, no ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants