Docs to come. This is more or less a clone of
instead provides a
knitro_optimize. Considering that KNITRO is very much not
gratis or libre software and is much less commonly used than Ipopt, I don't see
much of a reason to register this package. But I will add docs and work to
feature parity with
StandaloneIpopt.jl in the near future.
knitro_optimize. See the tests and example files for a demonstration.
knitro_nlsolve. See the test file for a demonstration.
The main function here is
knitro_optimize. This function has a signature that
looks like this:
knitro_optimize(obj, ini, constraints=noconstraints(); # starting kwargs: box_lower=-floatmax(), box_upper=floatmax(), param_file=nothing)
obj(x)is your objective function.
iniis your vector giving the initialization.
constraintsis an objective of type
Constraints. See the demo or test files for how to pass in your constraints, or the file
./src/constraints.jlfor information on the actual struct information. For now, there is no option to provide your own constraint Jacobians. It's always just going to use
ForwardDiff. At some point I'll put this option in though.
box_lower, if one number, is expanded to
fill(box_lower, length(ini)), and is the lower bounds for each component of the argument. If it is a vector, that is just used directly.
box_upperis the same, but for the upper bounds.
param_fileis a parameter file that KNITRO reads. Instead of trying to offer every option through kwargs in this package, I think it's easier to just make you write your own little text file and pass it in. Annoying, maybe, but not as annoying as emailing me because I didn't expose your favorite option as a kwarg.
knitro_nlsolve function is much more bare-bones: you give your function
fn(buf, x) and an initial guess, optionally the
args, and that's it. At some point I'll offer user-provided Jacobians.