-
Notifications
You must be signed in to change notification settings - Fork 0
/
problem.f90
55 lines (42 loc) · 926 Bytes
/
problem.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
!*************************************
! POWELL FUNCTION
!*************************************
subroutine setdim(n)
!set problem dimension n
implicit none
integer :: n
n = 4
return
end subroutine setdim
!*************************************
subroutine setbounds(n,lb,ub)
!set problem dimension n
implicit none
integer :: n
real*8 :: lb(n), ub(n)
lb = - 10.d0
ub = 10.d0
return
end subroutine setbounds
!*************************************
subroutine startp(n,x)
!set problem dimension n
implicit none
integer :: n
real*8 :: x(n)
x = 1.d0
return
end subroutine startp
!*************************************
SUBROUTINE FUNCT(N,X,F)
implicit none
integer :: n
real*8 :: x(n), f
real*8 :: A, B, C, D
A=X(1)+10.D0*X(2)
B=X(3)-X(4)
C=X(2)-2.D0*X(3)
D=X(1)-X(4)
F=A**2+5.D0*B**2+C**4+10.D0*D**4
RETURN
END SUBROUTINE FUNCT