ampl_eval_spst_g_rc — evaluate the sparsity structure of the Jacobian of the constraints of a given AMPL problem
[irow, jcol] = ampl_eval_spst_g_rc(asl, x)
the point where we evaluate the gradient and the Jacobian
a structure which handles the pointer to the problem
a list of indexes corresponding to the lines of the non null elements of the Jacobian. The sparsity structure of the Jacobian is not supposed to change when x varies
a list of indexes corresponding to the columns of the non null elements of the Jacobian. The sparsity structure of the Jacobian is not supposed to change when x varies
Evaluate the sparsity structure of the Jacobian of the constraints of a given AMPL problem. Be careful, the "matrix" return corresponds to the transpose of the Jacobian. It has [nb_constr x nb_var] as dimensions.
[asl, x0, bl, bu, v, cl, cu] = ampl_init('demos/data/ASL/ch03.nl'); [irow, jcol] = ampl_eval_spst_g_rc(asl, x0); val = ampl_eval_spst_g_val(asl, x0); A = sparse([irow, jcol],[val],[length(x0),length(cl)]); // Create a real sparse matrix ampl_free(asl); // free the memory