<div dir="ltr">I figured what was wrong, I was assigning iRow and jCol from a different array and making a shallow copy. Sorry for the inconvenience.<div><br></div><div>Miguel</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jan 8, 2015 at 2:50 PM, Miguel Angel Salazar de Troya <span dir="ltr">&lt;<a href="mailto:salazardetroya@gmail.com" target="_blank">salazardetroya@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi<div><br></div><div>In the derivatives test provided by Ipopt, my inequalities derivatives failed. The derivatives that I provided are wrong, but they are wrong when they are displayed in the derivative test. Inside of eval_jac_g() they match with the finite difference, therefore, the problem must be in the way these are passed to IpOpt.</div><div><br></div><div>I have 90 variables and just one constraint whose derivative is a constant for all the variables. The iRow and jCol structures are therefore as follows:</div><div>iRow[0] = iRow[1] = ... iRow[89] = 0</div><div><br></div><div>jCol[0] = 0;</div><div>jCol[1] = 1;</div><div>...</div><div>jCol[89] = 89;</div><div><br></div><div>I fill the array values with the corresponding constant &quot;C&quot;</div><div>value[0] = value[1] = ... value[89] =  C</div><div><br></div><div>I print this array to verify everything is correct. These values are not the same than in the derivative test. Interestingly, only the first variable of the derivative has a non-zero value and it&#39;s the only one with the <span style="color:rgb(0,0,0);font-family:&#39;Times New Roman&#39;;font-size:medium">``</span><tt style="color:rgb(0,0,0)">v</tt><span style="color:rgb(0,0,0);font-family:&#39;Times New Roman&#39;;font-size:medium">&#39;&#39;  </span>next to it. I must be forgetting something pretty basic, but I&#39;m not able to find it. I would appreciate any type of help. Please let me know if I should provide more details.</div><div><br></div><div>Just to double check: In the derivatives test, the first column corresponds to the user derivatives and the second column to the finite difference test, right?<br clear="all"><div><br></div><div>Thanks in advance</div><span class="HOEnZb"><font color="#888888"><div>Miguel</div>-- <br><div><div dir="ltr"><font face="verdana, sans-serif"><b>Miguel Angel Salazar de Troya</b></font><span><font color="#888888"><br><font face="arial,helvetica,sans-serif">Graduate Research Assistant<br>Department of Mechanical Science and Engineering<br></font>University of Illinois at Urbana-Champaign<br>(217) 550-2360<br>
<a href="mailto:salaza11@illinois.edu" target="_blank">salaza11@illinois.edu</a></font></span><div><br></div></div></div>
</font></span></div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><font face="verdana, sans-serif"><b>Miguel Angel Salazar de Troya</b></font><span><font color="#888888"><br><font face="arial,helvetica,sans-serif">Graduate Research Assistant<br>Department of Mechanical Science and Engineering<br></font>University of Illinois at Urbana-Champaign<br>(217) 550-2360<br>
<a href="mailto:salaza11@illinois.edu" target="_blank">salaza11@illinois.edu</a></font></span><div><br></div></div></div>
</div>