FORCES
FORtran lib for Comp. Env. Sys.
|
Dynamically Dimensioned Search (DDS) More...
Functions/Subroutines | |
real(dp) function, dimension(size(pini)), public | dds (eval, obj_func, pini, prange, r, seed, maxiter, maxit, mask, tmp_file, funcbest, history) |
DDS. | |
real(dp) function, dimension(size(pini)), public | mdds (eval, obj_func, pini, prange, seed, maxiter, maxit, mask, tmp_file, funcbest, history) |
MDDS. | |
subroutine | neigh_value (x_cur, x_min, x_max, r, new_value) |
Dynamically Dimensioned Search (DDS)
This module provides routines for Dynamically Dimensioned Search (DDS) of Tolson and Shoemaker (2007). It searches the minimum or maximum of a user-specified function, using an n-dimensional continuous global optimization algorithm (DDS).
COPYING
and COPYING.LESSER
provided with this software. The complete GNU license text can also be found at http://www.gnu.org/licenses/. real(dp) function, dimension(size(pini)), public mo_dds::dds | ( | procedure(eval_interface), intent(in), pointer | eval, |
procedure(objective_interface), intent(in), pointer | obj_func, | ||
real(dp), dimension(:), intent(in) | pini, | ||
real(dp), dimension(:, :), intent(in) | prange, | ||
real(dp), intent(in), optional | r, | ||
integer(i8), intent(in), optional | seed, | ||
integer(i8), intent(in), optional | maxiter, | ||
logical, intent(in), optional | maxit, | ||
logical, dimension(:), intent(in), optional | mask, | ||
character(len = *), intent(in), optional | tmp_file, | ||
real(dp), intent(out), optional | funcbest, | ||
real(dp), dimension(:), intent(out), optional, allocatable | history | ||
) |
DDS.
Searches Minimum or Maximum of a user-specified function using Dynamically Dimensioned Search (DDS).
DDS is an n-dimensional continuous global optimization algorithm. It is coded as a minimizer but one can give maxit=True in a maximization problem, so that the algorithm minimizes the negative of the objective function F=(-1*F).
The function to be minimized is the first argument of DDS and must be defined as
Example
See also example in test directory.
Literature
[in] | real(dp) :: obj_func(p) | Function on which to search the minimum |
[in] | real(dp) :: pini(:) | inital value of decision variables |
[in] | real(dp) :: prange(size(pini),2) | Min/max range of decision variables |
[in] | real(dp), optional :: r | DDS perturbation parameter (default: 0.2) |
[in] | integer(i8), optional :: seed | User seed to initialise the random number generator (default: None) |
[in] | integer(i8), optional :: maxiter | Maximum number of iteration or function evaluation (default: 1000) |
[in] | logical, optional :: maxit | Maximization (.True.) or minimization (.False.) of function (default: .False.) |
[in] | logical, optional :: mask(size(pini)) | parameter to be optimized (true or false) (default: .True.) |
[in] | character(len=*) , optional :: tmp_file | file with temporal output |
[out] | real(dp), optional :: funcbest | the best value of the function. |
[out] | real(dp), optional, allocatable :: history(:) | the history of best function values, history(maxiter)=funcbest allocatable only to be in correspondance with other optimization routines |
real(dp) :: DDS | The parameters of the point which is estimated to minimize the function. |
Definition at line 109 of file mo_dds.F90.
References dds(), mo_kind::dp, mo_kind::i4, and mo_kind::i8.
Referenced by dds().
real(dp) function, dimension(size(pini)), public mo_dds::mdds | ( | procedure(eval_interface), intent(in), pointer | eval, |
procedure(objective_interface), intent(in), pointer | obj_func, | ||
real(dp), dimension(:), intent(in) | pini, | ||
real(dp), dimension(:, :), intent(in) | prange, | ||
integer(i8), intent(in), optional | seed, | ||
integer(i8), intent(in), optional | maxiter, | ||
logical, intent(in), optional | maxit, | ||
logical, dimension(:), intent(in), optional | mask, | ||
character(len = *), intent(in), optional | tmp_file, | ||
real(dp), intent(out), optional | funcbest, | ||
real(dp), dimension(:), intent(out), optional, allocatable | history | ||
) |
MDDS.
Searches Minimum or Maximum of a user-specified function using the Modified Dynamically Dimensioned Search (DDS).
DDS is an n-dimensional continuous global optimization algorithm. It is coded as a minimizer but one can give maxit=True in a maximization problem, so that the algorithm minimizes the negative of the objective function F=(-1*F).
The function to be minimized is the first argument of DDS and must be defined as
MDDS extents normal DDS by a continuous reduction of the DDS pertubation parameter r from 0.3 to 0.05, and by allowing a larger function value with a certain probablity.
[in] | real(dp) :: obj_func(p) | Function on which to search the minimum |
[in] | real(dp) :: pini(:) | inital value of decision variables |
[in] | real(dp) :: prange(size(pini),2) | Min/max range of decision variables |
[in] | integer(i8), optional :: seed | User seed to initialise the random number generator (default: None) |
[in] | integer(i8), optional :: maxiter | Maximum number of iteration or function evaluation (default: 1000) |
[in] | logical, optional :: maxit | Maximization (.True.) or minimization (.False.) of function (default: .False.) |
[in] | logical, optional :: mask(size(pini)) | parameter to be optimized (true or false) (default: .True.) |
[in] | character(len=*) , optional :: tmp_file | file with temporal output |
[out] | real(dp), optional :: funcbest | the best value of the function. |
[out] | real(dp), optional, allocatable :: history(:) | the history of best function values, history(maxiter)=funcbest allocatable only to be in correspondance with other optimization routines |
None.
dv_range(:,1) = (/ -600.0, -600.0, -600.0, -600.0, -600.0, -600.0, -600.0, -600.0, -600.0, -600.0 /) dv_range(:,2) = (/ 600.0, 600.0, 600.0, 600.0, 600.0, 600.0, 600.0, 600.0, 600.0, 600.0 /) dv_ini = (/ -.226265E+01, -.130187E+01, -.151219E+01, 0.133983E+00, 0.988159E+00, & -.495074E+01, -.126574E+02, 0.572684E+00, 0.303864E+01, 0.343031E+01 /) dv_opt = MDDS(griewank, dv_ini, dv_range)
See also example in test directory.
Definition at line 422 of file mo_dds.F90.
References mo_kind::dp, mo_kind::i4, mo_kind::i8, and mdds().
Referenced by mdds().
|
private |
Definition at line 638 of file mo_dds.F90.