*----------------------------------------------------------- * Date created: February 26, 1996 * * Pibouleau, L., Floquet, P., Domenech, S., * Optimisation de procedes chimiques par une methode de * gradient reduit. Partie II. Exemples d'illustration. * Comparaison avec d'autres methodes. * RAIRO Recherche Operationnelle, vol.19, no.4, 1985, pp.325 * * Problem P1. * * 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 Pibouleau et.al, Probleme P1') write(1,11) 11 format(5x,'RAIRO , 1985, pp.325-326.') * * Dimension of the problem: * n=8 m=0 me=4 mb=16 nszc=0 nsze=18 * * Initial point: * x(1)=1.d0 x(2)=0.d0 x(3)=1.d0 x(4)=-0.5d0 x(5)=1.d0 x(6)=2.d0 x(7)=3.d0 x(8)=0.d0 * * 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 Equalities * icge(1)=1 icge(2)=2 icge(3)=4 * icge(4)=2 icge(5)=4 * icge(6)=1 icge(7)=3 * icge(8)=1 * icge(9)=1 icge(10)=2 icge(11)=3 icge(12)=4 * icge(13)=4 * icge(14)=1 icge(15)=2 icge(16)=3 icge(17)=4 * icge(18)=2 * * Starting address of columns of the Jacobian of the Equalities * ipge(1)=1 ipge(2)=4 ipge(3)=6 ipge(4)=8 ipge(5)=9 ipge(6)=13 ipge(7)=14 ipge(8)=18 ipge(9)=19 * return end * *-------------------------------------------------------------- * Date created: February 2, 1996 * Example from Pibouleau. Probleme P1. *-------------------------------------------------------------- * 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=1000.d0*x(1)*x(1) + x(2)*x(2)/1000.d0 + 1 (x(3)-1.d0)**2 + (x(4)-0.5d0)**2 + 1 (x(5)-1.d0)**2 + (x(6)-5.d0)**2 + 1 (x(7)-3.d0)**2 + 110.d0*((x(8)-1.d0)**2) * gobj(1)=2000.d0*x(1) gobj(2)=x(2)/500.d0 gobj(3)=2.d0*(x(3)-1.d0) gobj(4)=2.d0*(x(4)-0.5) gobj(5)=2.d0*(x(5)-1.d0) gobj(6)=2.d0*(x(6)-5.d0) gobj(7)=2.d0*(x(7)-3.d0) gobj(8)=220.d0*(x(8)-1.d0) * * * Bounds on variables: * cb(1)=x(1) cb(2)=2.d0-x(1) cb(3)=x(2)+5.d0 cb(4)=1.d0-x(2) cb(5)=x(3) cb(6)=2.d0-x(3) cb(7)=x(4)+1.d0 cb(8)=2.d0-x(4) cb(9)=x(5) cb(10)=4.d0-x(5) cb(11)=x(6)+1.d0 cb(12)=10.d0-x(6) cb(13)=x(7) cb(14)=6.d0-x(7) cb(15)=x(8)+1.d0 cb(16)=1.d0-x(8) * * Constraints. (Equalities): * e(1)=x(1)+2.d0*x(3)+x(4)+3.d0*x(5)-x(7)-2.5d0 e(2)=x(1)+x(2)+3.d0*x(5)-4.d0*x(7)+x(8)+8.d0 e(3)=-2.d0*x(3)+8.d0*x(5)-5.d0*x(7)+9.d0 e(4)=3.d0*x(1)+x(2)+9.d0*x(5)+x(6)+17.d0*x(7)-65.d0 * * Jacobian of the equalities constraints: * ge(1)=1.d0 ge(2)=1.d0 ge(3)=3.d0 * ge(4)=1.d0 ge(5)=1.d0 * ge(6)=2.d0 ge(7)=-2.d0 * ge(8)=1.d0 * ge(9)=3.d0 ge(10)=3.d0 ge(11)=8.d0 ge(12)=9.d0 * ge(13)=1.d0 * ge(14)=-1.d0 ge(15)=-4.d0 ge(16)=-5.d0 ge(17)=17.d0 * ge(18)=1.d0 * return end * *-----------------------------------------PIB.for