Reference
Contents
Index
NLPModelsIpopt.IpoptSolver
— TypeIpoptSolver(nlp; kwargs...,)
Returns an IpoptSolver
structure to solve the problem nlp
with ipopt
.
LinearOperators.reset!
— Methodsolver = reset!(solver::IpoptSolver, nlp::AbstractNLPModel)
Reset the solver
with the new model nlp
.
If nlp
has different bounds on the variables/constraints or a different number of nonzeros elements in the Jacobian/Hessian, then you need to create a new IpoptSolver
.
NLPModelsIpopt.ipopt
— Methodoutput = ipopt(nlp; kwargs...)
Solves the NLPModel
problem nlp
using IpOpt
.
For advanced usage, first define a IpoptSolver
to preallocate the memory used in the algorithm, and then call solve!
: solver = IpoptSolver(nlp) solve!(solver, nlp; kwargs...) solve!(solver, nlp, stats; kwargs...)
Optional keyword arguments
x0
: a vector of sizenlp.meta.nvar
to specify an initial primal guessy0
: a vector of sizenlp.meta.ncon
to specify an initial dual guess for the general constraintszL
: a vector of sizenlp.meta.nvar
to specify initial multipliers for the lower bound constraintszU
: a vector of sizenlp.meta.nvar
to specify initial multipliers for the upper bound constraints
All other keyword arguments will be passed to Ipopt as an option. See https://coin-or.github.io/Ipopt/OPTIONS.html for the list of options accepted.
Output
The returned value is a GenericExecutionStats
, see SolverCore.jl
.
Examples
using NLPModelsIpopt, ADNLPModels
nlp = ADNLPModel(x -> sum(x.^2), ones(3));
stats = ipopt(nlp, print_level = 0)
using NLPModelsIpopt, ADNLPModels
nlp = ADNLPModel(x -> sum(x.^2), ones(3));
solver = IpoptSolver(nlp);
stats = solve!(solver, nlp, print_level = 0)
NLPModelsIpopt.set_callbacks
— Methodset_callbacks(nlp::AbstractNLPModel)
Return the set of functions needed to instantiate an IpoptProblem
.