I was facing a problem regarding delay. For low delay e.g. tau = 0.101 the code was fine as tau increases slightly as tau = 0.104 or more it shows some error not exactly error but warning and shows no promising result. While in Matlab those were fine there were no problem even for higher delay upto tau = 0.15! Why this is happening and how to overcome it!
Hello and welcome to the community! Your question needs a better title and tags for the right people to find it and help you. What packages do you need help with? Is it a question about modeling and simulation etc?
I can’t try it right now, but while you wait for an expert maybe try a stiff solver. Rosenbrock23 or Rodas5 for a start. What solver were you using in matlab?
But for Julia it shows some warning like:
Warning: Interrupted. Larger maxiters is needed.
while it shows almost similar result for tau = 0.102918!! see the figure
So the value of the delay is inconsistent for different coding language!! But it should not be happened right?
I would also like to share one thing that the system is unbounded regarding high delay. For example for the maximum time point 20, in MATLAB if tau crosses 0.10519 i.e., if tau = 0.105195 it shows the solution beyond the integration level. But in case of Julia same thing happens for lower delay. From which it is sure that the system is unbounded regarding high delay.
How are the history and initial conditions set in Matlab? Is Exphst the history? How do you set the initial conditions? If you set h(p, t) = [1.0,0.9,1.0] instead of h(p, t) = ones(3) (i.e., make initial conditions and history the same) what happens?
Exphst is the history and initial conditions (considered same in MATLAB).
Following @ANasc, initial conditions and history were set same in fact I omitted u0 and set h(p, t) = [1.0 0.9 1.0] and found the result was fine at tau = 0.105 (improved!). Then I set h(p, t) = [1.0 0.1 1.0], surprisingly the result turns even better at high value of tau (=0.14)!! But in this case I found another issue, if time is set tspan = (0,230) then it is fine, once it set as tspan=(0,240) an warning appear as