ida_with_initial_sensitivity.py

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

This example show how to use Assimulo and IDA for simulating sensitivities for initial conditions.:

0 = dy1/dt - -(k01+k21+k31)*y1 - k12*y2 - k13*y3 - b1
0 = dy2/dt - k21*y1 + (k02+k12)*y2
0 = dy3/dt - k31*y1 + k13*y3

y1(0) = p1, y2(0) = p2, y3(0) = p3
p1=p2=p3 = 0 

See http://sundials.2283335.n4.nabble.com/Forward-sensitivities-for-initial-conditions-td3239724.html

on return:

  • imp_mod problem instance
  • imp_sim solver instance

Final Run Statistics: Example: Computing Sensitivities 

 Number of steps                                       : 163
 Number of function evaluations                        : 182
 Number of Jacobian evaluations                        : 31
 Number of function eval. due to Jacobian eval.        : 93
 Number of error test failures                         : 1
 Number of nonlinear iterations                        : 182
 Number of nonlinear convergence failures              : 0
 Number of sensitivity evaluations                     : 182
 Number of function eval. due to sensitivity eval.     : 1092
 Number of sensitivity nonlinear iterations            : 0
 Number of sensitivity nonlinear convergence failures  : 0
 Number of sensitivity error test failures             : 0

Sensitivity options:

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

Solver options:

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

Simulation interval    : 0.0 - 400.0 seconds.
Elapsed simulation time: 0.0358409881592 seconds.
_images/ida_with_initial_sensitivity.png

Note

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