<div dir="ltr">Hi,<div style>I am using ADOL-C with IPOPT on one of my physically based animation projects where I have an objective function and physically based constraints. I am using the sparse version of ADOL-C 64 bit, and IPOPT 64bit on Windows.</div>
<div style>Things run okay, till I add a conditional branch in my eval_constraints.</div><div style><br></div><div style>I definitely need an &quot;if statement&quot; in my constraints, and the condition is evaluated based on the values of x. </div>
<div style><br></div><div style>I get the following warning in the terminal before the program crashes</div><div style><br></div><div style><div><font color="#ff0000"><b>ADOL-C Warning: Branch switch detected in com</b></font></div>
<div><font color="#ff0000"><b>Forward sweep aborted! Retaping recommended!</b></font></div></div><div style><br></div><div style><br></div><div style>And my block of problematic code (in eval_constraints) looks like this - </div>
<div style><br></div><div style><br></div><div style><div>if( x[i] &lt;= 0.0) // it errors out as soon as I add any condition</div><div>{</div><div><span class="" style="white-space:pre">        </span>fext(i) = 10; </div><div><span class="" style="white-space:pre">        </span>//fext(i) += kContact* x[i];  </div>
<div>}</div><div><br></div><div><br></div><div><br></div><div style>Does this mean that we cant have conditonal branching in eval_constraints or eval_objectives? <br>Am I doing something wrong? <br></div><div style><br></div>
<div style>Thanks</div><div style>Vimanyu</div><div style><br></div><div><br></div></div></div>