@@ -101,6 +101,9 @@ const EXTENDED_TRACE::Bool = false
101101const SHOW_EVERY:: Int = 1
102102const VERBOSITY:: Int = 1
103103
104+ const LINESEARCH_NAN_MAX_ITERATIONS = 10
105+ const LINESEARCH_NAN_FACTOR = 0.5
106+
104107"""
105108 Options
106109
@@ -129,6 +132,8 @@ Configurable options with defaults (values 0 and NaN indicate unlimited):
129132- `extended_trace = $(EXTENDED_TRACE) `,
130133- `show_every = $(SHOW_EVERY) `,
131134- `verbosity = $(VERBOSITY) `
135+ - `linesearch_nan_max_iterations = $(LINESEARCH_NAN_MAX_ITERATIONS) `
136+ - `linesearch_nan_factor = $(LINESEARCH_NAN_FACTOR) `
132137
133138Some of the constants are defined by the functions [`default_tolerance`](@ref) and [`absolute_tolerance`](@ref).
134139"""
@@ -155,6 +160,8 @@ struct Options{T}
155160 extended_trace:: Bool
156161 show_every:: Int
157162 verbosity:: Int
163+ linesearch_nan_max_iterations:: Int
164+ linesearch_nan_factor:: T
158165end
159166
160167function Options (T = Float64;
@@ -179,7 +186,9 @@ function Options(T = Float64;
179186 store_trace:: Bool = STORE_TRACE,
180187 extended_trace:: Bool = EXTENDED_TRACE,
181188 show_every:: Integer = SHOW_EVERY,
182- verbosity:: Integer = VERBOSITY)
189+ verbosity:: Integer = VERBOSITY,
190+ linesearch_nan_max_iterations:: Integer = LINESEARCH_NAN_MAX_ITERATIONS,
191+ linesearch_nan_factor:: AbstractFloat = LINESEARCH_NAN_FACTOR)
183192
184193 show_every = show_every > 0 ? show_every : 1
185194
@@ -204,7 +213,9 @@ function Options(T = Float64;
204213 store_trace,
205214 extended_trace,
206215 show_every,
207- verbosity)
216+ verbosity,
217+ linesearch_nan_max_iterations,
218+ linesearch_nan_factor)
208219end
209220
210221function Base. show (io:: IO , o:: SimpleSolvers.Options )
0 commit comments