Skip to content

Commit 13955a8

Browse files
fix for DDEProblem
1 parent b1cc279 commit 13955a8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/dde_tests.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ h = (t) -> [0.5, 0.5]
88
u0 = [0.5, 0.5]
99
tspan = (0., 10.)
1010

11-
prob = ConstantLagDDEProblem((t,u,h,du)->f_lotka(t,u,h,[0.5, 1.],du),h,u0,[0.5], tspan)
11+
prob = DDEProblem((t,u,h,du)->f_lotka(t,u,h,[0.5, 1.],du),h,u0,tspan,[0.5])
1212
sol = solve(prob, MethodOfSteps(Tsit5()))
1313

1414
t = collect(linspace(0,10,30))
@@ -17,7 +17,7 @@ data = convert(Array, randomized)
1717

1818
using DiffEqParamEstim, NLopt
1919

20-
prob_opt = ConstantLagDDEProblem((t,u,h,p,du)->f_lotka(t,u,h,[p[1],1.],du), h, u0, [0.5], tspan)
20+
prob_opt = DDEProblem((t,u,h,p,du)->f_lotka(t,u,h,[p[1],1.],du), h, u0, tspan,[0.5])
2121
cost_function = build_loss_objective(prob_opt, MethodOfSteps(Tsit5()),L2Loss(t,data),maxiter=10000,abstol=1e-8,reltol=1e-8)
2222

2323
opt = Opt(:GN_ESCH, 1)

0 commit comments

Comments
 (0)