<HTML><BODY>
Hello,<div><br></div><div>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.</div><div>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.</div><div>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 ?</div><div><br></div><div>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.</div><div>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?</div><div><br></div><div><br></div><div>Thanks you very much for your help!</div></BODY></HTML>