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

VoltageLimitOverride version 2 #26

Closed
annetill opened this issue Oct 5, 2023 · 1 comment
Closed

VoltageLimitOverride version 2 #26

annetill opened this issue Oct 5, 2023 · 1 comment
Assignees

Comments

@annetill
Copy link
Member

annetill commented Oct 5, 2023

Describe the current behavior

For the moment, we have as parameters:

Map<String, VoltageLimitOverride> specificVoltageLimits = new HashMap<>();
specificVoltageLimits.put("JAZENP1", new VoltageLimitOverride(-5, 5));
specificVoltageLimits.put("JAZENP4", new VoltageLimitOverride(-5, 5));
specificVoltageLimits.put("BRAEKP1", new VoltageLimitOverride(-5, 5));

But, it does not work for:

  • Voltage levels without any low or high voltage limit. The AMPL has a default behavior in that case (but not ideal).
  • Voltage levels with just a high or a low voltage limit. It throws during Java integration if we try to override (and it is normal).
Exception in thread "main" com.powsybl.commons.PowsyblException: Voltage level 'JAZENP1' has only one voltage limit defined (min:19.0, max:NaN). Please define none or both.
	at com.powsybl.openreac.parameters.input.OpenReacParameters.checkIntegrity(OpenReacParameters.java:206)
	at com.powsybl.openreac.OpenReacRunner.run(OpenReacRunner.java:46)

Describe the expected behavior

  1. The integrity test must be done also for voltage levels without any voltage limit (both case).
  2. It could be better not to throw but to add a log with all the issues and throw (or return a false status in the result).
  3. Increase the class VoltageLimitOverride.
  • Add a boolean that says if low limit is absolute or relative ;
  • Add a boolean that says if high limit is absolute or relative ;
  • Change the constructor to take the 2 booleans and 2 values (that could be relative or absolute) ;
  • getDeltaLowVoltageLimit() and getDeltaHighVoltageLimit() must return Optional ;
  • Add 2 new methods getLowVoltageLimit() and getDeltaHighVoltageLimit() that returns Optional.

Describe the motivation

No response

Extra Information

No response

@annetill
Copy link
Member Author

Resolved by #27

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

No branches or pull requests

2 participants