The NLP Procedure

JACNLC Statement

JACNLC variables ;

The JACNLC statement defines the Jacobian matrix for the system of constraint functions $ c_1(x),\ldots ,c_\mi {mc}(x)$. The statements list the $ \mi {mc} \times n$ variable names which correspond to the elements $ CJ_{i,j}$, $ i=1,\ldots ,\mi {mc}; \:  j=1,\ldots ,n$, of the Jacobian matrix by rows.

For example, the statements

      nlincon c1-c3;
      decvar  x1-x2;
      jacnlc  cj1-cj6;

correspond to the Jacobian matrix

\[  CJ = \left[ \begin{array}{cc} CJ1 &  CJ2 \\ CJ3 &  CJ4 \\ CJ5 &  CJ6 \\ \end{array} \right] = \left[ \begin{array}{cc} \partial c_1/ \partial x_1 &  \partial c_1/ \partial x_2 \\ \partial c_2/ \partial x_1 &  \partial c_2/ \partial x_2 \\ \partial c_3/ \partial x_1 &  \partial c_3/ \partial x_2 \\ \end{array} \right]  \]

The $ \mi {mc}$ rows of the Jacobian matrix must be in the same order as the $ \mi {mc}$ corresponding names of nonlinear constraints listed in the NLINCON statement. The $ n$ columns of the Jacobian matrix must be in the same order as the $ n$ corresponding parameter names listed in the DECVAR statement. To specify the values of nonzero derivatives, the variables specified in the JACNLC statement must be defined on the left-hand side of algebraic expressions in programming statements.

For example,

   array cd[3,4] cd1-cd12;
   nlincon c1-c3 >= 0;
   jacnlc cd1-cd12;

   c1 = 8 - x1 * x1 - x2 * x2 - x3 * x3 - x4 * x4 -
          x1 + x2 - x3 + x4;
   c2 = 10 - x1 * x1 - 2 * x2 * x2 - x3 * x3 - 2 * x4 * x4 +
          x1 + x4;
   c3 = 5 - 2 * x1 * x2 - x2 * x2 - x3 * x3 - 2 * x1 + x2 + x4;

   cd[1,1]= -1 - 2 * x1;   cd[1,2]= 1 - 2 * x2;
   cd[1,3]= -1 - 2 * x3;   cd[1,4]= 1 - 2 * x4;
   cd[2,1]=  1 - 2 * x1;   cd[2,2]= -4 * x2;
   cd[2,3]= -2 * x3;       cd[2,4]= 1 - 4 * x4;
   cd[3,1]= -2 - 4 * x1;   cd[3,2]= 1 - 2 * x2;
   cd[3,3]= -2 * x3;       cd[3,4]= 1;