Skip to content

Commit 434fc8f

Browse files
committed
add Initialization Options to MadNLPOptimizer
1 parent c17159b commit 434fc8f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/OptimizationMadNLP/src/OptimizationMadNLP.jl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,10 @@ end
231231
hessian_constant::Bool = false
232232
hessian_approximation::Type = MadNLP.ExactHessian
233233

234+
# Initialization Options
235+
nlp_scaling::Bool = true
236+
nlp_scaling_max_gradient::Float64 = 100.0
237+
234238
# Linear solver configuration
235239
linear_solver::Union{Nothing, Type} = nothing # e.g., MumpsSolver, LapackCPUSolver, UmfpackSolver
236240

@@ -413,6 +417,8 @@ function __map_optimizer_args(cache,
413417
options[:jacobian_constant] = opt.jacobian_constant
414418
options[:hessian_constant] = opt.hessian_constant
415419
options[:hessian_approximation] = opt.hessian_approximation
420+
options[:nlp_scaling] = opt.nlp_scaling
421+
options[:nlp_scaling_max_gradient] = opt.nlp_scaling_max_gradient
416422
options[:print_level] = print_level
417423
options[:tol] = tol
418424
options[:max_iter] = max_iter

0 commit comments

Comments
 (0)