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

Exception during contingency propagation #333

Closed
sylvlecl opened this issue Jul 12, 2021 · 4 comments
Closed

Exception during contingency propagation #333

sylvlecl opened this issue Jul 12, 2021 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@sylvlecl
Copy link
Contributor

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

Bug

  • What is the current behavior?

This issue has been encountered through pypowsybl binding :
when computing sensitivities with contingencies on a node breaker test case, we frequently encounter null pointer exceptions, depending on the input contingencies.

See stack below, and a test case to reproduce it on that commit: 42a1146

java.lang.NullPointerException
	at com.powsybl.openloadflow.util.PropagatedContingency.isCoupler(PropagatedContingency.java:138)
	at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:176)
	at java.util.HashMap$KeySpliterator.tryAdvance(HashMap.java:1624)
	at java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:127)
	at java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:502)
	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:488)
	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
	at java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:150)
	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
	at java.util.stream.ReferencePipeline.findFirst(ReferencePipeline.java:543)
	at com.powsybl.openloadflow.util.PropagatedContingency.createListForSensitivityAnalysis(PropagatedContingency.java:76)
	at com.powsybl.openloadflow.sensi.OpenSensitivityAnalysisProvider.run(OpenSensitivityAnalysisProvider.java:208)
	at com.powsybl.openloadflow.sensi.OpenSensitivityAnalysisProvider.run(OpenSensitivityAnalysisProvider.java:167)

In the "isCoupler" method, we make the wrong assumption that a switch has terminals on both sides.

@sylvlecl sylvlecl added the bug Something isn't working label Jul 12, 2021
@sylvlecl sylvlecl changed the title Contingency propagation issue Exception during contingency propagation Jul 12, 2021
@annetill
Copy link
Member

@sylvlecl thanks for your issue, we are going to try to fix that. I imagine that for you, it is not enough to just check if terminals are not equal to zero. What is a coupler for you, how can we find them ?

@sylvlecl
Copy link
Contributor Author

You're right: just checking terminals are not null will avoid the null pointer but will not identify correctly couplers, in the general case. Most often, a coupler is connected to disconnectors, which are themselves connected to bus bars.

Therefore, to identify couplers, we must traverse the topology from the breaker in order to check if the first encountered equipments on both sides are bus bars (or configured bsues in bus breaker?). Note that there might be multiple bus bars on each side.

From a wider point of view, as far as I remember, that identification of couplers aims at identifying contingencies that we cannot simulate correctly for now in open loadflow : from that point of view, I am not 100% sure that identifying couplers will be enough to identify all those cases, maybe it needs more thoughts!

@flo-dup flo-dup mentioned this issue Jul 15, 2021
3 tasks
@flo-dup
Copy link
Contributor

flo-dup commented Jul 15, 2021

I created a PR based on your test branch with a traverser. In bus breaker view, isCoupler always returns false, as I'm not sure on how to detect it there. Besides, isn't it a bit tough though to use a traverser on each switch to open for all contingencies?

@flo-dup flo-dup mentioned this issue Jul 16, 2021
3 tasks
@geofjamg
Copy link
Member

geofjamg commented Dec 23, 2022

Can we close this issue?

Yes I think we can because contingency propagation is no longer supported in sensitivity analysis.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants