[ADOL-C] Conditional branch in eval_constraints - Runtime error (IPOPT with ADOL-C)

Vimanyu Jain vimanyu87 at gmail.com
Sat Apr 27 23:02:33 EDT 2013


Hi,
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.
Things run okay, till I add a conditional branch in my eval_constraints.

I definitely need an "if statement" in my constraints, and the condition is
evaluated based on the values of x.

I get the following warning in the terminal before the program crashes

*ADOL-C Warning: Branch switch detected in com*
*Forward sweep aborted! Retaping recommended!*


And my block of problematic code (in eval_constraints) looks like this -


if( x[i] <= 0.0) // it errors out as soon as I add any condition
{
fext(i) = 10;
//fext(i) += kContact* x[i];
}



Does this mean that we cant have conditonal branching in eval_constraints
or eval_objectives?
Am I doing something wrong?

Thanks
Vimanyu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/adol-c/attachments/20130427/96208dd4/attachment.html>


More information about the ADOL-C mailing list