-
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
DcValueVoltageInitializer fails in presence of resistive only branches #683
Conversation
Signed-off-by: Damien Jeandemange <damien.jeandemange@artelys.com>
Signed-off-by: Geoffroy Jamgotchian <geoffroy.jamgotchian@gmail.com>
In fact, in addition to the regression from #666, there is also several issues that were already before:
So I tried in this PR to store all zero impedance infos for both AC and DC and as much as possible set everything in a lazy way to only calculate what is needed. |
if (minImpedance) { | ||
for (LfBranch branch : branches) { | ||
branch.setMinZ(dc, lowImpedanceThreshold); |
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 think we should not do this here at a post loading fix. z cut could be done in a cleaner way at branch creation.
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.
It has been designed like that because min z what dependent of the AC or DC context. Now, as we store both, we can do that at branch creation. Do you want me to do this?
Instead of the boolean dc which is not very readable we could have an enum like ? enum EquationMode {
AC,
DC_APPROX
} |
@@ -75,6 +77,14 @@ public class LfNetwork extends AbstractPropertyBag implements PropertyBag { | |||
|
|||
private GraphConnectivity<LfBus, LfBranch> connectivity; | |||
|
|||
private Graph<LfBus, LfBranch> dcZeroImpedanceSubGraph; |
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.
Maybe zeroImpedanceSubGraph and zeroImpedanceSpanningTree could be grouped in another object.
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.
Yes, it could be a good idea.
Signed-off-by: Geoffroy Jamgotchian <geoffroy.jamgotchian@rte-france.com>
Signed-off-by: Geoffroy Jamgotchian <geoffroy.jamgotchian@rte-france.com>
Signed-off-by: Geoffroy Jamgotchian <geoffroy.jamgotchian@rte-france.com>
Kudos, SonarCloud Quality Gate passed! |
#683) Signed-off-by: Damien Jeandemange <damien.jeandemange@artelys.com> Co-authored-by: Geoffroy Jamgotchian <geoffroy.jamgotchian@rte-france.com>
Signed-off-by: Damien Jeandemange damien.jeandemange@artelys.com
Please check if the PR fulfills these requirements (please use
'[x]'
to check the checkboxes, or submit the PR and then click the checkboxes)Does this PR already have an issue describing the problem ?
No
What kind of change does this PR introduce?
Bug fix
What is the current behavior? (You can also link to an open issue here)
Exception thrown by DcValueVoltageInitializer if the newtwork contains a resistive only branch.
What is the new behavior (if this is a feature change)?
TBD
Does this PR introduce a breaking change or deprecate an API?
No
Other information: