*------------------------------------------------------------ * March 8, 2000 * Propane, Isobutane, n-Butane Isopentane Separation * * Floudas & Pardalos, * A collection of test problems for constrained global * optimization algorithms. * Springer-Verlag, Berlin, 1990. * Lecture Notes in Computer Science, vol.455. * Problem 5.3, pp.41-46. * * 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 of nonlinear programming.') write(1,11) 11 format(5x,'Propane, Isobutane, n-Butane Isopentane separation') write(1,14) 14 format(5x,'Floudas & Pardalos, Problem 5.3, pp.41-46.') write(1,15) 15 format(5x,'March 11, 2001') * * Dimension of the problem: * n=110 ! No. of variables. m=0 ! No. of inequality constraints. me=68 ! No. of equality constraints. mb=12 ! No. of simple bounds on variables. nszc=0 ! No. of non-zeros in Jacobian of c(x)>=0. nsze=n*me ! No. of non-zeros in Jacobian of e(x) =0. * * Initial point: * do i=1,n x(i)=1.d0 end do * do i=33,38 x(i)=0.9d0 end do * * Index vector for simple bounds: cb >= 0. * j=1 do i=33,38 sb(j)=i sb(j+1)=-i j=j+2 end do * * Rows indices of the nonzeros of the Jacobian of the Equalities * * * Starting address of columns of the Jacobian of the Equalities * * * Rows indices of the nonzeros of the Jacobian of the INEqualities * k=1 do i=1,n do j=1,me icge(k)=j k=k+1 end do end do * * Starting address of columns of the Jacobian of the INEqualities * ipge(1)=1 do i=2,n+1 ipge(i)=me*(i-1)+1 end do * return end *-------------------------------------------------------------- * March 8, 2000 * Propane, Isobutane, n-Butane Isopentane Separation * Floudas & Pardalos, Problem 5.3, pp.41-46. *-------------------------------------------------------------- * 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 a01,a11,a21,a31,ba1,bb1,bc1 real*8 a02,a12,a22,a32,ba2,bb2,bc2 real*8 a03,a13,a23,a33,ba3,bb3,bc3 * real*8 gjac(68,110) * a01=0.31569d0 a11=-0.0112812d0 a21=0.0072698d0 a31=0.0064241d0 ba1=0.0016446d0 bb1=0.0018611d0 bc1=0.001262d0 * a02=0.96926d0 a12=-0.0413393d0 a22=0.0228203d0 a32=0.0257035d0 ba2=0.0015625d0 bb2=0.0091604d0 bc2=0.0076758d0 * a03=0.40281d0 a13=-0.0119785d0 a23=0.0082055d0 a33=0.009819d0 ba3=-0.001748d0 bb3=-0.0002583d0 bc3=-0.0004691d0 * * Objective function and its gradient: * objf=a01 + (a11+a21*x(33)+a31*x(36)+ba1*x(39)+ * bb1*x(40)+bc1*x(41) ) * x(6) + * a02 + (a12+a22*x(34)+a32*x(37)+ba2*x(59)+ * bb2*x(60)+bc2*x(61) ) * x(15) + * a03 + (a13+a23*x(35)+a33*x(38)+ba3*x(79)+ * bb3*x(80)+bc3*x(81) ) * x(24) * do i=1,n gobj(i)=0.d0 end do * gobj(6)=a11+a21*x(33)+a31*x(36)+ba1*x(39)+bb1*x(40)+bc1*x(41) gobj(33)=a21*x(6) gobj(36)=a31*x(6) gobj(39)=ba1*x(6) gobj(40)=bb1*x(6) gobj(41)=bc1*x(6) * gobj(15)=a12+a22*x(34)+a32*x(37)+ba2*x(59)+bb2*x(60)+bc2*x(61) gobj(34)=a22*x(15) gobj(37)=a32*x(15) gobj(59)=ba2*x(15) gobj(60)=bb2*x(15) gobj(61)=bc2*x(15) * gobj(24)=a13+a23*x(35)+a33*x(38)+ba3*x(79)+bb3*x(80)+bc3*x(81) gobj(35)=a23*x(24) gobj(38)=a33*x(24) gobj(79)=ba3*x(24) gobj(80)=bb3*x(24) gobj(81)=bc3*x(24) * * Bounds on variables: * * j=1 * do i=1,32 * cb(j)=x(i) * cb(j+1)=200.d0-x(i) * j=j+2 * end do cb(1)=x(33)-0.85d0 cb(2)=1.d0-x(33) cb(3)=x(34)-0.85d0 cb(4)=1.d0-x(34) cb(5)=x(35)-0.85d0 cb(6)=1.d0-x(35) cb(7)=x(36)-0.85d0 cb(8)=1.d0-x(36) cb(9)=x(37)-0.85d0 cb(10)=1.d0-x(37) cb(11)=x(38)-0.85d0 cb(12)=1.d0-x(38) * * j=77 * do i=39,n * cb(j)=x(i) * cb(j+1)=200.d0-x(i) * j=j+2 * end do * * Constraints. (Equalities): * e(1)=x(1)+x(2)+x(3)+x(4)+x(5)-600.d0 e(2)=x(7)-x(8)-x(9) e(3)=x(10)-x(11)-x(12)-x(13)-x(14) e(4)=x(16)-x(17)-x(18)-x(19) e(5)=x(20)-x(21)-x(22)-x(23) e(6)=x(25)-x(26)-x(27)-x(28)-x(29) e(7)=x(30)-x(31)-x(32) * e(8)=x(7)*x(43)-x(33)*x(91) e(9)=x(16)*x(64)-x(34)*x(96) e(10)=x(25)*x(85)-x(35)*x(101) e(11)=x(10)*x(48)-x(36)*x(92) e(12)=x(20)*x(73)-x(37)*x(97) e(13)=x(30)*x(90)-x(38)*x(102) * e(14)=x(91)-x(6)*x(39) e(15)=x(92)-x(6)*x(40) e(16)=x(93)-x(6)*x(41) e(17)=x(94)-x(6)*x(42) * e(18)=x(95)-x(15)*x(59) e(19)=x(96)-x(15)*x(60) e(20)=x(97)-x(15)*x(61) e(21)=x(98)-x(15)*x(62) * e(22)=x(99) -x(24)*x(79) e(23)=x(100)-x(24)*x(80) e(24)=x(101)-x(24)*x(81) e(25)=x(102)-x(24)*x(82) * e(26)=x(91)-x(7)*x(43)-x(10)*x(47) e(27)=x(92)-x(7)*x(44)-x(10)*x(48) e(28)=x(93)-x(7)*x(45)-x(10)*x(49) e(29)=x(94)-x(7)*x(46)-x(10)*x(50) * e(30)=x(95)-x(16)*x(63)-x(20)*x(71) e(31)=x(96)-x(16)*x(64)-x(20)*x(72) e(32)=x(97)-x(16)*x(65)-x(20)*x(73) e(33)=x(98)-x(16)*x(66)-x(20)*x(74) * e(34)=x(99) -x(25)*x(83)-x(30)*x(87) e(35)=x(100)-x(25)*x(84)-x(30)*x(88) e(36)=x(101)-x(25)*x(85)-x(30)*x(89) e(37)=x(102)-x(25)*x(86)-x(30)*x(90) * e(38)=0.250d0*x(1)+x(17)*x(67)+x(26)*x(103)-x(91) e(39)=0.333d0*x(1)+x(17)*x(68)+x(26)*x(104)-x(92) e(40)=0.167d0*x(1)+x(17)*x(69)+x(26)*x(105)-x(93) e(41)=0.250d0*x(1)+x(17)*x(70)+x(26)*x(106)-x(91) * e(42)=0.250d0*x(2)+x(11)*x(51)+x(27)*x(107)-x(95) e(43)=0.333d0*x(2)+x(11)*x(52)+x(27)*x(108)-x(96) e(44)=0.167d0*x(2)+x(11)*x(53)+x(27)*x(109)-x(97) e(45)=0.250d0*x(2)+x(11)*x(54)+x(27)*x(110)-x(95) * e(46)=0.250d0*x(3)+x(12)*x(55)+x(21)*x(75)-x(99) e(47)=0.333d0*x(3)+x(12)*x(56)+x(21)*x(76)-x(100) e(48)=0.167d0*x(3)+x(12)*x(57)+x(21)*x(77)-x(101) e(49)=0.250d0*x(3)+x(12)*x(58)+x(21)*x(78)-x(99) * e(50)=x(45) e(51)=x(46) e(52)=x(66) e(53)=x(71) e(54)=x(87) e(55)=x(88) * e(56)=0.250d0*x(4)+x(8)*x(43)+x(13)*x(47)+x(18)*x(63)+ * x(22)*x(71)+x(28)*x(83)+x(31)*x(87)-50.d0 e(57)=0.222d0*x(4)+x(8)*x(44)+x(13)*x(48)+x(18)*x(64)+ * x(22)*x(72)+x(28)*x(84)+x(31)*x(88)-100.d0 e(58)=0.167d0*x(4)+x(8)*x(45)+x(13)*x(49)+x(18)*x(65)+ * x(22)*x(73)+x(28)*x(85)+x(31)*x(89)-40.d0 e(59)=0.250d0*x(4)+x(8)*x(46)+x(13)*x(50)+x(18)*x(66)+ * x(22)*x(74)+x(28)*x(86)+x(31)*x(90)-100.d0 * e(60)=x(39)+x(40)+x(41)+x(42)-1.d0 e(61)=x(43)+x(44)+x(45)+x(46)-1.d0 e(62)=x(47)+x(48)+x(49)+x(50)-1.d0 e(63)=x(59)+x(60)+x(61)+x(62)-1.d0 e(64)=x(63)+x(64)+x(65)+x(66)-1.d0 e(65)=x(71)+x(72)+x(73)+x(74)-1.d0 e(66)=x(79)+x(80)+x(81)+x(82)-1.d0 e(67)=x(83)+x(84)+x(85)+x(86)-1.d0 e(68)=x(87)+x(88)+x(89)+x(90)-1.d0 * * * Jacobian of inequalities constraints * do i=1,me do j=1,n gjac(i,j)=0.d0 end do end do * *e1 gjac(1,1)=1.d0 gjac(1,2)=1.d0 gjac(1,3)=1.d0 gjac(1,4)=1.d0 gjac(1,5)=1.d0 *e2 gjac(2,7)=1.d0 gjac(2,8)=-1.d0 gjac(2,9)=-1.d0 *e3 gjac(3,10)=1.d0 gjac(3,11)=-1.d0 gjac(3,12)=-1.d0 gjac(3,13)=-1.d0 gjac(3,14)=-1.d0 *e4 gjac(4,16)=1.d0 gjac(4,17)=-1.d0 gjac(4,18)=-1.d0 gjac(4,19)=-1.d0 *e5 gjac(5,20)=1.d0 gjac(5,21)=-1.d0 gjac(5,22)=-1.d0 gjac(5,23)=-1.d0 *e6 gjac(6,25)=1.d0 gjac(6,26)=-1.d0 gjac(6,27)=-1.d0 gjac(6,28)=-1.d0 gjac(6,29)=-1.d0 *e7 gjac(7,30)=1.d0 gjac(7,31)=-1.d0 gjac(7,32)=-1.d0 *e8 gjac(8,7)=x(43) gjac(8,43)=x(7) gjac(8,33)=-x(91) gjac(8,91)=-x(33) *e9 gjac(9,16)=x(64) gjac(9,64)=x(16) gjac(9,34)=-x(96) gjac(9,96)=-x(34) *e10 gjac(10,25)=x(85) gjac(10,85)=x(25) gjac(10,35)=-x(101) gjac(10,101)=-x(35) *e11 gjac(11,10)=x(48) gjac(11,48)=x(10) gjac(11,36)=-x(92) gjac(11,92)=-x(36) *e12 gjac(12,20)=x(73) gjac(12,73)=x(20) gjac(12,37)=-x(97) gjac(12,97)=-x(37) *e13 gjac(13,30)=x(90) gjac(13,90)=x(30) gjac(13,38)=-x(102) gjac(13,102)=-x(38) *e14 gjac(14,91)=1.d0 gjac(14,6)=-x(39) gjac(14,39)=-x(6) *e15 gjac(15,92)=1.d0 gjac(15,6)=-x(40) gjac(15,40)=-x(6) *e16 gjac(16,93)=1.d0 gjac(16,6)=-x(41) gjac(16,41)=-x(6) *e17 gjac(17,94)=1.d0 gjac(17,6)=-x(42) gjac(17,42)=-x(6) *e18 gjac(18,95)=1.d0 gjac(18,15)=-x(59) gjac(18,59)=-x(15) *e19 gjac(19,96)=1.d0 gjac(19,15)=-x(60) gjac(19,60)=-x(15) *e20 gjac(20,97)=1.d0 gjac(20,15)=-x(61) gjac(20,61)=-x(15) *e21 gjac(21,98)=1.d0 gjac(21,15)=-x(62) gjac(21,62)=-x(15) *e22 gjac(22,99)=1.d0 gjac(22,24)=-x(79) gjac(22,79)=-x(24) *e23 gjac(23,100)=1.d0 gjac(23,24)=-x(80) gjac(23,80)=-x(24) *e24 gjac(24,101)=1.d0 gjac(24,24)=-x(81) gjac(24,81)=-x(24) *e25 gjac(25,102)=1.d0 gjac(25,24)=-x(82) gjac(25,82)=-x(24) *e26 gjac(26,91)=1.d0 gjac(26,7)=-x(43) gjac(26,43)=-x(7) gjac(26,10)=-x(47) gjac(26,47)=-x(10) *e27 gjac(27,92)=1.d0 gjac(27,7)=-x(44) gjac(27,44)=-x(7) gjac(27,10)=-x(48) gjac(27,48)=-x(10) *e28 gjac(28,93)=1.d0 gjac(28,7)=-x(45) gjac(28,45)=-x(7) gjac(28,10)=-x(49) gjac(28,49)=-x(10) *e29 gjac(29,94)=1.d0 gjac(29,7)=-x(46) gjac(29,46)=-x(7) gjac(29,10)=-x(50) gjac(29,50)=-x(10) *e30 gjac(30,95)=1.d0 gjac(30,16)=-x(63) gjac(30,63)=-x(16) gjac(30,20)=-x(71) gjac(30,71)=-x(20) *e31 gjac(31,96)=1.d0 gjac(31,16)=-x(64) gjac(31,64)=-x(16) gjac(31,20)=-x(72) gjac(31,72)=-x(20) *e32 gjac(32,97)=1.d0 gjac(32,16)=-x(65) gjac(32,65)=-x(16) gjac(32,20)=-x(73) gjac(32,73)=-x(20) *e33 gjac(33,98)=1.d0 gjac(33,16)=-x(66) gjac(33,66)=-x(16) gjac(33,20)=-x(74) gjac(33,74)=-x(20) *e34 gjac(34,99)=1.d0 gjac(34,25)=-x(83) gjac(34,83)=-x(25) gjac(34,30)=-x(87) gjac(34,87)=-x(30) *e35 gjac(35,100)=1.d0 gjac(35,25)=-x(84) gjac(35,84)=-x(25) gjac(35,30)=-x(88) gjac(35,88)=-x(30) *e36 gjac(36,101)=1.d0 gjac(36,25)=-x(85) gjac(36,85)=-x(25) gjac(36,30)=-x(89) gjac(36,89)=-x(30) *e37 gjac(37,102)=1.d0 gjac(37,25)=-x(86) gjac(37,86)=-x(25) gjac(37,30)=-x(90) gjac(37,90)=-x(30) *e38 gjac(38,1)=0.250d0 gjac(38,17)=x(67) gjac(38,67)=x(17) gjac(38,26)=x(103) gjac(38,103)=x(26) gjac(38,91)=-1.d0 *e39 gjac(39,1)=0.333d0 gjac(39,17)=x(68) gjac(39,68)=x(17) gjac(39,26)=x(104) gjac(39,104)=x(26) gjac(39,92)=-1.d0 *e40 gjac(40,1)=0.167d0 gjac(40,17)=x(69) gjac(40,69)=x(17) gjac(40,26)=x(105) gjac(40,105)=x(26) gjac(40,93)=-1.d0 *e41 gjac(41,1)=0.250d0 gjac(41,17)=x(70) gjac(41,70)=x(17) gjac(41,26)=x(106) gjac(41,106)=x(26) gjac(41,91)=-1.d0 *e42 gjac(42,2)=0.250d0 gjac(42,11)=x(51) gjac(42,51)=x(11) gjac(42,27)=x(107) gjac(42,107)=x(27) gjac(42,95)=-1.d0 *e43 gjac(43,2)=0.333d0 gjac(43,11)=x(52) gjac(43,52)=x(11) gjac(43,27)=x(108) gjac(43,108)=x(27) gjac(43,96)=-1.d0 *e44 gjac(44,2)=0.167d0 gjac(44,11)=x(53) gjac(44,53)=x(11) gjac(44,27)=x(109) gjac(44,109)=x(27) gjac(44,97)=-1.d0 *e45 gjac(45,2)=0.250d0 gjac(45,11)=x(54) gjac(45,54)=x(11) gjac(45,27)=x(110) gjac(45,110)=x(27) gjac(45,95)=-1.d0 *e46 gjac(46,3)=0.250d0 gjac(46,12)=x(55) gjac(46,55)=x(12) gjac(46,21)=x(75) gjac(46,75)=x(21) gjac(46,99)=-1.d0 *e47 gjac(47,3)=0.333d0 gjac(47,12)=x(56) gjac(47,56)=x(12) gjac(47,21)=x(76) gjac(47,76)=x(21) gjac(47,100)=-1.d0 *e48 gjac(48,3)=0.167d0 gjac(48,12)=x(57) gjac(48,57)=x(12) gjac(48,21)=x(77) gjac(48,77)=x(21) gjac(48,101)=-1.d0 *e49 gjac(49,3)=0.250d0 gjac(49,12)=x(58) gjac(49,58)=x(12) gjac(49,21)=x(78) gjac(49,78)=x(21) gjac(49,99)=-1.d0 *e50-55 gjac(50,45)=1.d0 gjac(51,46)=1.d0 gjac(52,66)=1.d0 gjac(53,71)=1.d0 gjac(54,87)=1.d0 gjac(55,88)=1.d0 *e56 gjac(56,4)=0.250d0 gjac(56,8)=x(43) gjac(56,43)=x(8) gjac(56,13)=x(47) gjac(56,47)=x(13) gjac(56,18)=x(63) gjac(56,63)=x(18) gjac(56,22)=x(71) gjac(56,71)=x(22) gjac(56,28)=x(83) gjac(56,83)=x(28) gjac(56,31)=x(87) gjac(56,87)=x(31) *e57 gjac(57,4)=0.222d0 gjac(57,8)=x(44) gjac(57,44)=x(8) gjac(57,13)=x(48) gjac(57,48)=x(13) gjac(57,18)=x(64) gjac(57,64)=x(18) gjac(57,22)=x(72) gjac(57,72)=x(22) gjac(57,28)=x(84) gjac(57,84)=x(28) gjac(57,31)=x(88) gjac(57,88)=x(31) *e58 gjac(58,4)=0.167d0 gjac(58,8)=x(45) gjac(58,45)=x(8) gjac(58,13)=x(49) gjac(58,49)=x(13) gjac(58,18)=x(65) gjac(58,65)=x(18) gjac(58,22)=x(73) gjac(58,73)=x(22) gjac(58,28)=x(85) gjac(58,85)=x(28) gjac(58,31)=x(89) gjac(58,89)=x(31) *e59 gjac(59,4)=0.250d0 gjac(59,8)=x(46) gjac(59,46)=x(8) gjac(59,13)=x(50) gjac(59,50)=x(13) gjac(59,18)=x(66) gjac(59,66)=x(18) gjac(59,22)=x(74) gjac(59,74)=x(22) gjac(59,28)=x(86) gjac(59,86)=x(28) gjac(59,31)=x(90) gjac(59,90)=x(31) *e60 gjac(60,39)=1.d0 gjac(60,40)=1.d0 gjac(60,41)=1.d0 gjac(60,42)=1.d0 gjac(61,43)=1.d0 gjac(61,44)=1.d0 gjac(61,45)=1.d0 gjac(61,46)=1.d0 gjac(62,47)=1.d0 gjac(62,48)=1.d0 gjac(62,49)=1.d0 gjac(62,50)=1.d0 gjac(63,59)=1.d0 gjac(63,60)=1.d0 gjac(63,61)=1.d0 gjac(63,62)=1.d0 gjac(64,63)=1.d0 gjac(64,64)=1.d0 gjac(64,65)=1.d0 gjac(64,66)=1.d0 gjac(65,71)=1.d0 gjac(65,72)=1.d0 gjac(65,73)=1.d0 gjac(65,74)=1.d0 gjac(66,79)=1.d0 gjac(66,80)=1.d0 gjac(66,81)=1.d0 gjac(66,82)=1.d0 gjac(67,83)=1.d0 gjac(67,84)=1.d0 gjac(67,85)=1.d0 gjac(67,86)=1.d0 gjac(68,87)=1.d0 gjac(68,88)=1.d0 gjac(68,89)=1.d0 gjac(68,90)=1.d0 * do j=1,n do i=1,me k=(j-1)*me+i ge(k)=gjac(i,j) end do end do * * Constraints. (INEqualities): * * Jacobian of the INEqualities constraints: * return end *---------------------------------------------------- FP5-3.for