The NLP Procedure

JACNLC Statement

JACNLC variables ;

The JACNLC statement defines the Jacobian matrix for the system of constraint functions  c_1(x), ... ,c_{mc}(x). The statements list the  {mc} x n variable names which correspond to the elements  cj_{i,j},  i=1, ... ,{mc}; \: j=1, ... ,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 = [ cj1 & cj2 \    cj3 & cj4 \    cj5 & cj6 \    ]    = [ \partial c_1/ \partial ...   ... \partial x_2 \    \partial c_3/ \partial x_1 & \partial c_3/ \partial x_2 \    ]
The  {mc} rows of the Jacobian matrix must be in the same order as the  {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;
 

Previous Page | Next Page | Top of Page