声振论坛

 找回密码
 我要加入

QQ登录

只需一步,快速开始

查看: 2002|回复: 1

[其他相关] 向各位求助提供测试函数,谢谢

[复制链接]
发表于 2007-5-1 15:28 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?我要加入

x
求助:小弟需要无约束优化测试函数(若你做优化的数值试验自然就明白),苦于无法查找,现希望各位帮助,不胜感激,估计这里是不好打出来的,希冀能发送到本人的邮箱为盼,再次致谢!
所需的测试函数的名称如下所示。估计帖子上不好表示,恳请能发送本人信箱shuxueyou@yahoo.com.cn,本人不胜感激!谢谢!

Biggs exp6;

Gussian ;

Penalty II;
 
Discrete Boundary Value;

Discrete Intergral Value;

Broyden  Tridiagnal;

Broyden banded;

Linear full rank;

Chebyquad;

[ 本帖最后由 xinyuxf 于 2007-5-5 15:36 编辑 ]
回复
分享到:

使用道具 举报

发表于 2007-5-5 20:44 | 显示全部楼层
google以下大部分都能够找到,比如
biggs exp6 function

  1. *****************************************************************************
  2. *               biggs exp6 function
  3. * more, garbow, and hillstrom, acm toms vol. 7 no. 1 (march 1981) 17-41
  4. *****************************************************************************

  5.       subroutine getfun( x, n, f, m, ftf, fj, lfj, g, mode)

  6.       implicit double precision (a-h,o-z)

  7.       integer            n, m, lfj, mode

  8.       double precision   x(n), f(m), ftf, fj(lfj,n), g(n)

  9.       integer            nprob, nprobs, nstart, nstrts
  10.       common /PROBLM/    nprob, nprobs, nstart, nstrts

  11.       integer            nout
  12.       common /IOUNIT/    nout

  13.       logical            lf, lj

  14.       integer            na, nb, nc, nd, nt, nh

  15.       integer            i, j

  16.       double precision   x1, x2, x3, x4, x5, x6
  17.       double precision   e1, e2, e5, ti, ym, yp

  18.       double precision   ddot

  19.       intrinsic          dble, exp

  20.       double precision   zero, one, point1, three, four, five, ten
  21.       parameter         (zero = 0.d0, one = 1.d0, point1 = .1d0)
  22.       parameter         (three = 3.d0, four = 4.d0, five = 5.d0)
  23.       parameter         (ten = 10.d0)

  24. *=======================================================================

  25.       if (mode .eq.  0)  goto    20
  26.       if (mode .eq. -1)  goto    10
  27.       if (mode .eq. -2)  goto    30

  28.       x1 = x(1)
  29.       x2 = x(2)
  30.       x3 = x(3)
  31.       x4 = x(4)
  32.       x5 = x(5)
  33.       x6 = x(6)

  34.       na = mode / 1000
  35.       nt = mode - na*1000
  36.       nb = nt / 100
  37.       nh = nt - nb*100
  38.       nc = nh / 10
  39.       nd = nh - nc*10

  40.       lf = (na .ne. 0) .or. (nb .ne. 0) .or. (nd .ne. 0)
  41.       lj = (nc .ne. 0) .or. (nd .ne. 0)

  42.       if (lf .and. lj)  goto 300
  43.       if (lf)           goto 100
  44.       if (lj)           goto 200

  45. *-----------------------------------------------------------------------

  46.    10 continue

  47.       nprobs = 1
  48.       nstrts = 1

  49.       n      =  6
  50.       m      = 13

  51.       if (nout .gt. 0)  write( nout, 9999)  n, m

  52.       return

  53. *-----------------------------------------------------------------------

  54.    20 continue

  55.       x(1) = 1.d0
  56.       x(2) = 2.d0
  57.       x(3) = 1.d0
  58.       x(4) = 1.d0
  59.       x(5) = 1.d0
  60.       x(6) = 1.d0

  61.       return

  62. *-----------------------------------------------------------------------

  63.    30 continue

  64.       x(1) =  1.d0
  65.       x(2) =  10.d0
  66.       x(3) =  1.d0
  67.       x(4) =  5.d0
  68.       x(5) =  4.d0
  69.       x(6) =  3.d0

  70.       ftf = zero

  71.       return

  72. *-----------------------------------------------------------------------

  73. 100  continue

  74.       do 110 i = 1, m
  75.         ti = point1*dble(i)
  76.         yp = exp(-ti) + three*exp(-four*ti)
  77.         ym = five*exp(-ten*ti)
  78.         e1 = exp(-ti*x1)
  79.         e2 = exp(-ti*x2)
  80.         e5 = exp(-ti*x5)
  81.         f(i) = (x3*e1 + x6*e5  + ym) - (x4*e2 + yp)
  82. 110  continue

  83.       if (nb .ne. 0)  ftf = ddot( m, f, 1, f, 1)

  84.       return

  85. 200  continue

  86.       do 210 i = 1, m
  87.         ti = point1*dble(i)
  88.         e1 = exp(-ti*x1)
  89.         e2 = exp(-ti*x2)
  90.         e5 = exp(-ti*x5)
  91.         fj( i, 1) = -ti*x3*e1
  92.         fj( i, 2) =  ti*x4*e2
  93.         fj( i, 3) =  e1
  94.         fj( i, 4) = -e2
  95.         fj( i, 5) = -ti*x6*e5
  96.         fj( i, 6) =  e5
  97. 210  continue

  98.       return

  99. 300  continue

  100.       do 310 i = 1, m
  101.         ti = point1*dble(i)
  102.         yp = exp(-ti) + three*exp(-four*ti)
  103.         ym = five*exp(-ten*ti)
  104.         e1 = exp(-ti*x1)
  105.         e2 = exp(-ti*x2)
  106.         e5 = exp(-ti*x5)
  107.         f(i) = (x3*e1 + x6*e5 + ym) - (x4*e2 + yp)
  108.         fj( i, 1) = -ti*x3*e1
  109.         fj( i, 2) =  ti*x4*e2
  110.         fj( i, 3) =  e1
  111.         fj( i, 4) = -e2
  112.         fj( i, 5) = -ti*x6*e5
  113.         fj( i, 6) =  e5
  114. 310  continue

  115.       if (nb .ne. 0)  ftf = ddot( m, f, 1, f, 1)

  116.       if (nd .eq. 0)  return

  117.       do 320 j = 1, n
  118.         g(j) = ddot( m, fj( 1, j), 1, f, 1)
  119. 320  continue

  120.       return

  121. 9999  format(/'1',70('=')//,
  122.      *' biggs exp6 function (more et al.) '//,
  123.      *'        number of variables =', i4, '  (    6   )'/,
  124.      *'        number of functions =', i4, '  (  >= 6  )'//,
  125.      *        ' ',70('=')/)
  126.       end

  127. ************************************************************************
  128. ************************************************************************

  129.       subroutine dfjdxk ( k, x, n, dfj, ldfj, m, nonzro)

  130.       implicit double precision (a-h,o-z)

  131.       integer            k, n, ldfj, m, nonzro(n)

  132.       double precision   x(n), dfj(ldfj,n)

  133.       integer            i, j

  134.       double precision   x1, x2, x3, x4, x5, x6
  135.       double precision   e1, e2, e5, ti, t1, t2, t5

  136.       intrinsic          dble, exp

  137.       double precision   zero, point1
  138.       parameter         (zero = 0.d0, point1 = .1d0)

  139. *=======================================================================

  140.       do 100 j = 1, n
  141.         nonzro(j) = 0
  142.         call dcopy( m, zero, 0, dfj( 1, j), 1)
  143.   100 continue

  144.       goto ( 210, 220, 230, 240, 250, 260 ), k

  145. 230  continue

  146.       x1 = x(1)

  147.       nonzro(1) = 1

  148.       do 235 i = 1, m
  149.         ti = point1*dble(i)
  150.         dfj( i, 1) = -ti*exp(-ti*x1)
  151. 235  continue

  152.       return

  153. 240  continue

  154.       x2 = x(2)

  155.       nonzro(2) = 1

  156.       do 245 i = 1, m
  157.         ti = point1*dble(i)
  158.         dfj( i, 2) =  ti*exp(-ti*x2)
  159. 245  continue

  160.       return

  161. 260  continue

  162.       x5 = x(5)

  163.       nonzro(5) = 1

  164.       do 265 i = 1, m
  165.         ti = point1*dble(i)
  166.         dfj( i, 5) = -ti*exp(-ti*x5)
  167. 265  continue

  168.       return

  169. 210  continue

  170.       x1 = x(1)
  171.       x3 = x(3)

  172.       nonzro(1) = 1
  173.       nonzro(3) = 1

  174.       do 215 i = 1, m
  175.         ti = point1*dble(i)
  176.         e1 = exp(-ti*x1)
  177.         t1 = ti*e1
  178.         dfj( i, 1) =  ti*t1*x3
  179.         dfj( i, 3) = -t1
  180. 215  continue

  181.       return

  182. 220  continue

  183.       x2 = x(2)
  184.       x4 = x(4)

  185.       nonzro(2) = 1
  186.       nonzro(4) = 1

  187.       do 225 i = 1, m
  188.         ti = point1*dble(i)
  189.         e2 = exp(-ti*x2)
  190.         t2 = ti*e2
  191.         dfj( i, 2) = -ti*t2*x4
  192.         dfj( i, 4) =  t2
  193. 225  continue

  194.       return

  195. 250  continue

  196.       x5 = x(5)
  197.       x6 = x(6)

  198.       nonzro(5) = 1
  199.       nonzro(6) = 1

  200.       do 255 i = 1, m
  201.         ti = point1*dble(i)
  202.         e5 = exp(-ti*x5)
  203.         t5 = ti*e5
  204.         dfj( i, 5) =  ti*t5*x6
  205.         dfj( i, 6) = -t5
  206. 255  continue

  207.       return

  208.       end

  209. ************************************************************************
  210. ************************************************************************

  211.       subroutine dfkdij( k, x, n, hess, lhess, linear)

  212.       implicit double precision (a-h,o-z)

  213.       logical            linear

  214.       integer            k, n, lhess

  215.       double precision   x(n), hess(lhess,n)

  216.       integer            j

  217.       double precision   e1, e2, e5, tk, t1, t2, t5
  218.       
  219.       intrinsic          dble, exp

  220.       double precision   zero, point1
  221.       parameter         (zero = 0.d0, point1 = .1d0)

  222. *=======================================================================

  223.       do 100 j = 1, n
  224.         call dcopy( n, zero, 0, hess( 1, j), 1)
  225.   100 continue

  226.       linear = .false.

  227.       tk = point1*dble(k)
  228.       e1 = exp(-tk*x(1))
  229.       e2 = exp(-tk*x(2))
  230.       e5 = exp(-tk*x(5))
  231.       t1 = tk * e1
  232.       t2 = tk * e2
  233.       t5 = tk * e5
  234.       hess(1,3) = -t1
  235.       hess(3,1) = hess(3,1)
  236.       hess(2,4) =  t2
  237.       hess(4,2) = hess(2,4)
  238.       hess(5,6) = -t5
  239.       hess(6,5) = hess(5,6)
  240.       hess(1,1) =  tk * x(3) * t1
  241.       hess(2,2) = -tk * x(4) * t2
  242.       hess(5,5) =  tk * x(6) * t5

  243.       return
  244.       end
复制代码


来自于:http://www.netlib.org/uncon/data/biggs.f
您需要登录后才可以回帖 登录 | 我要加入

本版积分规则

QQ|小黑屋|Archiver|手机版|联系我们|声振论坛

GMT+8, 2024-5-19 14:55 , Processed in 0.075459 second(s), 17 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表