biocircuits.ddeint

biocircuits.ddeint(func, y0, t, tau, args=(), y0_args=(), n_time_points_per_step=None)
Integrate a system of delay differential equations defined by

y’ = f(t, y, y(t-tau1), y(t-tau2), …)

using the method of steps. All tau’s are assumed constant.

Parameters
  • func (function, call signature func(y, t, y_past, *args)) –

    Function specifying the right hand side of the system of DDEs. Assuming we have a system of n DDEs, its arguments are: y : Numpy array, shape (n, )

    The current value of y.

    tfloat

    The current time.

    y_pastfunction, call signature y_past(t)

    Function used to compute values of y in the past. This is not specified by the user, but called as, e.g., y_past(t-tau) within func. The function is automatically generated using interpolants.

    argstuple

    Tuple of any other arguments to be passed func. Note that the values of the delays, tau, are usually included in args.

  • y0 (function, call signature y0(t, *y0_args)) – A function to compute the pre- time = t[0] values of y.

  • t (array_like) – The time points for which the solution of the DDEs is to be returned.

  • tau (float or array_like) – Set of time delays for DDEs. Only the shortest and longest are used.

  • args (tuple, default ()) – Tuple of arguments to be passed to func.

  • y0_args (tuple, default ()) – Tuple of arguments to be passed to y0.

  • n_time_points_per_step (int, default 200) – The number of time points to store the solution for each step. These points are then used to compute an interpolant.

Returns

  • y (array, shape (len(t), len(y0)))

  • Array containing the value of y for each desired time in t.

Notes