*----------------------------------------------------------- * Date created: February 21, 1996 * Example from A Ben-Israel, A. Ben-Tal, S. Zlobec, * Optimality in nonlinear programming: * A feasible directions approach. * John Wiley & Sons, New York, 1981. * * Example from pp.75 (paragraph 7.2) * * Project: Test Problems with SPENBAR * * Dr. Neculai Andrei * Research Institute for Informatics, * 8-10, Averescu Avenue, Bucharest 1, Romania * E-mail: nandrei@u3.ici.ro * web: www.ici.ro/camo *----------------------------------------------------------- * subroutine ini(n,m,mb,me,sb,x,icgc,ipgc,icge,ipge, 1 nszc,nsze,nb) * double precision x(n) integer sb(mb) integer icgc(nszc),ipgc(n+1) integer icge(nsze),ipge(n+1) * * Information about the problem. * write(1,10) 10 format(5x,'Example A. Ben-Israel, A. Ben-Tal, S. Zlobec') write(1,11) 11 format(5x,'Example from pp.75.') * * Dimension of the problem: * n=18 m=13 me=0 mb=0 nszc=30 nsze=0 * * Initial point: * x(1)=1.d0 x(2)=0.d0 x(3)=2.d0 x(4)=1.d0 x(5)=0.d0 x(6)=-1.5d0 x(7)=2.d0 x(8)=-8.d0 x(9)=1.d0 x(10)=0.d0 x(11)=9.d0 x(12)=0.d0 x(13)=5.d0 x(14)=1.d0 x(15)=0.d0 x(16)=6.16441d0 x(17)=0.d0 x(18)=32.6001d0 * * Index vector for simple bounds: cb >= 0. * * * Rows indices of the nonzeros of the Jacobian of the Inequalities * icgc(1)=1 icgc(2)=2 icgc(3)=3 icgc(4)=4 icgc(5)=5 icgc(6)=6 icgc(7)=7 icgc(8)=8 icgc(9)=9 icgc(10)=10 icgc(11)=11 icgc(12)=12 icgc(13)=13 icgc(14)=2 icgc(15)=3 icgc(16)=4 icgc(17)=5 icgc(18)=13 icgc(19)=6 icgc(20)=7 icgc(21)=8 icgc(22)=8 icgc(23)=9 icgc(24)=9 icgc(25)=10 icgc(26)=10 icgc(27)=11 icgc(28)=11 icgc(29)=12 icgc(30)=12 * * Starting address of columns of the Jacobian of the Inequalities * ipgc(1)=1 ipgc(2)=14 ipgc(3)=15 ipgc(4)=16 ipgc(5)=17 ipgc(6)=18 ipgc(7)=19 ipgc(8)=20 ipgc(9)=21 ipgc(10)=22 ipgc(11)=23 ipgc(12)=24 ipgc(13)=25 ipgc(14)=26 ipgc(15)=27 ipgc(16)=28 ipgc(17)=29 ipgc(18)=30 ipgc(19)=31 * return end * *-------------------------------------------------------------- * Date created: February 21, 1996 * Example from A.Ben-Israel, A. Ben-Tal, S. Zlobec., pp.75 *-------------------------------------------------------------- * subroutine prob(n,m,mb,me,sb,x,objf,gobj,c,gc,cb,e,ge, 1 nszc,nsze,nb) * * Calculate problem function at iterate x. * double precision x(n),objf,gobj(n),c(m),gc(nszc) double precision cb(mb),e(me),ge(nsze) * * Objective function and its gradient: * * objf=(x(1)-7.d0)**2 - x(2) + dexp(-x(3)) + x(3) + x(4)**2+ 1 dexp(x(5)) + (x(6)+3.d0)**4 + (x(7)-4.d0)**2+ 1 dexp(-x(8)) + 12.d0*x(8) + dexp(x(9))+ 1 (x(9)+x(10))**2+ 1 (x(11)-x(12))**4 + dexp(x(13)) + dexp(-x(14))+ 1 (x(15)+x(16))**2 + dexp(x(17)) - 2.d0*x(17)+ 1 x(18)**2 * gobj(1)=2.d0*(x(1)-7.d0) gobj(2)=-1.d0 gobj(3)=-dexp(-x(3)) + 1.d0 gobj(4)=2.d0*x(4) gobj(5)=dexp(x(5)) gobj(6)=4.d0*(x(6)+3.d0)**3 gobj(7)=2.d0*(x(7)-4.d0) gobj(8)=-dexp(-x(8)) + 12.d0 gobj(9)=dexp(x(9)) + 2.d0*(x(9)+x(10)) gobj(10)=2.d0*(x(9)+x(10)) gobj(11)=4.d0*(x(11)-x(12))**3 gobj(12)=-4.d0*(x(11)-x(12))**3 gobj(13)=dexp(x(13)) gobj(14)=-dexp(-x(14)) gobj(15)=2.d0*(x(15)+x(16)) gobj(16)=2.d0*(x(15)+x(16)) gobj(17)=dexp(x(17))-2.d0 gobj(18)=2.d0*x(18) * * Bounds on variables: * * * Constraints. (Inequalities): * c(1)= 1.5d0 - x(1)*x(1) c(2)= 2.d0 - x(1)**2 - dexp(x(2)) c(3)= 4.d0 + 2.d0*x(1) -(x(3)-1.d0)**2 c(4)= 5.d0 - dexp(x(1)) - x(1) - x(4) c(5)= 11.d0 - (x(1)+2.d0)**2 - dexp(-x(5)) + x(5) c(6)= 15.d0 - dexp(-x(1)) - x(1)**2 - x(7)**2 c(7)= 12.d0 - (x(1)-3.d0)**2 + x(8) c(8)= 2.d0 + 3.d0*x(1) - (x(9)-x(10))**2 c(9)= 12.d0 - x(1)**4 - x(1) - x(11) - dexp(-x(12)) c(10)= 20.d0 - dexp(x(1)) + 10.d0*x(1) - x(13)**2 + 5.d0*x(14) c(11)= 35.d0 - x(1)**4 + 5.d0*x(1) - dexp(-x(15)) - 1 (x(15)-x(16))**2 c(12)=300.d0 - (x(1)+4.d0)**4 - dexp(x(17)) + 10.d0*x(18) c(13)= 10.d0 - 7.d0*x(1) + 2.d0*x(6) * * Jacobian of the inequalities constraints: * gc(1)=-2.d0*x(1) gc(2)=-2.d0*x(1) gc(3)=2.d0 gc(4)=-dexp(x(1))-1.d0 gc(5)=-2.d0*(x(1)+2.d0) gc(6)=dexp(-x(1))-2.d0*x(1) gc(7)=-2.d0*(x(1)-3.d0) gc(8)=3.d0 gc(9)=-4.d0*x(1)**3-1.d0 gc(10)=-dexp(x(1))+10.d0 gc(11)=-4.d0*x(1)**3+5.d0 gc(12)=-4.d0*(x(1)+4.d0)**3 gc(13)=-7.d0 *2 gc(14)=-dexp(x(2)) gc(15)=-2.d0*(x(3)-1.d0) gc(16)=-1.d0 gc(17)=dexp(-x(5))+1.d0 gc(18)=2.d0 gc(19)=-2.d0*x(7) gc(20)=1.d0 gc(21)=-2.d0*(x(9)-x(10)) gc(22)=2.d0*(x(9)-x(10)) gc(23)=-1.d0 gc(24)=dexp(-x(12)) gc(25)=-2.d0*x(13) gc(26)=5.d0 gc(27)=dexp(-x(15))-2.d0*(x(15)-x(16)) gc(28)=2.d0*(x(15)-x(16)) gc(29)=-dexp(x(17)) gc(30)=10.d0 * return end *---------------------------------------------------BBZ72.for