I have an untidy objective function that takes 4 vectors (34, 120, 120, 120 floats) and evaluates to a float, and an slow update function (~2 secs) that takes the same 4 vectors, alters and returns them. There is little I want to assume about the structure other than it is minimizable. What reasonably straightforward software is recommended?

What is the purpose of the update function?

You could use a derivative-free method from NLopt, but finding a minima is likely very difficult.

The objective function just gives a figure of merit for the current solution, the update function alters the values that the objective function uses – but that cannot be what you are asking

The observations come from a panel study with different treatments and associated log priors. The objective is to find coeffs that distill information about the relative merit/import of the treatments. The problem space is probably convex, but I am not sure of that. The Jacobian may be approximated numerically (automatically), if an optimization method does that for me.

I guess i understand the merit function aspect.

But I don’t understand the update function. What is updating? Why? I just want to have a function that i can pass a vector of decisions to and get back an objective value.

I see your point.

You can try the ADNLPModels package. It will try using ForwardDiff. And then you can use a unconstrained or bound-constrained solver from JSOSolvers or use Percival, and pass a callback function. The callback runs at the end of the iteration, and you can call update then.

Here’s an example of the callback use: Using callbacks

Looking …