> On Mar 22, 2017, at 7:39 PM, Adam Hirst <ahi...@cedint.upm.es> wrote: > However, I don't think that NLopt provides any guarantees about: > 1) That your constraints will always be evaluated immediately after your > main function, and be at the same X.
In practice, I think most of the NLopt algorithms provide this behavior, though it isn't a documented guarantee. Even without a guarantee, however, you can always: 1) cache the value of X from the last objective calculation f(X), along with any intermediate data 2) when the constraint fc(Y) is evaluated, and if lastX==Y you can re-use your cached intermediate data. Otherwise recompute them. _______________________________________________ NLopt-discuss mailing list NLopt-discuss@ab-initio.mit.edu http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/nlopt-discuss