Skip to content

Commit 1343a2f

Browse files
update subsolver constructor logic
1 parent 165dc16 commit 1343a2f

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/TR_alg.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ function TRSolver(
4545
v0 ./= sqrt(reg_nlp.model.meta.nvar)
4646
v1 = similar(v0)
4747

48-
subpb = ShiftedProximableQuadraticNLPModel(reg_nlp, xk, ∇f = ∇fk, χ = χ, has_bounds = (has_bounds(reg_nlp.model) || subsolver == TRDHSolver))
48+
indicator_type = has_bounds(reg_nlp.model) || (subsolver == TRDHSolver) ? :box : :ball
49+
subpb = ShiftedProximableQuadraticNLPModel(reg_nlp, xk, ∇f = ∇fk, indicator_type = indicator_type, tr_norm = χ)
4950
substats = RegularizedExecutionStats(subpb)
5051
subsolver = subsolver(subpb)
5152

@@ -407,7 +408,7 @@ function SolverCore.solve!(
407408
if η1 ρk < Inf
408409
xk .= xkn
409410

410-
shift!(solver.subpb, xk, compute_grad = compute_grad)
411+
shift!(solver.subpb, xk)
411412

412413
fk = fkn
413414
hk = hkn

0 commit comments

Comments
 (0)