forked from libprima/prima
-
Notifications
You must be signed in to change notification settings - Fork 0
/
prima_f90
64 lines (57 loc) · 3.11 KB
/
prima_f90
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
N.B.:
1. This file is not ready for any use before it is re-named to "prima.f90".
2. The current version of the package does not need this file.
!--------------------------------------------------------------------------------------------------!
! PRIMA: Reference Implementation for Powell's methods with Modernization and Amelioration
!--------------------------------------------------------------------------------------------------!
module prima
!--------------------------------------------------------------------------------------------------!
! This module provides the reference implementation of Powell's derivative-free optimization
! solvers, namely COBYLA, UOBYQA, NEWUOA, BOBYQA, and LINCOA.
!
! Coded by Zaikun ZHANG (www.zhangzk.net) based on the following paper and Powell's code, with
! modernization, bug fixes, and improvements.
!
! [1] M. J. D. Powell, A direct search optimization method that models the objective and constraint
! functions by linear interpolation, In Advances in Optimization and Numerical Analysis,
! eds. S. Gomez and J. P. Hennart, pages 51--67, Springer Verlag, Dordrecht, Netherlands, 1994
!
! [2] M. J. D. Powell, UOBYQA: unconstrained optimization by quadratic approximation, Math.
! Program., 92(B):555--582, 2002
!
! [3] M. J. D. Powell, The NEWUOA software for unconstrained optimization without derivatives,
! In Large-Scale Nonlinear Optimization, eds. G. Di Pillo and M. Roma, pages 255--297, Springer,
! New York, US, 2006
!
! [4] M. J. D. Powell, The BOBYQA algorithm for bound constrained optimization without derivatives,
! Technical Report DAMTP 2009/NA06, Department of Applied Mathematics and Theoretical Physics,
! Cambridge University, Cambridge, UK, 2009
!
! [5] M. J. D. Powell, On fast trust region methods for quadratic models with linear constraints,
! Math. Program. Comput., 7:237--267, 2015
!
! See the directory "original" for Powell's code.
!
! Dedicated to the late Professor M. J. D. Powell FRS (1936--2015).
!
! Started in July 2020.
!--------------------------------------------------------------------------------------------------!
use, non_intrinsic :: cobyla_mod, only : cobyla
use, non_intrinsic :: uobyqa_mod, only : uobyqa
use, non_intrinsic :: newuoa_mod, only : newuoa
use, non_intrinsic :: bobyqa_mod, only : bobyqa
use, non_intrinsic :: lincoa_mod, only : lincoa
use, non_intrinsic :: consts_mod, only : PRIMA_RP => RP, PRIMA_IK => IK
use, non_intrinsic :: infos_mod, only : INFO_DFT, SMALL_TR_RADIUS, FTARGET_ACHIEVED, TRSUBP_FAILED,&
& MAXFUN_REACHED, MAXTR_REACHED, NAN_INF_X, NAN_INF_F, NAN_INF_MODEL, DAMAGING_ROUNDING, &
& NO_SPACE_BETWEEN_BOUNDS, ZERO_LINEAR_CONSTRAINT, &
& INVALID_INPUT, ASSERTION_FAILS, VALIDATION_FAILS, MEMORY_ALLOCATION_FAILS
implicit none
private
public :: cobyla, uobyqa, newuoa, bobyqa, lincoa
public :: PRIMA_RP, PRIMA_IK
public :: INFO_DFT, SMALL_TR_RADIUS, FTARGET_ACHIEVED, TRSUBP_FAILED, MAXFUN_REACHED, MAXTR_REACHED,&
& NAN_INF_X, NAN_INF_F, NAN_INF_MODEL, DAMAGING_ROUNDING, NO_SPACE_BETWEEN_BOUNDS, &
& ZERO_LINEAR_CONSTRAINT, &
& INVALID_INPUT, ASSERTION_FAILS, VALIDATION_FAILS, MEMORY_ALLOCATION_FAILS
end module prima