Developer Reference

  • 2020.2
  • 07/15/2020
  • Public Content
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)
If eps
(4)
> 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
(4)
< 0, the previous behavior is maintained, which may result in the solution, x, leaving the boundary. If this occurs, try starting over with a different initial condition.
5
||
F
(
x
)||
2
- ||
F
(
x
) -
J
(
x
)
s
||
2
<
eps
(5)
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