[Ipopt] question about nele_jac/nele_hess

Ivo Stefanov istefanov87 at abv.bg
Tue Feb 16 16:15:45 EST 2021


Hello, 
  I am sorry if this has been asked before (I was not able to find it). I am using IpOpt to solve a relatively simple (yet sometimes a bit large) problem and I am sometimes not able to determine in advance the exact number of non-zero variables.  I can come up with the number of all positions that may at some point be non-zero, but depending on the value of x the actual number may vary.  Because of this I was wondering what the correct implementation of
eval_jac_g and
eval_h would be in such case - is it safe to populate iRow/jCol/values only up to the current non-zero count ?  
  For example, in
get_nlp_info I provide the number of cells that can be non-zero at some point - for example, 100 000. Let's say that at the initial point they are all filled, so first iteration is fine.  Then, I get a value of x (say, second iteration) for which actually only 90 000 of those are non-zero, the others are 0 for this particular vector - should I just fill iRow/jCol/values up to index 90 000 or should I do something extra with the indices 90 0001 - 100 000 to clean up from the previous iteration?  
  
  Thanks you very much for your help! 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/ipopt/attachments/20210216/918d27bf/attachment.html>


More information about the Ipopt mailing list