MadNLP Options
Primary options
These options are used to set the values for other options. The default values are inferred from the NLP model.
tol::Float64
Termination tolerance. The default value is1e-8for double precision. The solver terminates if the scaled primal, dual, complementary infeasibility is less thantol. Valid range is $(0,\infty)$.callback::TypeValid values are:MadNLP.{DenseCallback,SparseCallback}.kkt_system::TypeThe type of KKT system. Valid values areMadNLP.{SpasreKKTSystem,SparseUnreducedKKTSystem,SparseCondensedKKTSystem,DenseKKTSystem,DenseCondensedKKTSystem}.linear_solver::Type
Linear solver used for solving primal-dual system. Valid values are: {MadNLP.UmfpackSolver,MadNLP.LDLSolver,MadNLP.CHOLMODSolver,MadNLP.MumpsSolver,MadNLP.PardisoSolver,MadNLP.PardisoMKLSolver,MadNLP.Ma27Solver,MadNLP.Ma57Solver,MadNLP.Ma77Solver,MadNLP.Ma86Solver,MadNLP.Ma97Solver,MadNLP.LapackCPUSolver,MadNLPGPU.LapackGPUSolver,MadNLPGPU.RFSolver,MadNLPGPU.GLUSolver,MadNLPGPU.CuCholeskySolver,MadNLPGPU.CUDSSSolver} (some may require using extension packages). The selected solver should be properly built in the build procedure. See README.md file.
General options
iterator::Type = RichardsonIterator
Iterator used for iterative refinement. Valid values are: {MadNLPRichardson,MadNLPKrylov}.Richardsonuses Richardson iterationKrylovuses restarted Generalized Minimal Residual method implemented in IterativeSolvers.jl.
blas_num_threads::Int = 1
Number of threads used for BLAS routines. Valid range is $[1,\infty)$.disable_garbage_collector::Bool = false
Iftrue, Julia garbage collector is temporarily disabled while solving the problem, and then enabled back once the solution is complete.rethrow_error::Bool = true
Iffalse, any internal error thrown byMadNLPand interruption exception (triggered by the user via^C) is caught, and not rethrown. If an error is caught, the solver terminates with an error message.
Output options
print_level::LogLevels = INFO
stdoutprint level. Any message with level less thanprint_levelis not printed onstdout. Valid values are:MadNLP.{TRACE,DEBUG,INFO,NOTICE,WARN,ERROR}.output_file::String = INFO
If not"", the output log is teed to the file at the path specified inoutput_file.file_print_level::LogLevels = TRACE
File print level; any message with level less thanfile_print_levelis not printed on the file specified inoutput_file. Valid values are:MadNLP.{TRACE,DEBUG,INFO,NOTICE,WARN,ERROR}.
Termination options
max_iter::Int = 3000
Maximum number of interior point iterations. The solver terminates with exit symbol:Maximum_Iterations_Exceededif the interior point iteration count exceedsmax_iter.acceptable_tol::Float64 = 1e-6
Acceptable tolerance. The solver terminates if the scaled primal, dual, complementary infeasibility is less thanacceptable_tol, foracceptable_iterconsecutive interior point iteration steps.acceptable_iter::Int = 15
Acceptable iteration tolerance. Valid rage is $[1,\infty)$.diverging_iterates_tol::Float64 = 1e20
Diverging iteration tolerance. The solver terminates with exit symbol:Diverging_Iteratesif the NLP error is greater thandiverging_iterates_tol.max_wall_time::Float64 = 1e6
Maximum wall time for interior point solver. The solver terminates with exit symbol:Maximum_WallTime_Exceededif the total solver wall time exceedsmax_wall_time.s_max::Float64 = 100.
NLP options
kappa_d::Float64 = 1e-5fixed_variable_treatment::FixedVariableTreatments = MakeParameter
Valid values are:MadNLP.{RelaxBound,MakeParameter}.equality_treatment::FixedVariableTreatments = MakeParameter
Valid values are:MadNLP.{RelaxEquality,EnforceEquality}.jacobian_constant::Bool = false
Iftrue, constraint Jacobian is only evaluated once and reused.hessian_constant::Bool = false
Iftrue, Lagrangian Hessian is only evaluated once and reused.bound_push::Float64 = 1e-2bound_fac::Float64 = 1e-2hessian_approximation::Type = ExactHessianquasi_newton_options::QuasiNewtonOptions = QuasiNewtonOptions()inertia_correction_method::InertiaCorrectionMethods = INERTIA_AUTO
Valid values are:MadNLP.{INERTIA_AUTO,INERTIA_BASED,INERTIA_FREE}.INERTIA_BASEDuses the strategy in Ipopt.INERTIA_FREEuses the strategy in Chiang (2016).INERTIA_AUTOusesINERTIA_BASEDif inertia information is available and usesINERTIA_FREEotherwise.
inertia_free_tol::Float64 = 0.
Initialization Options
dual_initialized::Bool = false
dual_initialization_method::Type = kkt_system <: MadNLP.SparseCondensedKKTSystem ? DualInitializeSetZero : DualInitializeLeastSquaresconstr_mult_init_max::Float64 = 1e3nlp_scaling::Bool = true:
Iftrue, MadNLP scales the nonlinear problem during the resolution.nlp_scaling_max_gradient::Float64 = 100.
Hessian perturbation options
min_hessian_perturbation::Float64 = 1e-20first_hessian_perturbation::Float64 = 1e-4max_hessian_perturbation::Float64 = 1e20perturb_inc_fact_first::Float64 = 1e2perturb_inc_fact::Float64 = 8.perturb_dec_fact::Float64 = 1/3jacobian_regularization_exponent::Float64 = 1/4jacobian_regularization_value::Float64 = 1e-8
Restoration options
soft_resto_pderror_reduction_factor::Float64 = 0.9999required_infeasibility_reduction::Float64 = 0.9
Line-search options
obj_max_inc::Float64 = 5.kappha_soc::Float64 = 0.99max_soc::Int = 4alpha_min_frac::Float64 = 0.05s_theta::Float64 = 1.1s_phi::Float64 = 2.3eta_phi::Float64 = 1e-4kappa_soc::Float64 = 0.99gamma_theta::Float64 = 1e-5gamma_phi::Float64 = 1e-5delta::Float64 = 1kappa_sigma::Float64 = 1e10barrier_tol_factor::Float64 = 10.rho::Float64 = 1000.
Barrier options
mu_init::Float64 = 1e-1mu_min::Float64 = 1e-9mu_superlinear_decrease_power::Float64 = 1.5tau_min::Float64 = 0.99mu_linear_decrease_factor::Float64 = .2
Linear Solver Options
Linear solver options are specific to the linear solver chosen at linear_solver option. Irrelevant options are ignored and a warning message is printed.
Ma27 (requires MadNLPHSL)
ma27_pivtol::Float64 = 1e-8ma27_pivtolmax::Float64 = 1e-4ma27_liw_init_factor::Float64 = 5.ma27_la_init_factor::Float64 = 5.ma27_meminc_factor::Float64 = 2.
Ma57 (requires MadNLPHSL)
ma57_pivtol::Float64 = 1e-8ma57_pivtolmax::Float64 = 1e-4ma57_pre_alloc::Float64 = 1.05ma57_pivot_order::Int = 5ma57_automatic_scaling::Bool = falsema57_block_size::Int = 16ma57_node_amalgamation::Int = 16ma57_small_pivot_flag::Int = 0
Ma77 (requires MadNLPHSL)
ma77_buffer_lpage::Int = 4096ma77_buffer_npage::Int = 1600ma77_file_size::Int = 2097152ma77_maxstore::Int = 0ma77_nemin::Int = 8ma77_order::Ma77.Ordering = Ma77.METISma77_print_level::Int = -1ma77_small::Float64 = 1e-20ma77_static::Float64 = 0.ma77_u::Float64 = 1e-8ma77_umax::Float64 = 1e-4
Ma86 (requires MadNLPHSL)
ma86_num_threads::Int = 1ma86_print_level::Float64 = -1ma86_nemin::Int = 32ma86_order::Ma86.Ordering = Ma86.METISma86_scaling::Ma86.Scaling = Ma86.SCALING_NONEma86_small::Float64 = 1e-20ma86_static::Float64 = 0.ma86_u::Float64 = 1e-8ma86_umax::Float64 = 1e-4
Ma97 (requires MadNLPHSL)
ma97_num_threads::Int = 1ma97_print_level::Int = -1ma97_nemin::Int = 8ma97_order::Ma97.Ordering = Ma97.METISma97_scaling::Ma97.Scaling = Ma97.SCALING_NONEma97_small::Float64 = 1e-20ma97_u::Float64 = 1e-8ma97_umax::Float64 = 1e-4
Mumps (requires MadNLPMumps)
mumps_dep_tol::Float64 = 0.mumps_mem_percent::Int = 1000mumps_permuting_scaling::Int = 7mumps_pivot_order::Int = 7mumps_pivtol::Float64 = 1e-6mumps_pivtolmax::Float64 = .1mumps_scaling::Int = 77
Umfpack (requires MadNLPUmfpack)
umfpack_pivtol::Float64 = 1e-4umfpack_pivtolmax::Float64 = 1e-1umfpack_sym_pivtol::Float64 = 1e-3umfpack_block_size::Float64 = 16umfpack_strategy::Float64 = 2.
Pardiso (requires MadNLPPardiso)
pardiso_matching_strategy::Pardiso.MatchingStrategy = COMPLETE2x2pardiso_max_inner_refinement_steps::Int = 1pardiso_msglvl::Int = 0pardiso_order::Int = 2
PardisoMKL
pardisomkl_num_threads::Int = 1pardiso_matching_strategy::PardisoMKL.MatchingStrategy = COMPLETE2x2pardisomkl_max_iterative_refinement_steps::Int = 1pardisomkl_msglvl::Int = 0pardisomkl_order::Int = 2
LapackGPU (requires MadNLPGPU)
lapackgpu_algorithm::LapackGPU.Algorithms = BUNCHKAUFMAN
LapackCPU
lapackcpu_algorithm::LapackCPU.Algorithms = BUNCHKAUFMAN
Iterator Options
Richardson
richardson_max_iter::Int = 10
Maximum number of Richardson iteration steps. Valid range is $[1,\infty)$.richardson_tol::Float64 = 1e-10
Convergence tolerance of Richardson iteration. Valid range is $(0,\infty)$.richardson_acceptable_tol::Float64 = 1e-5
Acceptable convergence tolerance of Richardson iteration. If the Richardson iteration counter exceedsrichardson_max_iterwithout satisfying the convergence criteria set withrichardson_tol, the Richardson solver checks whether the acceptable convergence criteria set withrichardson_acceptable_tolis satisfied; if the acceptable convergence criteria is satisfied, the computed step is used; otherwise, the augmented system is treated to be singular. Valid range is $(0,\infty)$.
Krylov (requires MadNLPIterative)
krylov_max_iter::Int = 10
Maximum number of Krylov iteration steps. Valid range is $[1,\infty)$.krylov_tol::Float64 = 1e-10
Convergence tolerance of Krylov iteration. Valid range is $(0,\infty)$.krylov_acceptable_tol::Float64 = 1e-5
Acceptable convergence tolerance of Krylov iteration. If the Krylov iteration counter exceedskrylov_max_iterwithout satisfying the convergence criteria set withkrylov_tol, the Krylov solver checks whether the acceptable convergence criteria set withkrylov_acceptable_tolis satisfied; if the acceptable convergence criteria is satisfied, the computed step is used; otherwise, the augmented system is treated to be singular. Valid range is $(0,\infty)$.krylov_restart::Int = 5
Maximum Krylov iteration before restarting. Valid range is $[1,\infty)$.
Reference
[Bunch, 1977]: J R Bunch and L Kaufman, Some stable methods for calculating inertia and solving symmetric linear systems, Mathematics of Computation 31:137 (1977), 163-179.
[Greif, 2014]: Greif, Chen, Erin Moulding, and Dominique Orban. "Bounds on eigenvalues of matrices arising from interior-point methods." SIAM Journal on Optimization 24.1 (2014): 49-83.
[Wächter, 2006]: Wächter, Andreas, and Lorenz T. Biegler. "On the implementation of an interior-point filter line-search algorithm for large-scale nonlinear programming." Mathematical programming 106.1 (2006): 25-57.
[Chiang, 2016]: Chiang, Nai-Yuan, and Victor M. Zavala. "An inertia-free filter line-search algorithm for large-scale nonlinear programming." Computational Optimization and Applications 64.2 (2016): 327-354.