ida_with_user_defined_handle_result.py

assimulo.examples.ida_with_user_defined_handle_result.run_example(with_plots=True)[source]

Example for demonstrating the use of a user supplied Jacobian

ODE:

\[\begin{split}\dot y_1-y_3 &= 0 \\ \dot y_2-y_4 &= 0 \\ \dot y_3+y_5 y_1 &= 0 \\ \dot y_4+y_5 y_2+9.82&= 0 \\ y_3^2+y_4^2-y_5(y_1^2+y_2^2)-9.82 y_2&= 0 \end{split}\]

on return:

  • imp_mod problem instance
  • imp_sim solver instance

Final Run Statistics: Example for plotting used order 

 Number of steps                                 : 400
 Number of function evaluations                  : 843
 Number of Jacobian evaluations                  : 19
 Number of function eval. due to Jacobian eval.  : 95
 Number of error test failures                   : 2
 Number of nonlinear iterations                  : 843
 Number of nonlinear convergence failures        : 0

Solver options:

 Solver                       : IDA (BDF)
 Maximal order                : 5
 Suppressed algebr. variables : True
 Tolerances (absolute)        : 1e-06
 Tolerances (relative)        : 1e-06

Simulation interval    : 0.0 - 5.0 seconds.
Elapsed simulation time: 0.0304620265961 seconds.
_images/ida_with_user_defined_handle_result.png

Note

Press [source] (to the top right) to view the example.