Skip to content

Commit

Permalink
add a check to avoid a nan when we calculating the leaving flow from …
Browse files Browse the repository at this point in the history
…danglingline

Signed-off-by: KAHYA Amira <amira.kahya@rte-france.com>
  • Loading branch information
kahyami authored and murgeyseb committed Oct 17, 2023
1 parent a4c9fe1 commit 0c195fc
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ private boolean isAreaBorder(HvdcLine hvdcLine) {
}

private double getLeavingFlow(DanglingLine danglingLine) {
return danglingLine.getTerminal().isConnected() ? -danglingLine.getBoundary().getP() : 0;
return danglingLine.getTerminal().isConnected() && !Double.isNaN(danglingLine.getBoundary().getP()) ? -danglingLine.getBoundary().getP() : 0;
}

private double getLeavingFlow(Line line) {
Expand Down

0 comments on commit 0c195fc

Please sign in to comment.