Hi Steven! > NLopt has a documented way to force the optimization to stop without > losing anything; see > > http://jdj.mit.edu/wiki/index.php/NLopt_Reference#Forced_termination Thank you for your answer! I have seen this of course, but the methods described there cannot be applied to Windows; or not on my system: As I wrote I don't find executables like 'nlopt_force_stop' which I can call. Is there something wrong with my installation? I vaguely remember to have read about some methods which wouldn't work properly under Windows but I can't find them anymore. I just noticed that I have version 2.2.3, while there already is a 2.2.4 - is that my problem?
> Returning NaN or -Inf is not a reliable way to stop an optimization
> algorithm, as it will play havoc with the calculations unless the code
> continually checks for such things.
True, but a 'forced termination' should be handled with special care
anyways. I just tried NaN and -Inf because those values are used for a
forced termination with other optimizers. If there's any other way to
break stop nlopt I would be glad :-)
For further explanation (maybe I'm doing something wrong?):
In my Matlab program I use NLOpt this way:
Setting all needed nopt options, in particular
nlopt.min_objective = @costfunction;
which leads to my Matlab cost function which returns the value of the
cost function.
And then
[xopt, fmin, retcode] = nlopt_optimize(nlopt, optim_params);
So the running optimization calls repeatedly my Matlab cost function.
But how am I supposed to stop the nlopt_optimize if not by returning
some special value (from the cost function) to nlopt_optimize?
Greetings,
Norman
<<attachment: Norman_Violet.vcf>>
_______________________________________________ NLopt-discuss mailing list [email protected] http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/nlopt-discuss
