dogleg Subroutine

private subroutine dogleg(n, r, lr, diag, qtb, delta, x)

Finds the minimizing combination of Gauss-Newton and gradient steps.

Given an M by N matrix A, an N by N nonsingular diagonal matrix D, an M-vector B, and a positive number DELTA, the problem is to determine the convex combination X of the Gauss-Newton and scaled gradient directions that minimizes (AX - B) in the least squares sense, subject to the restriction that the euclidean norm of DX be at most DELTA.

This function completes the solution of the problem if it is provided with the necessary information from the QR factorization of A. That is, if A = QR, where Q has orthogonal columns and R is an upper triangular matrix, then DOGLEG expects the full upper triangle of R and the first N components of Q'B.

Arguments

Type IntentOptional Attributes Name
integer :: n

In - order of the matrix R

real(kind=dp) :: r(lr)

In - upper triangular matrix R stored by rows.

integer :: lr

In - size of the R array, which must be no less than (N*(N+1))/2.

real(kind=dp) :: diag(n)

In - diagonal elements of the matrix D.

real(kind=dp) :: qtb(n)

In - first N elements of the vector Q'* B.

real(kind=dp) :: delta

In - positive upper bound on the euclidean norm of D*X(1:N).

real(kind=dp) :: x(n)

Out - desired convex combination of the Gauss-Newton direction and the scaled gradient direction.


Calls

proc~~dogleg~~CallsGraph proc~dogleg dogleg proc~enorm eNorm proc~dogleg->proc~enorm

Called by

proc~~dogleg~~CalledByGraph proc~dogleg dogleg proc~hybrd hybrd proc~hybrd->proc~dogleg proc~fsolve fsolve proc~fsolve->proc~hybrd proc~solve_junction solve_junction proc~solve_junction->proc~fsolve proc~junction_resolution_from_and_to_ports Junction_resolution_from_and_to_ports proc~junction_resolution_from_and_to_ports->proc~solve_junction proc~main_loop main_loop proc~main_loop->proc~junction_resolution_from_and_to_ports program~reims_p reims_p program~reims_p->proc~main_loop