[CppAD] How to get Jacobian & Hessian matrix in sparse form

=?gb2312?B?uaK54rOs?= superdaii at zju.edu.cn
Sat Oct 20 23:16:35 EDT 2007


Hi,
 
I am trying to use CppAD in power system optimization code, which requests
calculating sparse Jacobian & Hessian matrix. In the "Jacobian" and "Hessian"
routines of CppAD shown in the online document, the functions return the full
matrix (including the zero elements) and this makes the whole code quite
ineffective. Is there an elegant way to get a sparse Jacobian/Hessian matrix using
CppAD ? (e.g get matrix in the form of iRow[], jCol[], values[], which specify the
row/column position and values of all non-zero elements in the matrix)

p.s Though the sparse structures of Jacobians & Hessians can be deduced from
original function, or got from "ForSparseJac" & "RevSparseHes" routines in the
form of vector<bool>, if they can be figured out by CppAD in the way memtioned
above , things will be better.
 
Thanks in advance,
 
Guangchao Geng




More information about the CppAD mailing list