Skip to content

Commit f7cbfc8

Browse files
committed
Ensure line search step is always a decrease
1 parent 6176525 commit f7cbfc8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

varipeps/optimization/line_search.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -600,7 +600,9 @@ def line_search(
600600
)
601601

602602
if descent_new_grad >= hz_wolfe_2_right:
603-
if hz_wolfe_1_left >= hz_wolfe_1_right:
603+
if hz_wolfe_1_left >= hz_wolfe_1_right and new_value <= (
604+
current_value + varipeps_config.line_search_hager_zhang_eps
605+
):
604606
break
605607

606608
hz_approx_wolfe_left = (

0 commit comments

Comments
 (0)