Index: branches/2925_AutoDiffForDynamicalModels/HeuristicLab.Problems.DynamicalSystemsModelling/3.3/Problem.cs
===================================================================
--- branches/2925_AutoDiffForDynamicalModels/HeuristicLab.Problems.DynamicalSystemsModelling/3.3/Problem.cs	(revision 16226)
+++ branches/2925_AutoDiffForDynamicalModels/HeuristicLab.Problems.DynamicalSystemsModelling/3.3/Problem.cs	(revision 16245)
@@ -124,4 +124,8 @@
   }
 
+
+  // Eine weitere Möglichkeit ist spline-smoothing der Daten (über Zeit) um damit für jede Zielvariable
+  // einen bereinigten (Rauschen) Wert und die Ableitung dy/dt für alle Beobachtungen zu bekommen
+  // danach kann man die Regression direkt für dy/dt anwenden (mit bereinigten y als inputs)
   [Item("Dynamical Systems Modelling Problem", "TODO")]
   [Creatable(CreatableAttribute.Categories.GeneticProgrammingProblems, Priority = 900)]
@@ -226,4 +230,13 @@
         IntPtr y, // N_Vector
         IntPtr ydot, // N_Vector
+        IntPtr user_data
+      );
+
+    [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
+    public delegate int CVRhsFuncB(
+        double t, // realtype
+        IntPtr y, // N_Vector
+        IntPtr yB, // N_Vector
+        IntPtr yBdot, // N_Vector
         IntPtr user_data
       );
@@ -241,4 +254,33 @@
       );
 
