@@ -140,12 +140,12 @@ function hessian!(workspace::TRARCWorkspace, nlp, x)
140140end
141141
142142function TRARC (
143- nlp_stop:: NLPStopping{Pb,M,SRC,NLPAtX{T,S},MStp,LoS} ;
143+ nlp_stop:: NLPStopping{Pb,M,SRC,NLPAtX{Score, T,S},MStp,LoS} ;
144144 TR:: TrustRegion = TrustRegion (T (10.0 )),
145145 hess_type:: Type{Hess} = HessOp,
146146 pdata_type:: Type{ParamData} = PDataKARC,
147147 kwargs... ,
148- ) where {Pb,M,SRC,MStp,LoS,S,T,Hess,ParamData}
148+ ) where {Pb,M,SRC,MStp,LoS,Score, S,T,Hess,ParamData}
149149 nlp = nlp_stop. pb
150150
151151 if ParamData == PDataNLSST
@@ -170,15 +170,15 @@ function compute_Δq(workspace, Hx, d, ∇f)
170170end
171171
172172function TRARC (
173- nlp_stop:: NLPStopping{Pb,M,SRC,NLPAtX{T,S},MStp,LoS} ,
173+ nlp_stop:: NLPStopping{Pb,M,SRC,NLPAtX{Score, T,S},MStp,LoS} ,
174174 PData:: ParamData ,
175175 workspace:: TRARCWorkspace{T,S,Hess} ,
176176 TR:: TrustRegion ;
177177 solve_model:: Function = solve_modelKARC,
178178 robust:: Bool = true ,
179179 verbose:: Bool = false ,
180180 kwargs... ,
181- ) where {Pb,M,SRC,MStp,LoS,S,T,Hess,ParamData}
181+ ) where {Pb,M,SRC,MStp,LoS,Score, S,T,Hess,ParamData}
182182 nlp, nlp_at_x = nlp_stop. pb, nlp_stop. current_state
183183 xt, xtnext, ∇f, ∇fnext = workspace. xt, workspace. xtnext, workspace.∇f, workspace.∇fnext
184184 d, Hx = workspace. d, workspace. Hstruct. H
@@ -195,10 +195,11 @@ function TRARC(
195195 norm_∇f = norm (∇f)
196196 nlp_stop. meta. optimality0 = norm_∇f
197197
198- Stopping. _smart_update! (nlp_at_x, x = xt, fx = ft, gx = ∇f)
198+ set_x! (nlp_at_x, xt)
199+ set_fx! (nlp_at_x, ft)
200+ set_gx! (nlp_at_x, ∇f)
199201 OK = start! (nlp_stop)
200202 Hx = hessian! (workspace, nlp, xt)
201- ! OK && Stopping. _smart_update! (nlp_at_x, Hx = Hx)
202203
203204 iter = 0 # counter different than stop count
204205 succ, unsucc, verysucc, unsuccinarow = 0 , 0 , 0 , 0
@@ -276,10 +277,11 @@ function TRARC(
276277 end # while !success
277278
278279 nlp_stop. meta. nb_of_stop = iter
279- Stopping. _smart_update! (nlp_at_x, x = xt, fx = ft, gx = ∇f)
280+ set_x! (nlp_at_x, xt)
281+ set_fx! (nlp_at_x, ft)
282+ set_gx! (nlp_at_x, ∇f)
280283 OK = stop! (nlp_stop)
281284 Hx = hessian! (workspace, nlp, xt)
282- success && Stopping. _smart_update! (nlp_at_x, Hx = Hx)
283285 end # while !OK
284286
285287 return nlp_stop
0 commit comments