stevengj / nlopt

library for nonlinear optimization, wrapping many algorithms for global and local, constrained or unconstrained, optimization
Other
1.89k stars 588 forks source link

AGS algorithm in Matlab #532

Closed mangelett closed 1 year ago

mangelett commented 1 year ago

Hi,

I would like to use the AGS algorithm in Matlab. Does it is available ? I try the C code in the the NLOPT tutorial with NLOPT_GN_AGS: the codes runs but the optimization fails with the return code -2. I also run the Python code of the issue #285 and I obtained a result. So I think the AGS algorithmis has been compiled during the installation. But inside MATLAB, the variable NLOPT_GN_AGS is not recognizer.

Thanks for your help

stevengj commented 1 year ago

Should be fixed by #533. For now, you can work around this by simply passing 43 for the algorithm (since that's the value of the NLOPT_GN_AGS constant).

mangelett commented 1 year ago

Thank you for your answer.