*-------------------------------------------------------------- * Date created: November 22, 1996 * Bayreuth University, Mathematics Department * * Hansen Problem. * Chemical Mixing Problem. *-------------------------------------------------------------- * 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(18) * * Coefficients of the objective function: * a(1)=100.d0 a(2)=89.73d0 a(3)=10.27d0 a(4)=0.00037d0 a(5)=0.0147d0 a(6)=0.982d0 a(7)=0.d0 a(8)=0.0001d0 a(9)=0.22d0 a(10)=0.66d0 a(11)=0.114d0 a(12)=0.002d0 a(13)=0.004d0 a(14)=0.245d0 a(15)=0.734d0 a(16)=0.0147d0 a(17)=0.0022d0 a(18)=0.0044d0 * Objective function and its gradient: * objf = 0.d0 do i=1,n objf = objf + (x(i)-a(i))**2 end do do i=1,n gobj(i) = 2.d0*(x(i)-a(i)) end do * Bounds on variables: * * j=1 * do i=1,n * cb(j) = x(i) * cb(j+1) = 110.d0 - x(i) * j=j+2 * end do * * Constraints. (Inequalities): * * * Jacobian of the inequalities constraints: * * * Constraints. (Equalities): * e(1)= x(1)*x(9) - x(2)*x(14) - x(3)*x(4) e(2)= x(1)*x(10) - x(2)*x(15) - x(3)*x(5) e(3)= x(1)*x(11) - x(2)*x(16) - x(3)*x(6) e(4)= x(1)*x(12) - x(2)*x(17) - x(3)*x(7) e(5)= x(1)*x(13) - x(2)*x(18) - x(3)*x(8) e(6)= x(4) + x(5) + x(6) + x(7) + x(8) - 1.d0 e(7)= x(9) + x(10) + x(11) + x(12) + x(13) - 1.d0 e(8)= x(14) + x(15) + x(16) + x(17) + x(18) - 1.d0 e(9)= x(14) - 66.67d0 * x(4) e(10)= x(15) - 50.d0 * x(5) e(11)= x(16) - 0.01d0 * x(6) e(12)= x(17) - 100.d0 * x(7) e(13)= x(18) - 33.33d0 * x(8) * Jacobian of the equalities constraints: * C1 ge(1)=x(9) ge(2)=x(10) ge(3)=x(11) ge(4)=x(12) ge(5)=x(13) C2 ge(6)=-x(14) ge(7)=-x(15) ge(8)=-x(16) ge(9)=-x(17) ge(10)=-x(18) C3 ge(11)=-x(4) ge(12)=-x(5) ge(13)=-x(6) ge(14)=-x(7) ge(15)=-x(8) C4 ge(16)=-x(3) ge(17)=1.d0 ge(18)=-66.67d0 C5 ge(19)=-x(3) ge(20)=1.d0 ge(21)=-50.d0 C6 ge(22)=-x(3) ge(23)=1.d0 ge(24)=-0.015d0 C7 ge(25)=-x(3) ge(26)=1.d0 ge(27)=-100.d0 C8 ge(28)=-x(3) ge(29)=1.d0 ge(30)=-33.33d0 C9 ge(31)=x(1) ge(32)=1.d0 C10 ge(33)=x(1) ge(34)=1.d0 C11 ge(35)=x(1) ge(36)=1.d0 C12 ge(37)=x(1) ge(38)=1.d0 C13 ge(39)=x(1) ge(40)=1.d0 C14 ge(41)=-x(2) ge(42)=1.d0 ge(43)=1.d0 C15 ge(44)=-x(2) ge(45)=1.d0 ge(46)=1.d0 C16 ge(47)=-x(2) ge(48)=1.d0 ge(49)=1.d0 C17 ge(50)=-x(2) ge(51)=1.d0 ge(52)=1.d0 C18 ge(53)=-x(2) ge(54)=1.d0 ge(55)=1.d0 * return end