libprima / prima

PRIMA is a package for solving general nonlinear optimization problems without using derivatives. It provides the reference implementation for Powell's derivative-free optimization methods, i.e., COBYLA, UOBYQA, NEWUOA, BOBYQA, and LINCOA. PRIMA means Reference Implementation for Powell's methods with Modernization and Amelioration, P for Powell.
http://libprima.net
BSD 3-Clause "New" or "Revised" License
292 stars 36 forks source link

`npt` is missing from the C interface #67

Closed zaikunzhang closed 10 months ago

zaikunzhang commented 10 months ago

Hi @jschueller Julien,

I noted just now that npt was not an input of the C interface. This is an important parameter, and it should be exposed to the user. The recommended value is 2n+1, which should be documented clearly and illustrated in the examples. Powell did mention that other values may provide excellent results in some situations.

npt exists only in NEWUOA, BOBYQA, and LINCOA (COBYLA essentially fixes npt=n+1, and UOBYQA fixes npt=(n+1)(n+2)/2, and hence they are not inputs): https://github.com/libprima/prima/blob/0afff46df6164eaef0972e4d8fbc798caa9aca77/fortran/newuoa/newuoa.f90#L100-L103 https://github.com/libprima/prima/blob/e280f51e114641ffedccb1159c9b363f58d46ed2/fortran/bobyqa/bobyqa.f90#L114-L122 https://github.com/libprima/prima/blob/0afff46df6164eaef0972e4d8fbc798caa9aca77/fortran/lincoa/lincoa.f90#L149-L155

See also discussions at https://github.com/emmt/OptimPack/issues/2#issuecomment-1721275282 .

Thanks.

Zaikun

zaikunzhang commented 10 months ago

closed by https://github.com/libprima/prima/pull/68. Thanks.