[ADOL-C] What does it means "Compressed sparse structures will not be available / Only sparsity patterns can be computed" ?

Antonello Lobianco antonello at lobianco.org
Thu Aug 16 04:34:48 EDT 2012


Hello, what does this exactly means?

Build sparse drivers:          yes
Build with ColPack:            no
Compressed sparse structures will not be available
Only sparsity patterns can be computed

I'm using ADOL-C as AD tool for the IPOPT solver and having problems with
ColPack when I need to run multiple optimisation problems (in series) I
implemented an algorithm for finding sparsity structure for my specific
model, at least for the Jacobian.

Then I replaced the eval_jac_g() function in the LuksanVlcek1 or
MittelmannDistCntrlNeumA examples
(ADOL-C/examples/additional_examples/ipopt) with:

eval_jac_g(){
  if (values == NULL) {
    // return the structure of the jacobian,
    for(Index idx=0;idx<nzjelements.size();idx++){
      iRow[idx] = nzjelements[idx][0];
      jCol[idx] = nzjelements[idx][1];
    }
 }
  else {
    // return the values of the jacobian of the constraints
    jacobian(tag_g,m,n,x,Jac);
    for(Index idx=0;idx<nzjelements.size();idx++){
      values[idx] = Jac[nzjelements[idx][0]][nzjelements[idx][1]];
    }
  }
  return true;
}

where vector < vector <Index> > nzelements is the vector of non zero
elements in my model, with nzelements[i][0] the row position and
nzelements[i][1] the column one.

Is this the most efficient implementation or there could be a better way to
compute sparsity patterns?

Thank you,
      Antonello




-- 
Antonello Lobianco
INRA, Laboratoire d'Economie Forestière
14 Rue Girardet - 54000 Nancy, France
Tel: +33.652392310
Email: antonello.lobianco at nancy-engref.inra.fr
http://antonello.lobianco.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/adol-c/attachments/20120816/1f6141df/attachment.html>


More information about the ADOL-C mailing list