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

Check null values for droop and P0 (2e patch) #523

Merged
merged 16 commits into from
Sep 2, 2024
Merged

Conversation

thangqp
Copy link
Contributor

@thangqp thangqp commented Aug 27, 2024

A PR completed for the previous PR: #512

When extension is not yet created:

  • If all fields are provided => OK
  • If one of fields is provided and one of others fields not provided => NOK
  • If none of fields is provided => OK

Copy link
Contributor

@Mathieu-Deharbe Mathieu-Deharbe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I quote Thibault :
the switch off and the k and P0 fields filled means that an extension is created (with AC emulation disabled)
This is not the case in this PR (in this situation you don't create the extension)

@thangqp
Copy link
Contributor Author

thangqp commented Aug 28, 2024

I quote Thibault : the switch off and the k and P0 fields filled means that an extension is created (with AC emulation disabled) This is not the case in this PR (in this situation you don't create the extension)

DONE
I created a share static method 'checkDroop' in VscModification which is used also in VscCreation

if (Boolean.FALSE.equals(modificationInfos.getAngleDroopActivePowerControl()) && !isPresentDroop && !isPresentP0) {
return;
}
// at least one field is provided but not for others => NOT OK
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// at least one field is provided but not for others => NOT OK
// at least one field is provided but not for the others => NOT OK

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DONE!
Corrected also in modification

}
// otherwise, i.e. all fields are not provided => OK extension will not be created
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// otherwise, i.e. all fields are not provided => OK extension will not be created
// otherwise, i.e. none of the fields is provided => OK extension will not be created

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DONE!
Corrected also in modification

Comment on lines 330 to 332
assertThat(getNetwork().getHvdcLine("vsc1")).isNotNull();
HvdcLine hvdcLine = getNetwork().getHvdcLine("vsc1");
assertThat(hvdcLine).isNotNull();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aren't you checking the same thing twice ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DONE!
Removed line 330

Copy link

sonarqubecloud bot commented Sep 2, 2024

@thangqp thangqp merged commit f496b43 into main Sep 2, 2024
3 checks passed
@thangqp thangqp deleted the hdvc_droop_check_nulls branch September 2, 2024 09:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants