-
Notifications
You must be signed in to change notification settings - Fork 0
Check power values #154
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
base: main
Are you sure you want to change the base?
Check power values #154
Conversation
Signed-off-by: basseche <bassel.el-cheikh_externe@rte-france.com>
… creation and modification)
Signed-off-by: basseche <bassel.el-cheikh_externe@rte-france.com>
89d31fb to
86c8d10
Compare
| double minP = modificationInfos.getMinP() != null ? modificationInfos.getMinP().getValue() : generator.getMinP(); | ||
| double maxP = modificationInfos.getMaxP() != null ? modificationInfos.getMaxP().getValue() : generator.getMaxP(); | ||
| double targetP = modificationInfos.getTargetP() != null ? modificationInfos.getTargetP().getValue() : generator.getTargetP(); | ||
| Double pImp = modificationInfos.getPlannedActivePowerSetPoint() != null ? modificationInfos.getPlannedActivePowerSetPoint().applyModification(oldValue) : null; |
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.
plannedActivePowerSetpoint is better than pImp ?
|
|
||
| public static void checkPowerValues(String errorMessage, double minP, double maxP, double targetP, Double pImp, NetworkModificationException.Type exceptionType) throws NetworkModificationException { | ||
| checkActivePowerValue(errorMessage, FIELD_ACTIVE_POWER_TARGET, targetP, minP, maxP, exceptionType); | ||
| if (pImp != null) { |
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.
why this check ?
we have already if (modificationInfos.getPlannedActivePowerSetPoint() != null)
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 is not for the same function
|



PR Summary
Add check for massive modification on power values to respect :
Pmin < PImp< Pmax & Pmin< PCons < Pmax
concerned modifications