# ida_with_parameters.py¶

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

This is the same example from the Sundials package (cvsRoberts_FSA_dns.c) Its purpose is to demonstrate the use of parameters in the differential equation.

This simple example problem for IDA, due to Robertson see http://www.dm.uniba.it/~testset/problems/rober.php, is from chemical kinetics, and consists of the system:

$\begin{split}\dot y_1 -( -p_1 y_1 + p_2 y_2 y_3)&=0 \\ \dot y_2 -(p_1 y_1 - p_2 y_2 y_3 - p_3 y_2^2)&=0 \\ \dot y_3 -( p_3 y_ 2^2)&=0 \end{split}$

on return:

• imp_mod problem instance
• imp_sim solver instance

Final Run Statistics: ---

Number of steps                                       : 407
Number of function evaluations                        : 464
Number of Jacobian evaluations                        : 40
Number of function eval. due to Jacobian eval.        : 120
Number of error test failures                         : 0
Number of nonlinear iterations                        : 464
Number of nonlinear convergence failures              : 0
Number of sensitivity evaluations                     : 495
Number of function eval. due to sensitivity eval.     : 2970
Number of sensitivity nonlinear iterations            : 495
Number of sensitivity nonlinear convergence failures  : 0
Number of sensitivity error test failures             : 0

Sensitivity options:

Method                       : STAGGERED
Difference quotient type     : CENTERED
Suppress Sens                : False

Solver options:

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

Simulation interval    : 0.0 - 4.0 seconds.
Elapsed simulation time: 0.0951960086823 seconds.
(array([ -1.87608109e+00,   1.79218179e-04,   1.87590187e+00]), array([  2.96138113e-06,  -5.83045475e-10,  -2.96079809e-06]), array([ -1.87608109e+00,   1.79218179e-04,   1.87590187e+00]))


Note

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