Developer Reference for Intel® oneAPI Math Kernel Library for Fortran

ID 766686
Date 7/13/2023
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

?trnlspbc_init

Initializes the solver of nonlinear least squares problem with linear (boundary) constraints.

Syntax

res = strnlspbc_init(handle, n, m, x, LW, UP, eps, iter1, iter2, rs)

res = dtrnlspbc_init(handle, n, m, x, LW, UP, eps, iter1, iter2, rs)

Description

The ?trnlspbc_init routine initializes the solver.

After initialization, all subsequent invocations of the ?trnlspbc_solve routine should use the values of the handle returned by ?trnlspbc_init. This handle stores internal data, including pointers to the arrays x, LW, UP, and eps. It is important to not move or deallocate these arrays until after calling the ?trnlspbc_delete routine.

The eps array contains a number indicating the stopping criteria:

eps Value

Description

1

Δ < eps(1)

2

||F(x)||2 < eps(2)

3

The Jacobian matrix is singular.

||J(x)(1:m,j)||2 < eps(3), j = 1, ..., n

4

||s||2 < eps(4)

5

||F(x)||2 - ||F(x) - J(x)s||2 < |eps(5)|

NOTE:

If eps(5) > 0, an extra scaling is applied to ‘s’ after it has been selected, to ensure that it does not leave the specified domain, but scales it down to not cross the boundary. This preserves the solution inside the boundary, but may result in getting stuck in a local minimum on the boundary and exiting early due to this stopping criteria

If eps(5) < 0, extra scaling is not applied, which may result in the solution, x, leaving the domain. If this occurs, try starting over with a different initial condition.

6

The trial step precision. If eps(6) = 0, then the trial step meets the required precision ( 1.0*10-10).

Note:

  • J(x) is the Jacobian matrix.

  • Δ is the trust-region area.

  • F(x) is the value of the functional.

  • s is the trial step.

Input Parameters

n

INTEGER. Length of x.

m

INTEGER. Length of F(x).

x

REAL for strnlspbc_init

DOUBLE PRECISION for dtrnlspbc_init

Array of size n. Initial guess. A reference to this array is stored in handle for later use and modification by ?trnlspbc_solve.

LW

REAL for strnlspbc_init

DOUBLE PRECISION for dtrnlspbc_init

Array of size n.

Contains low bounds for x (lwi < xi ). A reference to this array is stored in handle for later use by ?trnlspbc_solve.

UP

REAL for strnlspbc_init

DOUBLE PRECISION for dtrnlspbc_init

Array of size n.

Contains upper bounds for x (upi > xi ). A reference to this array is stored in handle for later use by ?trnlspbc_solve.

eps

REAL for strnlspbc_init

DOUBLE PRECISION for dtrnlspbc_init

Array of size 6; contains stopping criteria. See the values in the Description section. A reference to this array is stored in handle for later use by ?trnlspbc_solve.

iter1

INTEGER. Specifies the maximum number of iterations.

iter2

INTEGER. Specifies the maximum number of iterations of trial step calculation.

rs

REAL for strnlspbc_init

DOUBLE PRECISION for dtrnlspbc_init

Definition of initial size of the trust region (boundary of the trial step). The recommended minimum value is 0.1, and the recommended maximum value is 100.0. Based on your knowledge of the objective function and initial guess you can increase or decrease the initial trust region. It can influence the iteration process, for example, the direction of the iteration process and the number of iterations. If you set rs to 0.0, the solver uses the default value, which is 100.0.

Output Parameters

handle

Type INTEGER*8.

res

INTEGER. Informs about the task completion.

  • res = TR_SUCCESS - the routine completed the task normally.

  • res = TR_INVALID_OPTION - there was an error in the input parameters.

  • res = TR_OUT_OF_MEMORY - there was a memory error.

TR_SUCCESS, TR_INVALID_OPTION, and TR_OUT_OF_MEMORY are defined in the mkl_rci.fi include file.