voidfcn (intn, doublex[], double*f) (Input/Output) User-supplied function to evaluate the function to be minimized.
Arguments
intn (Input) Length of x.
doublex[] (Input) Array of length n, the point at which the function is evaluated.
double*f (Output) The computed function value at the point.
intn (Input) Number of variables, n ≥ 2.
intnpt (Input) The number of interpolation conditions, which is required to be in the interval [n+2,(n+1)(n+2)/2]. Typical choices are npt=n+6 and npt=2*n+1. 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.
intm (Input) Number of constraints.
doublea[] (Input) Array of size m by n containing the constraints. The constraints are of the form , where denotes the i-th constraint.
doubleb[] (Input) An array of size m containing the right-hand sides of the constraints.
doublerhobeg (Input) The initial value of a trust region radius, 0 <rhoend <= rhobeg. Typically, rhobeg should be about 1/10 of the greatest expected change to a variable.
doublerhoend (Input) The final value of a trust region radius, 0 <rhoend <= rhobeg. Variable rhoend should indicate the accuracy that is required in the final values of the variables.
Return Value
An array of length n containing the best estimate for the minimum. To release this space, use imsl_free. If no solution was computed, then NULL is returned.
IMSL_XGUESS, doublexguess[] (Input) An array of length n that contains an initial guess to the minimum. If the initial guess is not feasible, then it is replaced by a feasible starting point determined as the solution of a constrained linear least-squares problem. Default: xguess = 0.0
IMSL_MAX_FCN, int*maxfcn (Input/Output) On input, maximum allowed number of function evaluations. On output, actual number of function evaluations needed. Default: maxfcn = 200
IMSL_PRINT, intiprint (Input) Parameter indicating the desired output level.
iprint
Action
0
No output printed
1
Output only upon return from imsl_d_min_con_lin_trust_region.
2
The best feasible vector of variables so far and the corresponding value of the objective function are printed whenever rho is reduced, where rho is the current lower bound on the trust region radius.
3
Output each new value of F with its variables.
Default: iprint = 0
IMSL_FVALUE, double*fvalue (Output) Function value at the computed solution.
IMSL_RETURN_USER, doublex[] (Output) User-supplied array of length n containing the computed solution.
voidfcn (int n, doublex[],double*f, void*data) (Input) User supplied function to evaluate the function to be minimized. This function also accepts a pointer to data supplied by the user. data is a pointer to the data to be passed to the user-supplied function. See Passing Data to User-Supplied Functions in this manual’s introduction for more details.
Arguments
intn (Input) Length of x.
doublex[] (Input) Array of length n, the point at which the function is evaluated.
double*f (Output) The computed function value at the point.
void*data (Input) A pointer to the data to be passed to the user-supplied function.
Description
The function imsl_d_min_con_lin_trust_region implements a trust region method that forms quadratic models by interpolation to minimize a multivariate function, subject to general linear inequality constraints.
Usually, many degrees of freedom remain in each new model after satisfying the interpolation conditions. These remaining degrees of freedom are taken up by minimizing the Frobenius norm of the change to the second derivative matrix of the model, see Powell (2004).
One new function value is calculated at each iteration, usually at a point where the current model predicts a reduction in the least value so far reached by the objective function subject to the linear constraints. Alternatively, the algorithm may choose a new vector of variables to replace an interpolation point that is too far away for reliability, in which case this new point need not satisfy the linear constraints.
Function imsl_d_min_con_lin_trust_region is based on the LINCOA algorithm by Michael J.D. Powell (2014).
Example
In this example, Rosenbrock’s post office problem,
subject to
is solved using an initial guess of . The solution and optimal value are printed.