Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix option bound_relax_factor #361

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
![logo](https://github.com/MadNLP/MadNLP.jl/blob/master/logo-full.svg)
![logo](https://github.com/MadNLP/MadNLP.jl/blob/master/logo-full.svg)

*A [nonlinear programming](https://en.wikipedia.org/wiki/Nonlinear_programming) solver based on the filter line-search [interior point method](https://en.wikipedia.org/wiki/Interior-point_method) (as in [Ipopt](https://github.com/coin-or/Ipopt)) that can handle/exploit diverse classes of data structures, either on [host](https://en.wikipedia.org/wiki/Central_processing_unit) or [device](https://en.wikipedia.org/wiki/Graphics_processing_unit) memories.*

Expand Down
4 changes: 2 additions & 2 deletions src/IPM/solver.jl
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ function initialize!(solver::AbstractMadNLPSolver{T}) where T
solver.y,
solver.rhs,
solver.ind_ineq;
tol=opt.tol,
tol=opt.bound_relax_factor,
bound_push=opt.bound_push,
bound_fac=opt.bound_fac,
)
Expand Down Expand Up @@ -216,7 +216,7 @@ function regular!(solver::AbstractMadNLPSolver{T}) where T
if (solver.cnt.k!=0 && !solver.opt.jacobian_constant)
eval_jac_wrapper!(solver, solver.kkt, solver.x)
end

jtprod!(solver.jacl, solver.kkt, solver.y)
sd = get_sd(solver.y,solver.zl_r,solver.zu_r,T(solver.opt.s_max))
sc = get_sc(solver.zl_r,solver.zu_r,T(solver.opt.s_max))
Expand Down
8 changes: 4 additions & 4 deletions src/options.jl
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ end

# NLP options
kappa_d::Float64 = 1e-5
fixed_variable_treatment::Type = kkt_system <: MadNLP.SparseCondensedKKTSystem ? MadNLP.RelaxBound : MadNLP.MakeParameter
fixed_variable_treatment::Type = kkt_system <: MadNLP.SparseCondensedKKTSystem ? MadNLP.RelaxBound : MadNLP.MakeParameter
equality_treatment::Type = kkt_system <: MadNLP.SparseCondensedKKTSystem ? MadNLP.RelaxEquality : MadNLP.EnforceEquality
boudn_relax_factor::Float64 = 1e-8
bound_relax_factor::Float64 = 1e-8
jacobian_constant::Bool = false
hessian_constant::Bool = false
hessian_approximation::Type = ExactHessian
Expand Down Expand Up @@ -171,9 +171,9 @@ function _get_primary_options(options)
end

function load_options(nlp; options...)

primary_opt, options = _get_primary_options(options)

# Initiate interior-point options
opt_ipm = MadNLPOptions(nlp; primary_opt...)
linear_solver_options = set_options!(opt_ipm, options)
Expand Down
Loading