[CppAD] Bug in Optimize function

Dominik Skanda Dominik.Skanda at biologie.uni-freiburg.de
Thu Nov 12 10:16:59 EST 2009


Thanks a lot,
it is working now!

kind regards,
Dominik


Am Donnerstag, den 12.11.2009, 06:12 -0800 schrieb bradbell at seanet.com:
> Thank you for the bug report. It has been fixed by the changes is
>     https://projects.coin-or.org/CppAD/changeset/1580
> (Part of the optimize testing was commented out by mistake. This was fixed
> in change set 1581.)
> 
> The fix is immediately available using subversion to download the CppAD
> source.
>     http://www.coin-or.org/CppAD/Doc/subversion.xml
> 
> If you use the tarballs at
>     http://www.coin-or.org/download/source/CppAD/
> you will have to wait for version 20091113 for higher.
> 
> 
> 
> 
> > Hello all,
> > I have found a bug in the optimize() function.
> >
> >
> > Following code doesn't work:
> >
> >
> > #include <iostream>
> > #include "BDF_integrator.hpp"
> > #include "cppad/cppad.hpp"
> >
> >
> > using namespace std;
> >
> >
> > int main()
> > 	{
> > 		unsigned int i,j;
> > 		vector< CppAD::AD<double> >    x(3);
> > 		vector< CppAD::AD<double> > xdot(3);
> >
> > 		x[ 0]= 1;
> > 		x[ 1]= 2;
> > 		x[ 2]= 3;
> >
> >
> > 		CppAD::Independent(x);
> >
> > 		vector< CppAD::AD<double> > A(1);
> >
> >
> > 		A[0]=CppAD::pow(x[0],3.3);
> >
> > 		for (i=0;i<3;i++)
> > 			xdot[i]=A[0]+x[i];
> >
> > 	    	CppAD::ADFun<double> RHS;
> > 		RHS.Dependent(x, xdot);
> > 		//RHS.optimize();
> >
> > 		return 0;
> > 	}
> >
> >
> >
> > This is cause in the CppAD::pow function the exponent is double and not
> > a integer!!!!
> >
> > Please HELP
> >
> >
> > Kind regards,
> > Dominik
> >
> > _______________________________________________
> > CppAD mailing list
> > CppAD at list.coin-or.org
> > http://list.coin-or.org/mailman/listinfo/cppad
> >
> 
> 




More information about the CppAD mailing list