@@ -38,7 +38,7 @@ function tron(::Val{:GaussNewton},
3838 σ :: Real = eltype (x)(10 ),
3939 max_eval :: Int = - 1 ,
4040 max_time :: Real = 30.0 ,
41- max_cgiter :: Int = nlp . meta . nvar ,
41+ max_cgiter :: Int = 50 ,
4242 cgtol :: Real = eltype (x)(0.1 ),
4343 atol :: Real = √ eps (eltype (x)),
4444 rtol :: Real = √ eps (eltype (x)),
@@ -313,7 +313,7 @@ function projected_gauss_newton!(x::AbstractVector{T}, A::Union{AbstractMatrix,A
313313 Fx:: AbstractVector{T} , Δ:: Real , cgtol:: Real , s:: AbstractVector{T} ,
314314 ℓ:: AbstractVector{T} , u:: AbstractVector{T} ;
315315 subsolver :: Symbol = :lsmr ,
316- max_cgiter:: Int = max ( 50 , length (x)) ) where T <: Real
316+ max_cgiter:: Int = 50 ) where T <: Real
317317 n = length (x)
318318 status = " "
319319 subsolver in tronls_allowed_subsolvers || error (" subproblem solver must be one of $tronls_allowed_subsolvers " )
@@ -340,9 +340,8 @@ function projected_gauss_newton!(x::AbstractVector{T}, A::Union{AbstractMatrix,A
340340 wanorm = norm (wa)
341341
342342 AZ = A * Z
343- st, stats = lssolver (AZ, - Ffree, radius= Δ, rtol= cgtol, atol= zero (T),
344- itmax= max_cgiter)
345- iters += length (stats. residuals)
343+ st, stats = lssolver (AZ, - Ffree, radius= Δ, rtol= cgtol, atol= zero (T))
344+ iters += 1
346345 status = stats. status
347346
348347 # Projected line search
0 commit comments