~cgeoga/StandaloneIpopt.jl

Simple convenience bindings for using Ipopt
5dff03df — Chris Geoga 1 year, 9 months ago
update Julia deps in updater.sh
9cef19f0 — Chris Geoga 1 year, 9 months ago
Complete revamp of closure-less internals, all tests passing and
9e3f75a5 — Chris Geoga 1 year, 9 months ago
Fixed bug and added testing for individual component functions.

refs

master
browse  log 

clone

read-only
https://git.sr.ht/~cgeoga/StandaloneIpopt.jl
read/write
git@git.sr.ht:~cgeoga/StandaloneIpopt.jl

You can also use your local clone with git send-email.

#StandaloneIpopt.jl

builds.sr.ht status Issue tracker

A simple package that uses Ipopt.jl to solve constrained nonlinear optimization problems. See the examples and test files for usage demonstrations.

For the moment, it is very autodiff-oriented. Two functions are exported:

  • ipopt_optimize(objective, ini; [kwargs...]), which uses some AD tool of your choice (between ForwardDiff and ReverseDiff+ForwardDiff) to get gradients and Hessians (unless you use Ipopt's BFGS approximation).

  • ipopt_nlsolve(fn, ini; [kwargs...]), which solves the nonlinear system of equations fn(v) = 0. Again, AD is used for the Jacobian.

If you like the interface but want to provide your own gradient and/or Lagrangian Hessian, let me know and I can put it in.

#Features

  • Optional mixed-mode (forward-over-reverse) AD. It compiles the reverse-mode tapes, so even if you pass in an ugly and inefficient allocating objective you'll get nice gradients and Hessians. On the flip side, if compiling the tape doesn't work for you, I don't have much to offer for mixed-mode at present and you're stuck with just forward mode.

  • Pass in any Ipopt argument as a normal kwarg: ipopt_optimize(obj, ini, [...], alpha_red_factor=0.15, [...]).

#Disclaimer

I can't promise this will be a good fit for you, and you may well be better off using JuMP or Nonconvex.jl. But if your needs are simple and you really need to pass in your objective function as a closure, for example, I also don't think you really stand to gain very much by using those very complex packages. I expect that this may be useful to a small but nontrivial fraction of Julia users. It's also on the MIT license and I welcome suggestions and/or enhancements. Sourcehut uses email and not PRs, but you can also just email me a patch file. I don't expect too too much traffic here.

#Contact

My email address(es) are listed on my personal website, which you can find with any search engine.