Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npt is missing from the C interface #67

Closed
zaikunzhang opened this issue Sep 15, 2023 · 1 comment
Closed

npt is missing from the C interface #67

zaikunzhang opened this issue Sep 15, 2023 · 1 comment
Assignees
Labels
c Issues related to the C interface or implementation

Comments

@zaikunzhang
Copy link
Member

zaikunzhang commented Sep 15, 2023

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):

! NPT
! Input, INTEGER(IK) scalar, default: 2N + 1.
! NPT is the number of interpolation conditions for each trust region model. Its value must be in
! the interval [N+2, (N+1)(N+2)/2].

! NPT
! Input, INTEGER(IK) scalar, default: 2N + 1.
! NPT is the number of interpolation conditions for each trust region model. Its value must be in
! the interval [N+2, (N+1)(N+2)/2]. Powell commented that "the value NPT = 2*N+1 being recommended
! for a start ... much larger values tend to be inefficient, because the amount of routine work of
! each iteration is of magnitude NPT**2, and because the achievement of adequate accuracy in some
! matrix calculations becomes more difficult. Some excellent numerical results have been found in
! the case NPT=N+6 even with more than 100 variables." And "choices that exceed 2*N+1 are not
! recommended" by Powell.

! NPT
! Input, INTEGER(IK) scalar, default: 2N + 1.
! NPT is the number of interpolation conditions for each trust region model. Its value must be in
! the interval [N+2, (N+1)(N+2)/2]. Typical choices of Powell were NPT=N+6 and NPT=2*N+1. Powell
! commented in his code that "larger values tend to be highly inefficient when the number of
! variables is substantial, due to the amount of work and extra difficulty of adjusting more
! points."

See also discussions at emmt/OptimPack#2 (comment) .

Thanks.

Zaikun

@zaikunzhang zaikunzhang added the c Issues related to the C interface or implementation label Sep 15, 2023
@zaikunzhang
Copy link
Member Author

closed by #68. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c Issues related to the C interface or implementation
Projects
None yet
Development

No branches or pull requests

2 participants