+    [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
+    public delegate int CVDlsJacFuncB(
+      double t,
+      IntPtr y, // N_Vector
+      IntPtr yB, // N_Vector
+      IntPtr fyB, // N_Vector
+      IntPtr Jac, // SUNMatrix
+      IntPtr user_data,
+      IntPtr tmp1, // N_Vector
+      IntPtr tmp2, // N_Vector
+      IntPtr tmp3 // N_Vector
+    );
+
+    [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
+    public delegate int CVQuadRhsFn(
+      double t,
+      IntPtr y, // N_Vector
+      IntPtr yQdot, // N_Vector
+      IntPtr user_data
+      );
+
+    [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
+    public delegate int CVQuadRhsFnB(
+      double t,
+      IntPtr y, // N_Vector
+      IntPtr yB, // N_Vector
+      IntPtr qBdot, // N_Vector
+      IntPtr user_data
+      );
 
     [DllImport("sundials_cvodes.dll", EntryPoint = "CVodeCreate", ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
@@ -274,4 +316,60 @@
       IntPtr cvode_mem,
       CVDlsJacFunc jacFunc
+      );
+
+    [DllImport("sundials_cvodes.dll", EntryPoint = "CVodeQuadInit", ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
+    public static extern int CVodeQuadInit(
+      IntPtr cvode_mem,
+      CVQuadRhsFn qF,
+      IntPtr yQ0 // N_Vector, initial value of yQ
+      );
+
+    [DllImport("sundials_cvodes.dll", EntryPoint = "CVodeQuadInitB", ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
+    public static extern int CVodeQuadInitB(
+      IntPtr cvode_mem,
+      int indexB,
+      CVQuadRhsFnB rhsQB,
+      IntPtr yQB0 // N_Vector, initial value of yQB
+    );
+
+
+    [DllImport("sundials_cvodes.dll", EntryPoint = "CVodeAdjInit", ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
+    public static extern int CVodeAdjInit(
+      IntPtr cvode_mem,
+      int nd,  // integration steps between checkpoints
+      int interpType // either CV_POLYNOMIAL or CV_HERMITE
+      );
+
+    [DllImport("sundials_cvodes.dll", EntryPoint = "CVodeF", ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
+    public static extern int CVodeF(
+        IntPtr cvode_mem,
+        double t_out, // the next time at which a computed solution is desired
+        IntPtr y, // N_Vector, the solution vector y
+        ref double t_ret, // the time reached by the solver (output)
+        int itask, // CV_NORMAL or CV_ONE_STEP
+        ref int ncheck  // the number of internal checkpoints stored so far.
+      );
+
+    [DllImport("sundials_cvodes.dll", EntryPoint = "CVodeGetNumSteps", ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
+    public static extern int CVodeGetNumSteps(
+      IntPtr cvode_mem,
+      ref long ncheck  // the number of steps taken
+    );
+
+    [DllImport("sundials_cvodes.dll", EntryPoint = "CVodeCreateB", ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
+    public static extern int CVodeCreateB(
+        IntPtr cvode_mem,
+        MultistepMethod lmmB,
+        NonlinearSolverIteration iterB,
+        ref int which
+      );
+
+    [DllImport("sundials_cvodes.dll", EntryPoint = "CVodeInitB", ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
+    public static extern int CVodeInitB(
+        IntPtr cvode_mem,
+        int which,
+        CVRhsFuncB rightHandSide,
+        double tB0, // endpoint T where final conditions are provided (equal to endpoint of forward integration)
+        IntPtr yB0 // N_Vector inital value at t=tb0 of backward solution
       );
 
@@ -285,4 +383,63 @@
       );
 
+
+    [DllImport("sundials_cvodes.dll", EntryPoint = "CVodeSStolerancesB", ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
+    public static extern int CVodeSStolerancesB(
+      IntPtr cvode_mem,
+      int which,
+      double reltol,
+      double abstol
+    );
+
+    [DllImport("sundials_cvodes.dll", EntryPoint = "CVDlsSetLinearSolverB", ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
+    public static extern int CVDlsSetLinearSolverB(
+      IntPtr cvode_mem,
+      int which,
+      IntPtr linearSolver, // SUNLinearSolver
+      IntPtr j // SUNMatrix
+    );
+
+    [DllImport("sundials_cvodes.dll", EntryPoint = "CVDlsSetJacFnB", ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
+    public static extern int CVDlsSetJacFnB(
+      IntPtr cvode_mem,
+      int which,
+      CVDlsJacFuncB jacFunc
+    );
+
+    [DllImport("sundials_cvodes.dll", EntryPoint = "CVodeB", ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
+    public static extern int CVodeB(
+      IntPtr cvode_mem,
+      double tout, // next time at which a solution is desired
+      int itask // flag indicating the job of the solver for the next step. 
+    );
+
+    [DllImport("sundials_cvodes.dll", EntryPoint = "CVodeGetB", ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
+    public static extern int CVodeGetB(
+          IntPtr cvode_mem,
+          int which,
+          ref double tret,
+          IntPtr yB // the backward solution at time tret
+        );
+    [DllImport("sundials_cvodes.dll", EntryPoint = "CVodeGetAdjY", ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
+    public static extern int CVodeGetAdjY(
+          IntPtr cvode_mem,
+          double t,
+          IntPtr y // the forward solution y(t)
+        );
+
+    [DllImport("sundials_cvodes.dll", EntryPoint = "CVodeGetAdjCVodeBmem", ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
+    public static extern IntPtr CVodeGetAdjCVodeBmem(
+              IntPtr cvode_mem,
+              int which
+            );
+
+    [DllImport("sundials_cvodes.dll", EntryPoint = "CVodeGetQuadB", ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
+    public static extern int CVodeGetQuadB(
+        IntPtr cvode_mem,
+        int which,
+        ref double tret,
+        IntPtr yQB // N_Vector
+      );
+
     [DllImport("sundials_cvodes.dll", EntryPoint = "CVodeFree", ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
 
@@ -357,4 +514,7 @@
     public unsafe static extern double* N_VGetArrayPointer_Serial(IntPtr vec);
 
+    [DllImport("sundials_cvodes.dll", EntryPoint = "N_VCloneVectorArray_Serial", ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
+    public static extern IntPtr N_VCloneVectorArray_Serial(int count, IntPtr vec);
+
     /*
 #define NV_CONTENT_S(v)  ( (N_VectorContent_Serial)(v->content) )
@@ -368,5 +528,5 @@
 #define NV_Ith_S(v,i)    ( NV_DATA_S(v)[i] )
 */
-// methods for macros
+    // methods for macros
     public unsafe static int* NV_CONTENT_S(IntPtr v) {
       int* content = (int*)*(int*)v.ToPointer();
