00001 void myAcadoDifferentialEquation( double *xx, double *f, void *user_data ){ 00002 00003 // x[0] -> time t 00004 // x[1] -> v 00005 // x[2] -> s 00006 // x[3] -> m 00007 // x[4] -> L 00008 // x[5] -> u 00009 00010 double t = xx[0]; 00011 double x = xx[1]; 00012 double l = xx[2]; 00013 double z = xx[3]; 00014 double u = xx[4]; 00015 00016 00017 00018 f[0] = -x + 0.5*x*x + u + 0.5*z; 00019 f[1] = x*x + 3.0*u*u ; 00020 f[2] = z + exp(z) - 1.0 + x ; 00021 00022 00023 00024 }