Name

ampl_eval_spst_w_rc — evaluate the sparsity structure of the Hessian of the constraints plus the objective function of a given AMPL problem

Calling Sequence

[irow, jcol] = ampl_eval_spst_w_rc(asl, v)

Parameters

v

the dual variables

asl

a structure which handles the pointer to the problem

irow

a list of indexes corresponding to the lines of the non null elements of the Hessian. The sparsity structure of the Hessian is not supposed to change when x varies

jcol

a list of indexes corresponding to the columns of the non null elements of the Hessian. The sparsity structure of the Hessian is not supposed to change when x varies

Description

Evaluate the sparsity structure of the Hessian of the constraints and the objective function of a given AMPL problem. The Hessian is evaluated at the last point given to ampl_evalf.

Examples

 
[asl, x0, bl, bu, v, cl, cu] = ampl_init('demos/data/ASL/ch03.nl');

[f, g] = ampl_evalf(asl,x0);

[irow, jcol] = ampl_eval_spst_w_rc(asl, v);
val          = ampl_eval_spst_w_val(asl, v);

W = sparse([irow, jcol],[val],[length(x0),length(cl)]); // Create a real sparse matrix

ampl_free(asl); // free the memory
 

See Also

ampl_init, ampl_free, ampl_evalf, ampl_evalw, ampl_get_size, ampl_get_compl, ampl_write_sol, ampl_evalw, ampl_eval_spst_w_val

Authors

Yann COLLETTE