GGUES
Generates points in an N-dimensional space.
Required Arguments
A — Vector of length N. (Input)
See B.
B — Real vector of length N. (Input)
A and B define the rectangular region in which the points will be generated, i.e., A(I) < S(I) < B(I) for I = 1, 2, …, N. Note that if B(I) < A(I), then B(I) < S(I) < A(I).
K — The number of points to be generated. (Input)
IDO — Initialization parameter. (Input/Output)
IDO must be set to zero for the first call. GGUES resets IDO to 1 and returns the first generated point in S. Subsequent calls should be made with IDO = 1.
S — Vector of length N containing the generated point. (Output)
Each call results in the next generated point being stored in S.
Optional Arguments
N — Dimension of the space. (Input)
Default: N = SIZE (B,1).
FORTRAN 90 Interface
Generic: CALL GGUES (A, B, K, IDO, S [, …])
Specific: The specific interface names are S_GGUES and D_GGUES.
FORTRAN 77 Interface
Single: CALL GGUES (N, A, B, K, IDO, S)
Double: The double precision name is DGGUES.
Description
The routine GGUES generates starting points for algorithms that optimize functions of several variables or, almost equivalently, algorithms that solve simultaneous nonlinear equations.
The routine GGUES is based on systematic placement of points to optimize the dispersion of the set. For more details, see Aird and Rice (1977).
Comments
1. Workspace may be explicitly provided, if desired, by use of G2UES/DG2UES. The reference is:
CALL G2UES (N, A, B, K, IDO, S, WK, IWK)
The additional arguments are:
WK — Work vector of length N. WK must be preserved between calls to G2UES.
IWK — Work vector of length 10. IWK must be preserved between calls to G2UES.
2. Informational error
Type | Code | Description |
---|
4 | 1 | Attempt to generate more than K points. |
3. The routine GGUES may be used with any nonlinear optimization routine that requires starting points. The rectangle to be searched (defined by A, B, and N) must be determined; and the number of starting points, K, must be chosen. One possible use for GGUES would be to call GGUES to generate a point in the chosen rectangle. Then, call the nonlinear optimization routine using this point as an initial guess for the solution. Repeat this process K times. The number of iterations that the optimization routine is allowed to perform should be quite small (5 to 10) during this search process. The best (or best several) point(s) found during the search may be used as an initial guess to allow the optimization routine to determine the optimum more accurately. In this manner, an N dimensional rectangle may be effectively searched for a global optimum of a nonlinear function. The choice of K depends upon the nonlinearity of the function being optimized. A function with many local optima requires a larger value than a function with only a few local optima.
Example
We want to search the rectangle with vertices at coordinates (1, 1), (3, 1), (3, 2), and (1, 2) ten times for a global optimum of a nonlinear function. To do this, we need to generate starting points. The following example illustrates the use of GGUES in this process:
USE GGUES_INT
USE UMACH_INT
IMPLICIT NONE
! Variable Declarations
INTEGER N
PARAMETER (N=2)
!
INTEGER IDO, J, K, NOUT
REAL A(N), B(N), S(N)
! Initializations
!
! A = ( 1.0, 1.0)
! B = ( 3.0, 2.0)
!
DATA A/1.0, 1.0/
DATA B/3.0, 2.0/
!
CALL UMACH (2, NOUT)
WRITE (NOUT,99998)
99998 FORMAT (’ Point Number’, 7X, ’Generated Point’)
!
K = 10
IDO = 0
DO 10 J=1, K
CALL GGUES (A, B, K, IDO, S)
!
WRITE (NOUT,99999) J, S(1), S(2)
99999 FORMAT (1X, I7, 14X, ’(’, F4.1, ’,’, F6.3, ’)’)
!
10 CONTINUE
!
END
Output
Point Number Generated Point
1 ( 1.5, 1.125)
2 ( 2.0, 1.500)
3 ( 2.5, 1.750)
4 ( 1.5, 1.375)
5 ( 2.0, 1.750)
6 ( 1.5, 1.625)
7 ( 2.5, 1.250)
8 ( 1.5, 1.875)
9 ( 2.0, 1.250)
10 ( 2.5, 1.500)
Published date: 03/19/2020
Last modified date: 03/19/2020