If the number of variables is changing, then you should destroy the nlopt_opt object (with nlopt_destroy) and create a new one on each loop iteration.
On Sep 5, 2014, at 5:49 PM, Miguel Angel Salazar de Troya <[email protected]> wrote: > How could I re-use the nl_opt object? I can't create it outside the loop > because I need to know the number of variables, which changes inside the loop. _______________________________________________ NLopt-discuss mailing list [email protected] http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/nlopt-discuss
