*----------------------------------------------------------- * Date created: February 15, 2001 * * Example from K. Schittkowski, More Test Examples for * Nonlinear Programming Codes. * Springer Verlag, 1987, * Problem 346, pp.167 * * Design of disc flywheel * * Dr. Neculai Andrei, * Research Institute for Informatics - Bucharest * 8-10, Averescu Avenue, * 71316 Bucharest - Romania * E-mail: nandrei@u3.ici.ro * web: http://www.ici.ro/camo/neculai/nandrei.htm *----------------------------------------------------------- * 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 from Schittkoweski, 1987') write(1,11) 11 format(5x,'Problem 346, pp.167') write(1,12) 12 format(5x,'Design of disc flywheel') * * Dimension of the problem: * n=3 m=2 me=0 mb=6 nszc=4 nsze=0 * * Initial point: * x(1)=22.3d0 x(2)=0.5d0 x(3)=124.99d0 * * Index vector for simple bounds: cb >= 0. * j=1 do i=1,n sb(j)=i sb(j+1)=-i j=j+2 end do * * Rows indices of the nonzeros of the Jacobian of the INEqualities * icgc(1)=1 icgc(2)=2 icgc(3)=1 icgc(4)=2 * * Starting address of columns of the Jacobian of the INEqualities * ipgc(1)=1 ipgc(2)=3 ipgc(3)=4 ipgc(4)=5 * return end * *-------------------------------------------------------------- * Date created: February 15, 2001 * Schittkowski, 1987, problem 346, pp.167 * Design of disc flywheel *-------------------------------------------------------------- * 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) * real*8 a * * Objective function and its gradient: * * a=0.0201d0/1000000.d0 * objf= -a*(x(1)**4)*(x(2))*(x(3)**2) * gobj(1)=-4.d0*a*(x(1)**3)*(x(2))*(x(3)**2) gobj(2)=-a*(x(1)**4)*(x(3)**2) gobj(3)=-2.d0*a*(x(1)**4)*(x(2))*(x(3)) * * * Bounds on variables: * cb(1)=x(1) cb(2)=36.d0-x(1) cb(3)=x(2) cb(4)=5.d0-x(2) cb(5)=x(3) cb(6)=125.d0-x(3) * * Constraints. (Inequalities): * c(1)=675.d0 - x(1)*x(1)*x(2) c(2)=0.419d0 - (x(1)*x(1)*x(3)*x(3))/1000000.d0 * * Jacobian of the inequalities constraints: * gc(1)=-2.d0*x(1)*x(2) gc(2)=-(2.d0/1000000.d0)*x(1)*x(3)*x(3) gc(3)=-x(1)*x(1) gc(4)=-(2.d0/1000000.d0)*x(1)*x(1)*x(3) * return end *--------------------------------------------------S346.for