Changeset 16245 for branches/2925_AutoDiffForDynamicalModels/HeuristicLab.Problems.DynamicalSystemsModelling/3.3/Problem.cs
- Timestamp:
- 10/19/18 14:22:01 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2925_AutoDiffForDynamicalModels/HeuristicLab.Problems.DynamicalSystemsModelling/3.3/Problem.cs
r16226 r16245 124 124 } 125 125 126 127 // Eine weitere Möglichkeit ist spline-smoothing der Daten (über Zeit) um damit für jede Zielvariable 128 // einen bereinigten (Rauschen) Wert und die Ableitung dy/dt für alle Beobachtungen zu bekommen 129 // danach kann man die Regression direkt für dy/dt anwenden (mit bereinigten y als inputs) 126 130 [Item("Dynamical Systems Modelling Problem", "TODO")] 127 131 [Creatable(CreatableAttribute.Categories.GeneticProgrammingProblems, Priority = 900)] … … 226 230 IntPtr y, // N_Vector 227 231 IntPtr ydot, // N_Vector 232 IntPtr user_data 233 ); 234 235 [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 236 public delegate int CVRhsFuncB( 237 double t, // realtype 238 IntPtr y, // N_Vector 239 IntPtr yB, // N_Vector 240 IntPtr yBdot, // N_Vector 228 241 IntPtr user_data 229 242 ); … … 241 254 ); 242 255 256 [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 257 public delegate int CVDlsJacFuncB( 258 double t, 259 IntPtr y, // N_Vector 260 IntPtr yB, // N_Vector 261 IntPtr fyB, // N_Vector 262 IntPtr Jac, // SUNMatrix 263 IntPtr user_data, 264 IntPtr tmp1, // N_Vector 265 IntPtr tmp2, // N_Vector 266 IntPtr tmp3 // N_Vector 267 ); 268 269 [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 270 public delegate int CVQuadRhsFn( 271 double t, 272 IntPtr y, // N_Vector 273 IntPtr yQdot, // N_Vector 274 IntPtr user_data 275 ); 276 277 [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 278 public delegate int CVQuadRhsFnB( 279 double t, 280 IntPtr y, // N_Vector 281 IntPtr yB, // N_Vector 282 IntPtr qBdot, // N_Vector 283 IntPtr user_data 284 ); 243 285 244 286 [DllImport("sundials_cvodes.dll", EntryPoint = "CVodeCreate", ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)] … … 274 316 IntPtr cvode_mem, 275 317 CVDlsJacFunc jacFunc 318 ); 319 320 [DllImport("sundials_cvodes.dll", EntryPoint = "CVodeQuadInit", ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)] 321 public static extern int CVodeQuadInit( 322 IntPtr cvode_mem, 323 CVQuadRhsFn qF, 324 IntPtr yQ0 // N_Vector, initial value of yQ 325 ); 326 327 [DllImport("sundials_cvodes.dll", EntryPoint = "CVodeQuadInitB", ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)] 328 public static extern int CVodeQuadInitB( 329 IntPtr cvode_mem, 330 int indexB, 331 CVQuadRhsFnB rhsQB, 332 IntPtr yQB0 // N_Vector, initial value of yQB 333 ); 334 335 336 [DllImport("sundials_cvodes.dll", EntryPoint = "CVodeAdjInit", ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)] 337 public static extern int CVodeAdjInit( 338 IntPtr cvode_mem, 339 int nd, // integration steps between checkpoints 340 int interpType // either CV_POLYNOMIAL or CV_HERMITE 341 ); 342 343 [DllImport("sundials_cvodes.dll", EntryPoint = "CVodeF", ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)] 344 public static extern int CVodeF( 345 IntPtr cvode_mem, 346 double t_out, // the next time at which a computed solution is desired 347 IntPtr y, // N_Vector, the solution vector y 348 ref double t_ret, // the time reached by the solver (output) 349 int itask, // CV_NORMAL or CV_ONE_STEP 350 ref int ncheck // the number of internal checkpoints stored so far. 351 ); 352 353 [DllImport("sundials_cvodes.dll", EntryPoint = "CVodeGetNumSteps", ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)] 354 public static extern int CVodeGetNumSteps( 355 IntPtr cvode_mem, 356 ref long ncheck // the number of steps taken 357 ); 358 359 [DllImport("sundials_cvodes.dll", EntryPoint = "CVodeCreateB", ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)] 360 public static extern int CVodeCreateB( 361 IntPtr cvode_mem, 362 MultistepMethod lmmB, 363 NonlinearSolverIteration iterB, 364 ref int which 365 ); 366 367 [DllImport("sundials_cvodes.dll", EntryPoint = "CVodeInitB", ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)] 368 public static extern int CVodeInitB( 369 IntPtr cvode_mem, 370 int which, 371 CVRhsFuncB rightHandSide, 372 double tB0, // endpoint T where final conditions are provided (equal to endpoint of forward integration) 373 IntPtr yB0 // N_Vector inital value at t=tb0 of backward solution 276 374 ); 277 375 … … 285 383 ); 286 384 385 386 [DllImport("sundials_cvodes.dll", EntryPoint = "CVodeSStolerancesB", ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)] 387 public static extern int CVodeSStolerancesB( 388 IntPtr cvode_mem, 389 int which, 390 double reltol, 391 double abstol 392 ); 393 394 [DllImport("sundials_cvodes.dll", EntryPoint = "CVDlsSetLinearSolverB", ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)] 395 public static extern int CVDlsSetLinearSolverB( 396 IntPtr cvode_mem, 397 int which, 398 IntPtr linearSolver, // SUNLinearSolver 399 IntPtr j // SUNMatrix 400 ); 401 402 [DllImport("sundials_cvodes.dll", EntryPoint = "CVDlsSetJacFnB", ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)] 403 public static extern int CVDlsSetJacFnB( 404 IntPtr cvode_mem, 405 int which, 406 CVDlsJacFuncB jacFunc 407 ); 408 409 [DllImport("sundials_cvodes.dll", EntryPoint = "CVodeB", ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)] 410 public static extern int CVodeB( 411 IntPtr cvode_mem, 412 double tout, // next time at which a solution is desired 413 int itask // flag indicating the job of the solver for the next step. 414 ); 415 416 [DllImport("sundials_cvodes.dll", EntryPoint = "CVodeGetB", ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)] 417 public static extern int CVodeGetB( 418 IntPtr cvode_mem, 419 int which, 420 ref double tret, 421 IntPtr yB // the backward solution at time tret 422 ); 423 [DllImport("sundials_cvodes.dll", EntryPoint = "CVodeGetAdjY", ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)] 424 public static extern int CVodeGetAdjY( 425 IntPtr cvode_mem, 426 double t, 427 IntPtr y // the forward solution y(t) 428 ); 429 430 [DllImport("sundials_cvodes.dll", EntryPoint = "CVodeGetAdjCVodeBmem", ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)] 431 public static extern IntPtr CVodeGetAdjCVodeBmem( 432 IntPtr cvode_mem, 433 int which 434 ); 435 436 [DllImport("sundials_cvodes.dll", EntryPoint = "CVodeGetQuadB", ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)] 437 public static extern int CVodeGetQuadB( 438 IntPtr cvode_mem, 439 int which, 440 ref double tret, 441 IntPtr yQB // N_Vector 442 ); 443 287 444 [DllImport("sundials_cvodes.dll", EntryPoint = "CVodeFree", ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)] 288 445 … … 357 514 public unsafe static extern double* N_VGetArrayPointer_Serial(IntPtr vec); 358 515 516 [DllImport("sundials_cvodes.dll", EntryPoint = "N_VCloneVectorArray_Serial", ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)] 517 public static extern IntPtr N_VCloneVectorArray_Serial(int count, IntPtr vec); 518 359 519 /* 360 520 #define NV_CONTENT_S(v) ( (N_VectorContent_Serial)(v->content) ) … … 368 528 #define NV_Ith_S(v,i) ( NV_DATA_S(v)[i] ) 369 529 */ 370 // methods for macros530 // methods for macros 371 531 public unsafe static int* NV_CONTENT_S(IntPtr v) { 372 532 int* content = (int*)*(int*)v.ToPointer();
Note: See TracChangeset
for help on using the changeset viewer.