ida_with_disc.py

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

Example of the use of IDA for an implicit differential equation with a discontinuity (state event) and the need for an event iteration.

on return:

  • imp_mod problem instance
  • imp_sim solver instance

No initialization defined for the problem.
A discontinuity occured at t = 1.000000e+00.
Current switches: [False, True, True]
Event info: [[0, 0, -1], False]
Final Run Statistics: ODE with discontinuities and a function with consistency problem 

 Number of steps                                 : 22
 Number of function evaluations                  : 22
 Number of Jacobian evaluations                  : 20
 Number of function eval. due to Jacobian eval.  : 60
 Number of error test failures                   : 0
 Number of nonlinear iterations                  : 22
 Number of nonlinear convergence failures        : 0
 Number of state function evaluations            : 24
 Number of state events                          : 1

Solver options:

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

No finalization defined for the problem.
Final Run Statistics: ODE with discontinuities and a function with consistency problem 

 Number of steps                                 : 46
 Number of function evaluations                  : 46
 Number of Jacobian evaluations                  : 42
 Number of function eval. due to Jacobian eval.  : 126
 Number of error test failures                   : 0
 Number of nonlinear iterations                  : 46
 Number of nonlinear convergence failures        : 0
 Number of state function evaluations            : 50
 Number of state events                          : 1

Solver options:

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

Simulation interval    : 0.0 - 10.0 seconds.
Elapsed simulation time: 0.0165538787842 seconds.
_images/ida_with_disc.png

Note

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