Thanks everyone for your answers.

It seems like the way to go about this is to cache my values and make sure
to overwrite them every time my "cost" decreases from the previous
iteration.

Best regards,



Carlos Tampier
Investigador
Advanced Mining Technology Center (AMTC)
Universidad de Chile
Av. Tupper 2007, 837-0451 Santiago, Chile

Tel: +56-2-2977 1019
E-mail: [email protected]

On Thu, Mar 23, 2017 at 10:33 AM, Steven G. Johnson <[email protected]>
wrote:

>
> > On Mar 22, 2017, at 7:39 PM, Adam Hirst <[email protected]> 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
> [email protected]
> http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/nlopt-discuss
>
_______________________________________________
NLopt-discuss mailing list
[email protected]
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/nlopt-discuss

Reply via email to