assimulo.examples.lsodar_with_disc.
run_example
(with_plots=True)[source]¶Example of the use of Euler’s method for a differential equation with a discontinuity (state event) and the need for an event iteration.
on return:
- exp_mod problem instance
- exp_sim solver instance
No initialization defined for the problem.
A discontinuity occured at t = 1.000000e+00.
Current switches: [False, True, True]
Event info: [array([0, 0, 1], dtype=int32), False]
Final Run Statistics: ODE with discontinuities and a function with consistency problem
Number of steps : 4
Number of function evaluations : 5
Number of Jacobian evaluations : 0
Number of state function evaluations : 14
Number of state events : 1
Solver options:
Solver : LSODAR
Absolute tolerances : [ 1.00000000e-06 1.00000000e-06 1.00000000e-06]
Relative tolerances : 1e-06
Starter : classical
No finalization defined for the problem.
Final Run Statistics: ODE with discontinuities and a function with consistency problem
Number of steps : 7
Number of function evaluations : 9
Number of Jacobian evaluations : 0
Number of state function evaluations : 108
Number of state events : 1
Solver options:
Solver : LSODAR
Absolute tolerances : [ 1.00000000e-06 1.00000000e-06 1.00000000e-06]
Relative tolerances : 1e-06
Starter : classical
Simulation interval : 0.0 - 10.0 seconds.
Elapsed simulation time: 0.00675797462463 seconds.
Note
Press [source] (to the top right) to view the example.