When I run your code, it works:
julia> using DifferentialEquations
function bc_model(du,u,h,p,t)
p0,q0,v0,d0,p1,q1,v1,d1,d2,beta0,beta1,tau = p
hist3 = h(p, t-tau)[3]
du[1] = (v0/(1+beta0*(hist3^2))) * (p0 - q0)*u[1] - d0*u[1]
du[2] = (v0/(1+beta0*(hist3^2))) * (1 - p0 + q0)*u[1] +
(v1/(1+beta1*(hist3^2))) * (p1 - q1)*u[2] - d1*u[2]
du[3] = (v1/(1+beta1*(hist3^2))) * (1 - p1 + q1)*u[2] - d2*u[3]
end
h(p, t) = ones(3)
tau = 1
lags = [tau]
p0 = 0.2; q0 = 0.3; v0 = 1; d0 = 5
p1 = 0.2; q1 = 0.3; v1 = 1; d1 = 1
d2 = 1; beta0 = 1; beta1 = 1
p = (p0,q0,v0,d0,p1,q1,v1,d1,d2,beta0,beta1,tau)
tspan = (0.0,10.0)
u0 = [1.0,1.0,1.0]
prob = DDEProblem(bc_model,u0,h,tspan,p; constant_lags=lags)
alg = MethodOfSteps(Tsit5())
sol = solve(prob,alg)
retcode: Success
Interpolation: specialized 4th order "free" interpolation
t: 40-element Vector{Float64}:
0.0
0.05836370738671701
0.12916108569539597
0.21568702493539388
0.31476012203954973
0.42647876001237145
0.5486009950019299
0.6801498148290146
0.8195261166349427
0.9657507075079192
1.0
1.103945249125462
1.1889713924683045
1.3068791130791304
1.4265100474451162
⋮
4.0
4.4496182069424535
4.954793370438921
5.0
5.294570151715627
5.637340314503988
6.0
6.465321265034228
6.9807287937908855
7.578753298968584
8.241987232937237
8.98383276855844
9.794183131169206
10.0
u: 40-element Vector{Vector{Float64}}:
[1.0, 1.0, 1.0]
[0.7447276972023367, 0.9674847415959038, 0.9739922644849844]
[0.520865690149123, 0.9216176741982295, 0.9429345997713768]
[0.33647961749786465, 0.860710765286255, 0.9053954304799672]
[0.20402080446565815, 0.7893156306081849, 0.8627636946755286]
[0.11605349292143427, 0.710940127223295, 0.8151154583589272]
[0.06263661020799872, 0.6308046470869514, 0.7637408792490028]
[0.03223510074296827, 0.5524928215361826, 0.7096033440842167]
[0.01594663432245627, 0.47891242866857714, 0.654067407727854]
[0.007620742290428411, 0.41158157168839415, 0.5982822197402151]
[0.0064103562958189595, 0.39717276688745007, 0.5856252064346273]
[0.0037919268480705306, 0.35633736118381737, 0.5487073922673725]
[0.0024675106956094984, 0.32595725300932393, 0.5202749814350449]
[0.0013594954886150064, 0.2879318058947559, 0.4832823717500593]
[0.000742273383034329, 0.2537554121549729, 0.44842619881041823]
⋮
[1.8604899421169303e-9, 0.015580097871373575, 0.07582169081549973]
[2.945240907209338e-10, 0.009509072612829088, 0.053084099435442685]
[5.916357176748074e-11, 0.005457695747422803, 0.03511215171816447]
[4.698267809934584e-11, 0.0051930757438740345, 0.03381747966733331]
[1.0618951337118308e-11, 0.003756298740343366, 0.026418510589087903]
[1.9479598719208864e-12, 0.0025766300373552546, 0.0197374598472333]
[3.3296189152665293e-13, 0.001729122637428431, 0.014435113877197158]
[5.5064416255269584e-14, 0.0010364504244003874, 0.009606890211128613]
[1.1838460929002524e-14, 0.0005879461631044232, 0.006079732552649997]
[5.109127121132652e-15, 0.0003045520635702376, 0.003549648850830764]
[4.075064652637717e-15, 0.0001468398691910801, 0.0019394744851741882]
[6.623872359855281e-15, 6.493848650511485e-5, 0.0009786579729539678]
[1.912280041308691e-14, 2.6637039533047875e-5, 0.0004599558275824244]
[6.69983491663282e-15, 2.1240382256782126e-5, 0.0003792544387315653]
What version of DifferentialEquations are you using (see ] st
)?