*----------------------------------------------------------- * Date created: February 21, 1996 * 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.68 (paragraph 6.5) * * 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.68.') * * Dimension of the problem: * n=5 m=7 me=0 mb=0 nszc=16 nsze=0 * * Initial point: * x(1)=0.d0 x(2)=0.d0 x(3)=0.d0 x(4)=0.d0 x(5)=0.d0 * * 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)=1 icgc(8)=2 icgc(9)=4 icgc(10)=5 icgc(11)=7 icgc(12)=2 icgc(13)=3 icgc(14)=6 icgc(15)=3 icgc(16)=7 * * Starting address of columns of the Jacobian of the Inequalities * ipgc(1)=1 ipgc(2)=7 ipgc(3)=12 ipgc(4)=13 ipgc(5)=15 ipgc(6)=17 * return end * *-------------------------------------------------------------- * Date created: February 21, 1996 * Example from A.Ben-Israel, A. Ben-Tal, S. Zlobec., pp.68 *-------------------------------------------------------------- * 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)-x(2)+(x(3)-1.d0)**2+(x(4)-2.d0)**2+(x(5)-3.d0)**2 * gobj(1)=1.d0 gobj(2)=-1.d0 gobj(3)=2.d0*(x(3)-1.d0) gobj(4)=2.d0*(x(4)-2.d0) gobj(5)=2.d0*(x(5)-3.d0) * * Bounds on variables: * * * Constraints. (Inequalities): * c(1)=2.d0-dexp(x(1))-x(2)**2 c(2)=2.d0-x(1)**2-x(2)**2-dexp(-x(3)) c(3)=2.d0-x(1)-x(4)**2-x(5)**2 c(4)=1.d0-x(1)**2-x(2)**2+4.d0*x(2) c(5)=2.d0-(x(1)-1.d0)**2-x(2)**2 c(6)=2.d0-x(1)-dexp(-x(4)) c(7)=2.d0-x(2)-dexp(-x(5)) * * Jacobian of the inequalities constraints: * gc(1)=-dexp(x(1)) gc(2)=-2.d0*x(1) gc(3)=-1.d0 gc(4)=-2.d0*x(1) gc(5)=-2.d0*(x(1)-1.d0) gc(6)=-1.d0 gc(7)=-2.d0*x(2) gc(8)=-2.d0*x(2) gc(9)=-2.d0*x(2)+4.d0 gc(10)=-2.d0*x(2) gc(11)=-1.d0 gc(12)=dexp(-x(3)) gc(13)=-2.d0*x(4) gc(14)=dexp(-x(4)) gc(15)=-2.d0*x(5) gc(16)=dexp(-x(5)) * return end *----------------------------------------------BBZ65.for