*------------------------------------------------------------ * Date created: October 10, 1996. * * Generated in Bayreuth University, Mathematics Department * Professor Klaus Schittkowski * * Hock & Schittkowski, * Test Examples for Nonlinear Programming. * Springer-Verlag, 1981. * Problem 116, Page 124. * * 3-Stage Membrane Separation * * Please see also: * Ron S. Dembo, A set of geometric programming test problems * and their solutions. * Mathematical Programming, vol. 10, 1976, pp.206-208. * * 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 of nonlinear programming.') write(1,11) 11 format(5x,'Problem 116, Hock-Schittkowski pp.124') write(1,14) 14 format(5x,'3-Stage Membrane Separation ') * * Dimension of the problem: * n=13 ! No. of variables. m=15 ! No. of inequality constraints. me=0 ! No. of equality constraints. mb=26 ! No. of simple bounds on variables. nszc=46 ! No. of non-zeros in Jacobian of c(x)>=0. nsze=0 ! No. of non-zeros in Jacobian of e(x) =0. * * Initial point: * x(1) = 0.5d0 x(2) = 0.8d0 x(3) = 0.9d0 x(4) = 0.099d0 x(5) = 0.899d0 x(6) = 0.5d0 x(7) = 489.d0 x(8) = 80.d0 x(9) =650.d0 x(10)=450.d0 x(11)=149.9d0 x(12)=149.9d0 x(13)=149.9d0 * * 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)=2 icgc(2)=7 icgc(3)=8 icgc(4)=11 icgc(5)=12 icgc(6)=1 icgc(7)=2 icgc(8)=5 icgc(9)=8 icgc(10)=9 icgc(11)=10 icgc(12)=13 icgc(13)=1 icgc(14)=4 icgc(15)=6 icgc(16)=9 icgc(17)=10 icgc(18)=7 icgc(19)=11 icgc(20)=5 icgc(21)=7 icgc(22)=8 icgc(23)=6 icgc(24)=8 icgc(25)=9 icgc(26)=3 icgc(27)=7 icgc(28)=3 icgc(29)=7 icgc(30)=8 icgc(31)=12 icgc(32)=8 icgc(33)=9 icgc(34)=13 icgc(35)=4 icgc(36)=9 icgc(37)=10 icgc(38)=12 icgc(39)=14 icgc(40)=15 icgc(41)=13 icgc(42)=14 icgc(43)=15 icgc(44)=4 icgc(45)=14 icgc(46)=15 * * Starting address of columns of the Jacobian of the Inequalities * ipgc(1)=1 ipgc(2)=6 ipgc(3)=13 ipgc(4)=18 ipgc(5)=20 ipgc(6)=23 ipgc(7)=26 ipgc(8)=28 ipgc(9)=32 ipgc(10)=35 ipgc(11)=38 ipgc(12)=41 ipgc(13)=44 ipgc(14)=47 * * Rows indices of the nonzeros of the Jacobian of the Equalities * * * Starting address of columns of the Jacobian of the Equalities * return end * *-------------------------------------------------------------- * Date created: October 10, 1996 * Date modified: October 25, 1996 * Bayreuth University, Mathematics Department * * Problem 116 (3-Stage Membrane Separation). * Hock - Schittkowski, pp.124. *-------------------------------------------------------------- * 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(11) + x(12) + x(13) gobj(1)= 0.d0 gobj(2)= 0.d0 gobj(3)= 0.d0 gobj(4)= 0.d0 gobj(5)= 0.d0 gobj(6)= 0.d0 gobj(7)= 0.d0 gobj(8)= 0.d0 gobj(9)= 0.d0 gobj(10)=0.d0 gobj(11)=1.d0 gobj(12)=1.d0 gobj(13)=1.d0 * * Bounds on variables: * cb(1)=x(1)-0.1d0 cb(2)=1.d0-x(1) cb(3)=x(2)-0.1d0 cb(4)=1.d0-x(2) cb(5)=x(3)-0.1d0 cb(6)=1.d0-x(3) cb(7)=x(4)-0.0001d0 cb(8)=0.1d0-x(4) cb(9)=x(5)-0.1d0 cb(10)=0.9d0-x(5) cb(11)=x(6)-0.1d0 cb(12)=0.9d0-x(6) cb(13)=x(7)-0.1d0 cb(14)=1000.d0-x(7) cb(15)=x(8)-0.1d0 cb(16)=1000.d0-x(8) cb(17)=x(9)-500.d0 cb(18)=1000.d0-x(9) cb(19)=x(10)-0.1d0 cb(20)=500.d0-x(10) cb(21)=x(11)-1.d0 cb(22)=150.d0-x(11) cb(23)=x(12)-0.0001d0 cb(24)=150.d0-x(12) cb(25)=x(13)-0.0001d0 cb(26)=150.d0-x(13) * * Constraints. (Inequalities): * c(1)= x(3) - x(2) c(2)= x(2) - x(1) c(3)= 1.d0 - 0.002d0*x(7) + 0.002d0*x(8) c(4)= x(13) - 1.262626*x(10) + 1.231059d0*x(3)*x(10) c(5)= x(5) - 0.03475*x(2) - 0.975d0*x(2)*x(5) + 1 0.00975d0*x(2)*x(2) c(6)= x(6) - 0.03475*x(3) - 0.975d0*x(3)*x(6) + 1 0.00975d0*x(3)*x(3) c(7)= x(5)*x(7) - x(1)*x(8) - x(4)*x(7) + x(4)*x(8) c(8)= 1.d0 - 0.002d0*(x(2)*x(9)+x(5)*x(8)-x(1)*x(8)- 1 x(6)*x(9)) - x(5) - x(6) c(9)= x(2)*x(9) - x(3)*x(10) - x(6)*x(9) - 1 500.d0*x(2) + 500.d0*x(6) + x(2)*x(10) c(10)= x(2) - 0.9d0 - 0.002d0*(x(2)*x(10) - x(3)*x(10)) c(11)= x(4) - 0.03475d0*x(1) - 0.975d0*x(1)*x(4) + 1 0.00975d0*x(1)*x(1) c(12)= x(11) - 1.262626d0*x(8) + 1.231059d0*x(1)*x(8) c(13)= x(12) - 1.262626d0*x(9) + 1.231059d0*x(2)*x(9) c(14)= x(11) + x(12) + x(13) - 50.d0 c(15)= 250.d0 - x(11) - x(12) - x(13) * * Jacobian of the inequalities constraints: * C1 gc(1)=-1.d0 gc(2)= -x(8) gc(3)= 0.002d0*x(8) gc(4)= -0.03475d0 - 0.975d0*x(4) + 2.d0*0.00975d0*x(1) gc(5)= 1.231059d0*x(8) C2 gc(6)=-1.d0 gc(7)= 1.d0 gc(8)= -0.03475d0 - 0.975d0*x(5) + 2.d0*0.00975d0*x(2) gc(9)= -0.002d0*x(9) gc(10)= x(9) - 500.d0 + x(10) gc(11)= 1.d0 - 0.002d0*x(10) gc(12)= 1.231059d0*x(9) C3 gc(13)=1.d0 gc(14)= 1.231059d0*x(10) gc(15)= -0.03475d0 - 0.975d0*x(6) + 2.d0*0.00975d0*x(3) gc(16)= -x(10) gc(17)= 0.002d0*x(10) C4 gc(18)= -x(7) + x(8) gc(19)= 1.d0 - 0.975d0*x(1) C5 gc(20)= 1.d0 - 0.975d0*x(2) gc(21)= x(7) gc(22)= -0.002d0*x(8) -1.d0 C6 gc(23)= 1.d0 - 0.975d0*x(3) gc(24)= 0.002d0*x(9) - 1.d0 gc(25)= -x(9) + 500.d0 C7 gc(26)= -0.002d0 gc(27)= x(5) - x(4) C8 gc(28)= 0.002d0 gc(29)= -x(1) + x(4) gc(30)= -0.002d0*x(5) + 0.002d0*x(1) gc(31)= -1.262626d0 + 1.231059d0*x(1) C9 gc(32)= -0.002d0*x(2) + 0.002d0*x(6) gc(33)= x(2) - x(6) gc(34)= -1.262626d0 + 1.231059d0*x(2) C10 gc(35)= -1.262626d0 + 1.231059d0*x(3) gc(36)= -x(3) + x(2) gc(37)= -0.002d0*x(2) + 0.002d0*x(3) C11 gc(38)= 1.d0 gc(39)= 1.d0 gc(40)=-1.d0 C12 gc(41)= 1.d0 gc(42)= 1.d0 gc(43)=-1.d0 C13 gc(44)= 1.d0 gc(45)= 1.d0 gc(46)=-1.d0 * * Constraints. (Equalities): * * * Jacobian of the equalities constraints: * return end *--------------------------------------------------MSP3.for