I'm integrating the following differential equation
with this code using JiTCDDE:
def model(p, q, r, alpha, T, tau, tmax, ci, step):
f = [(p*y(0)+alpha*y(1, t-tau)), (r*y(0)+q*y(1))]
DDE = jitcdde(f)
DDE.constant_past(ci)
DDE.adjust_diff()
data = []
for time in np.arange(DDE.t, DDE.t+tmax, step):
data.append( DDE.integrate(time)[1])
return data
and with this parameters
T=3 #escala temporal
p=-2.4/T
q=-1.12/T
r=1.5/T
alpha=.4/T
tau=T*2.4 #delay
tmax=30
step = 1
ci = np.array([1300, 0])
My trouble is that when I plot the data obtained by
data = model(p, q, r, alpha, T, tau, tmax, ci, step)
I get a very not smooth profile at the maximum like this:
and when I change the integration step to 0.1 I get this
but that plot goes to 300 instead of 30 which is what I would like
the question is: is there any way to integrate the equation up to t=30 but smoothed like the one that goes to t=300 ? Can I do that by onlye changing the parameters ??