|
|
◆ optif0_r()
| void optif0_r |
( |
int |
n, |
|
|
double |
x[], |
|
|
double |
xpls[], |
|
|
double * |
fpls, |
|
|
double |
work[], |
|
|
int |
lwork, |
|
|
int * |
info, |
|
|
double |
xx[], |
|
|
double |
yy, |
|
|
int * |
irev |
|
) |
| |
Minimum of a multivariable nonlinear function (quasi-Newton method) (simple driver) (reverse communication version)
- Purpose
- optif0_r finds the local minimum point (xs1, xs2, ..., xsn) of general nonlinear function f(x1, x2, ..., xn) (a twice continuously differentiable real-valued function).
The first order finite difference is used to compute the gradients, and the secant method (BFGS update) is used to compute the Hessian. The steps are computed by the line search.
optif0_r is equivalent to using optif9_r with setting default parameters. So that the problem is solved by the quasi-Newton method (BFGS method).
- Parameters
-
| [in] | n | The order or dimension of the problem. (n > 1) |
| [in] | x[] | Array x[lx] (lx >= n)
Initial approximation of the solution vector. |
| [out] | xpls[] | Array xpls[lxpls] (lxpls >= n)
Local minimum. |
| [out] | fpls | Function value at local minimum xpls. |
| [out] | work[] | Array work[lwork]
Work area.
If info = 0, sub-code will be returned in work[0].
= 1: Relative gradient is close to zero.
= 2: Successive iterates within tolerance. |
| [in] | lwork | The length of work[]. (lwork >= n*(n + 10)) |
| [out] | info | = 0: Successful exit (see sub-code in work[0])
= -1: The argument n had an illegal value (n <= 1)
= -6: The argument lwork had an illegal value (lwork < n*(n + 10))
= 1: Last global step failed to locate a point lower than xpls. Either xpls is an approximate local minimum of the function, the function is too nonlinear for this algorithm, or steptl is too large.
= 2: Iteration limit (200) exceeded
= 3: Maximum step size stepmx exceeded five consecutive times. Either the function is unbounded below, becomes asymptotic to a finite value from above in some direction, or stepmx is too small. |
| [out] | xx[] | Array xx[lxx] (lxx >= n)
irev = 1 to 20: xx[] contains the abscissa where the function value should be evaluated and given in the next call. |
| [in] | yy | irev = 1 to 20: The function value f(xx[]) should be given in yy in the next call. |
| [in,out] | irev | Control variable for reverse communication.
[in] Before first call, irev should be initialized to zero. On succeeding calls, irev should not be altered.
[out] If irev is not zero, complete the following process and call this routine again.
= 0: Computation finished. See return code in info.
= 1 to 20: User should set the function values at xx[] in yy. Do not alter any variables other than yy. |
- Reference
- CMLIB
|