Solve ODE in Python with a time-delay
Can anybody give me some advice how to solve an ODE in Python that has a time-delay implemented in it? I can't seem to figure out how to do it using scipy.integrate.odeint. What I am looking for should look like: # the constants in the equation b = 1/50 d = 1/75 a = 0.8 G = 10 ** (-2) tau = 0.5 u = [b, d, tau, a, G] # enter initial conditions N0 = 0.1 No0 = 10 w = [N0, No0] def logistic(w, t, u): N, No = w b, d, tau, a, G = u dNdt = b * (No(t) - N(t) ) * (N(t) / No(t) ) - d * N(t - tau) dNodt = G * (a * No(t) - N(t) ) * (N(t) / No(t) ) return [dNdt, dNodt] # create timescale # create timescale