Skip to content

Commit

Permalink
fix little issue
Browse files Browse the repository at this point in the history
Signed-off-by: belthlemar <[email protected]>
  • Loading branch information
MartinBelthle committed Jun 27, 2024
1 parent 48a82be commit 4328de8
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -181,10 +181,10 @@ private void refineTapToAngleConversionCoefficientAndUpdateBounds(LinearProblem
*/
private Pair<Integer, Integer> getMinAndMaxAdmissibleTaps(PstRangeAction pstRangeAction, State state) {
double prePerimeterAngle = prePerimeterRangeActionSetpoints.getSetpoint(pstRangeAction);
int minAdmissibleTap = pstRangeAction.convertAngleToTap(pstRangeAction.getMinAdmissibleSetpoint(prePerimeterAngle));
int maxAdmissibleTap = pstRangeAction.convertAngleToTap(pstRangeAction.getMaxAdmissibleSetpoint(prePerimeterAngle));
minAdmissibleTap = Math.min(maxAdmissibleTap, minAdmissibleTap);
maxAdmissibleTap = Math.max(maxAdmissibleTap, minAdmissibleTap);
int minTap = pstRangeAction.convertAngleToTap(pstRangeAction.getMinAdmissibleSetpoint(prePerimeterAngle));
int maxTap = pstRangeAction.convertAngleToTap(pstRangeAction.getMaxAdmissibleSetpoint(prePerimeterAngle));
int minAdmissibleTap = Math.min(maxTap, minTap);
int maxAdmissibleTap = Math.max(maxTap, minTap);

Pair<RangeAction<?>, State> lastAvailableRangeAction = RaoUtil.getLastAvailableRangeActionOnSameNetworkElement(optimizationPerimeter, pstRangeAction, state);
if (lastAvailableRangeAction != null) {
Expand Down

0 comments on commit 4328de8

Please sign in to comment.