*--------------------------------------------------------- * Date created: January 31, 2001 * * Floudas, C.A., Visweswaran, V., Quadratic Optimization, * Princeton University * * Maling, K., Mueller, S.H., Heller, W.R., On finding most optimal * rectangular package plans. * Proceedings of the 19th Design Automation Conference, 1982, * pages 663-670. * * 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) * write(1,10) 10 format(5x,'Example of a Nonlinear Programming Problem.') write(1,11) 11 format(5x,' Floudas & Visweswaran - Quadratic Optimization') * n=12 m=8 me=5 mb=n nszc=16 nsze=18 * * Initial Point * do i=1,n x(i)=10.d0 end do * * Index vector for simple bounds: * sb(1)=1 sb(2)=2 sb(3)=3 sb(4)=4 sb(5)=5 sb(6)=6 sb(7)=7 sb(8)=8 sb(9)=9 sb(10)=10 sb(11)=11 sb(12)=12 * * Rows indices of the nonzeros of the Jacobian of the Equalities. * icge(1)=2 icge(2)=3 icge(3)=2 icge(4)=3 icge(5)=1 icge(6)=2 icge(7)=3 icge(8)=1 icge(9)=2 icge(10)=3 icge(11)=5 icge(12)=5 icge(13)=4 icge(14)=5 icge(15)=5 icge(16)=5 icge(17)=4 icge(18)=5 * * Starting address of the columns of the Jacobian of the Equalities. * ipge(1)=1 ipge(2)=3 ipge(3)=4 ipge(4)=5 ipge(5)=8 ipge(6)=10 ipge(7)=11 ipge(8)=12 ipge(9)=13 ipge(10)=15 ipge(11)=16 ipge(12)=17 ipge(13)=19 * * Rows indices of the nonzeros of the Jacobian of the INEqualities. * icgc(1)=3 icgc(2)=1 icgc(3)=4 icgc(4)=1 icgc(5)=5 icgc(6)=6 icgc(7)=7 icgc(8)=8 icgc(9)=2 icgc(10)=3 icgc(11)=4 icgc(12)=5 icgc(13)=2 icgc(14)=6 icgc(15)=7 icgc(16)=8 * * Starting address of the columns of the Jacobian of the INEqualities. * ipgc(1)=1 ipgc(2)=2 ipgc(3)=4 ipgc(4)=6 ipgc(5)=7 ipgc(6)=8 ipgc(7)=9 ipgc(8)=11 ipgc(9)=12 ipgc(10)=13 ipgc(11)=15 ipgc(12)=16 ipgc(13)=17 * return end * *-------------------------------------------------------------- * Date created: January 31, 2001 * * Floudas, C.A., Visweswaran, V., Quadratic Optimization, * Princeton University * * Maling, K., Mueller, S.H., Heller, W.R., On finding most optimal * rectangular package plans. * Proceedings of the 19th Design Automation Conference, 1982, * pages 663-670. *-------------------------------------------------------------- * subroutine prob(n,m,mb,me,sb,x,objf,gobj,c,gc,cb,e,ge, 1 nszc,nsze,nb) * * Calculate problem functions at iterate x. * double precision x(n),objf,gobj(n),c(m),gc(nszc), * cb(mb),e(me),ge(nsze) * * * Objective function, and its gradient. * objf=x(1)*x(7)+x(2)*x(8)+x(3)*x(9)+x(4)*x(10)+ * x(5)*x(11)+x(6)*x(12) * gobj(1)=x(7) gobj(2)=x(8) gobj(3)=x(9) gobj(4)=x(10) gobj(5)=x(11) gobj(6)=x(12) gobj(7)=x(1) gobj(8)=x(2) gobj(9)=x(3) gobj(10)=x(4) gobj(11)=x(5) gobj(12)=x(6) * * Bounds on variables. * cb(1)=x(1)-5.d0 cb(2)=x(2)-5.d0 cb(3)=x(3)-2.d0 cb(4)=x(4)-4.d0 cb(5)=x(5)-4.d0 cb(6)=x(6)-5.d0 cb(7)=x(7)-5.d0 cb(8)=x(8)-2.d0 cb(9)=x(9)-5.d0 cb(10)=x(10)-4.d0 cb(11)=x(11)-5.d0 cb(12)=x(12)-5.d0 * * Equality Constraints. * e(1)=-x(4)+x(5) e(2)=-x(1)+x(2)-x(4)+x(5) e(3)=-x(1)+x(3)-x(4)+x(6) e(4)=-x(9)+x(12) e(5)=-x(7)-x(8)-x(9)+x(10)+x(11)+x(12) * * Jacobian of the equality constraints. * ge(1)=-1.d0 ge(2)=-1.d0 ge(3)=1.d0 ge(4)=1.d0 ge(5)=-1.d0 ge(6)=-1.d0 ge(7)=-1.d0 ge(8)=1.d0 ge(9)=1.d0 ge(10)=1.d0 ge(11)=-1.d0 ge(12)=-1.d0 ge(13)=-1.d0 ge(14)=-1.d0 ge(15)=1.d0 ge(16)=1.d0 ge(17)=1.d0 ge(18)=1.d0 * * INEquality Constraints. * c(1)=x(2)-x(3)-1.d0 c(2)=x(7)-x(10)-1.d0 c(3)=x(1)*x(7)-30.d0 c(4)=x(2)*x(8)-20.d0 c(5)=x(3)*x(9)-20.d0 c(6)=x(4)*x(10)-25.d0 c(7)=x(5)*x(11)-15.d0 c(8)=x(6)*x(12)-20.d0 * * Jacobian of the INEquality constraints. * gc(1)=x(7) gc(2)=1.d0 gc(3)=x(8) gc(4)=-1.d0 gc(5)=x(9) gc(6)=x(10) gc(7)=x(11) gc(8)=x(12) gc(9)=1.d0 gc(10)=x(1) gc(11)=x(2) gc(12)=x(3) gc(13)=-1.d0 gc(14)=x(4) gc(15)=x(5) gc(16)=x(6) * return end *-------------------------------------------------FV1.for