@@ -47,7 +47,7 @@ function f_1delay(::Type{Val{:analytic}}, u₀, p, t)
47
47
end
48
48
49
49
build_prob_dde_1delay (u₀, :: T = u₀) where {T} =
50
- DDEProblem (f_1delay, t-> [zero (u₀)], [u₀], (zero (T), T (10 )), [oneunit (T)])
50
+ DDEProblem (f_1delay, t-> [zero (u₀)], [u₀], (zero (T), T (10 )), nothing , [oneunit (T)])
51
51
52
52
"""
53
53
prob_dde_1delay
@@ -81,12 +81,12 @@ function f_1delay_notinplace(u, h, p, t)
81
81
- h (t - oneunit (t)) ./ oneunit (t)
82
82
end
83
83
84
- f_1delay_notinplace (:: Type{Val{:analytic}} , t, u0 ) = f_1delay (Val{:analytic }, t, u0 )
84
+ f_1delay_notinplace (:: Type{Val{:analytic}} , u0, p, t ) = f_1delay (Val{:analytic }, u0, p, t )
85
85
86
86
# ### Vectorized history function
87
87
88
88
build_prob_dde_1delay_notinplace (u₀, :: T = u₀) where {T} =
89
- DDEProblem (f_1delay_notinplace, t-> [zero (u₀)], [u₀], (zero (T), T (10 )), [oneunit (T)])
89
+ DDEProblem (f_1delay_notinplace, t-> [zero (u₀)], [u₀], (zero (T), T (10 )), nothing , [oneunit (T)])
90
90
91
91
"""
92
92
prob_dde_1delay_notinplace
@@ -99,7 +99,7 @@ prob_dde_1delay_notinplace = build_prob_dde_1delay_notinplace(1.0)
99
99
# ### Scalar history function
100
100
101
101
build_prob_dde_1delay_scalar_notinplace (u₀, :: T = u₀) where {T} =
102
- DDEProblem (f_1delay_notinplace, t -> zero (u₀), u₀, (zero (T), T (10 )), [oneunit (T)])
102
+ DDEProblem (f_1delay_notinplace, t -> zero (u₀), u₀, (zero (T), T (10 )), nothing , [oneunit (T)])
103
103
104
104
"""
105
105
prob_dde_1delay_scalar_notinplace
@@ -113,7 +113,7 @@ prob_dde_1delay_scalar_notinplace = build_prob_dde_1delay_scalar_notinplace(1.0)
113
113
114
114
# ## In-place function
115
115
116
- function f_2delays (du:: T , u, h, p, t) where T
116
+ function f_2delays (du, u, h, p, t:: T ) where T
117
117
du[1 ] = (- h (t - T (1 // 3 ))[1 ] - h (t - T (1 // 5 ))[1 ]) / oneunit (t)
118
118
end
119
119
@@ -154,7 +154,7 @@ function f_2delays(::Type{Val{:analytic}}, u₀, p, t)
154
154
end
155
155
156
156
build_prob_dde_2delays (u₀, :: T = u₀) where {T} =
157
- DDEProblem (f_2delays, t -> [zero (u₀)], [u₀], (zero (T), oneunit (T)), [T (1 // 3 ), T (1 // 5 )])
157
+ DDEProblem (f_2delays, t -> [zero (u₀)], [u₀], (zero (T), oneunit (T)), nothing , [T (1 // 3 ), T (1 // 5 )])
158
158
159
159
"""
160
160
prob_dde_2delays
@@ -184,18 +184,18 @@ prob_dde_2delays = build_prob_dde_2delays(1.0)
184
184
185
185
# ## Not in-place function
186
186
187
- function f_2delays_notinplace (u:: T , h, p, t) where T
187
+ function f_2delays_notinplace (u, h, p, t:: T ) where T
188
188
(- h (t - T (1 // 3 )) .- h (t - T (1 // 5 ))) ./ oneunit (t)
189
189
end
190
190
191
- f_2delays_notinplace (:: Type{Val{:analytic}} , t, u0 ) =
192
- f_2delays (Val{:analytic }, t, u0 )
191
+ f_2delays_notinplace (:: Type{Val{:analytic}} , u0, p, t ) =
192
+ f_2delays (Val{:analytic }, u0, p, t )
193
193
194
194
# ### Vectorized history function
195
195
196
196
build_prob_dde_2delays_notinplace (u₀, :: T = u₀) where {T} =
197
197
DDEProblem (f_2delays_notinplace, t -> [zero (u₀)], [u₀], (zero (T), oneunit (T)),
198
- [T (1 // 3 ), T (1 // 5 )])
198
+ nothing , [T (1 // 3 ), T (1 // 5 )])
199
199
200
200
"""
201
201
prob_dde_2delays_notinplace
@@ -209,7 +209,7 @@ prob_dde_2delays_notinplace = build_prob_dde_2delays_notinplace(1.0)
209
209
210
210
build_prob_dde_2delays_scalar_notinplace (u₀, :: T = u₀) where {T} =
211
211
DDEProblem (f_2delays_notinplace, t -> zero (u₀), u₀, (zero (T), oneunit (T)),
212
- [T (1 // 3 ), T (1 // 5 )])
212
+ nothing , [T (1 // 3 ), T (1 // 5 )])
213
213
214
214
"""
215
215
prob_dde_2delays_scalar_notinplace
@@ -225,12 +225,12 @@ prob_dde_2delays_scalar_notinplace = build_prob_dde_2delays_scalar_notinplace(1.
225
225
226
226
# ## In-place function
227
227
228
- function f_1delay_long (du:: T , u, h, p, t) where T
228
+ function f_1delay_long (du, u, h, p, t:: T ) where T
229
229
du[1 ] = (- h (t - T (1 // 5 ))[1 ] + u[1 ]) / oneunit (t)
230
230
end
231
231
232
232
build_prob_dde_1delay_long (u₀, :: T = u₀) where {T} =
233
- DDEProblem (f_1delay_long, t -> [zero (u₀)], [u₀], (zero (T), T (100 )), [T (1 // 5 )])
233
+ DDEProblem (f_1delay_long, t -> [zero (u₀)], [u₀], (zero (T), T (100 )), nothing , [T (1 // 5 )])
234
234
235
235
"""
236
236
prob_dde_1delay_long
@@ -258,13 +258,13 @@ prob_dde_1delay_long = build_prob_dde_1delay_long(1.0)
258
258
259
259
# ## Not in-place function
260
260
261
- function f_1delay_long_notinplace (u:: T , h, p, t) where T
261
+ function f_1delay_long_notinplace (u, h, p, t:: T ) where T
262
262
(- h (t - T (1 // 5 )) .+ u ) ./ oneunit (t)
263
263
end
264
264
265
265
build_prob_dde_1delay_long_notinplace (u₀, :: T = u₀) where {T} =
266
266
DDEProblem (f_1delay_long_notinplace, t -> [zero (u₀)], [u₀], (zero (T), T (100 )),
267
- [T (1 // 5 )])
267
+ nothing , [T (1 // 5 )])
268
268
269
269
"""
270
270
prob_dde_1delay_long_notinplace
@@ -275,7 +275,7 @@ in-place function.
275
275
prob_dde_1delay_long_notinplace = build_prob_dde_1delay_long_notinplace (1.0 )
276
276
277
277
build_prob_dde_1delay_long_scalar_notinplace (u₀, :: T = u₀) where {T} =
278
- DDEProblem (f_1delay_long_notinplace, t -> zero (u₀), u₀, (zero (T), T (100 )), [T (1 // 5 )])
278
+ DDEProblem (f_1delay_long_notinplace, t -> zero (u₀), u₀, (zero (T), T (100 )), nothing , [T (1 // 5 )])
279
279
280
280
"""
281
281
prob_dde_1delay_long_scalar_notinplace
@@ -289,12 +289,12 @@ prob_dde_1delay_long_scalar_notinplace = build_prob_dde_1delay_long_scalar_notin
289
289
290
290
# ## In-place function
291
291
292
- function f_2delays_long (du:: T , u, h, p, t) where T
292
+ function f_2delays_long (du, u, h, p, t:: T ) where T
293
293
du[1 ] = (- h (t - T (1 // 3 ))[1 ] - h (t - T (1 // 5 ))[1 ]) / oneunit (t)
294
294
end
295
295
296
296
build_prob_dde_2delays_long (u₀, :: T = u₀) where {T} =
297
- DDEProblem (f_2delays_long, t -> [zero (u₀)], [u₀], (zero (T), T (100 )), [T (1 // 3 ), T (1 // 5 )])
297
+ DDEProblem (f_2delays_long, t -> [zero (u₀)], [u₀], (zero (T), T (100 )), nothing , [T (1 // 3 ), T (1 // 5 )])
298
298
299
299
"""
300
300
prob_dde_2delays_long
@@ -322,15 +322,15 @@ prob_dde_2delays_long = build_prob_dde_2delays_long(1.0)
322
322
323
323
# ## Not in-place function
324
324
325
- function f_2delays_long_notinplace (u:: T , h, p, t) where T
325
+ function f_2delays_long_notinplace (u, h, p, t:: T ) where T
326
326
(- h (t - T (1 // 3 )) .- h (t - T (1 // 5 ))) ./ oneunit (t)
327
327
end
328
328
329
329
# ### Vectorized history function
330
330
331
331
build_prob_dde_2delays_long_notinplace (u₀, :: T = u₀) where {T} =
332
332
DDEProblem (f_2delays_long_notinplace, t -> [zero (u₀)], [u₀], (zero (T), T (100 )),
333
- [T (1 // 3 ), T (1 // 5 )])
333
+ nothing , [T (1 // 3 ), T (1 // 5 )])
334
334
335
335
"""
336
336
prob_dde_2delays_long_notinplace
@@ -344,7 +344,7 @@ prob_dde_2delays_long_notinplace = build_prob_dde_2delays_long_notinplace(1.0)
344
344
345
345
build_prob_dde_2delays_long_scalar_notinplace (u₀, :: T = u₀) where {T} =
346
346
DDEProblem (f_2delays_long_notinplace, t -> zero (u₀), u₀, (zero (T), T (100 )),
347
- [T (1 // 3 ), T (1 // 5 )])
347
+ nothing , [T (1 // 3 ), T (1 // 5 )])
348
348
349
349
"""
350
350
prob_dde_2delays_long_scalar_notinplace
370
370
Model of blood production with constant delay (M. C. Mackey and L. Glass, Oscillation and
371
371
chaos in physiological control systems, 1977).
372
372
"""
373
- prob_dde_mackey = DDEProblem (f_dde_mackey, t -> [0.5 ], [0.5 ], (0.0 , 500.0 ), [14 ])
373
+ prob_dde_mackey = DDEProblem (f_dde_mackey, t -> [0.5 ], [0.5 ], (0.0 , 500.0 ), nothing , [14 ])
374
374
375
375
function f_dde_wheldon (du, u, h, p, t)
376
376
du[1 ] = 1.1 / (1 + sqrt (10 )* (h (t- 20 )[1 ])^ (5 / 4 )) - 10 * u[1 ]/ (1 + 40 * u[2 ])
@@ -402,7 +402,7 @@ DDE with vanishing time dependent delay at ``t = 1`` (K. W. Neves, Automatic int
402
402
of functional differential equations: An approach, 1975).
403
403
"""
404
404
prob_dde_neves_1 = DDEProblem (f_dde_neves1, t -> [log (t)], [log (0.1 )], (0.1 , 10. ), [],
405
- [(t, u) -> t - exp (1 - 1 / t)])
405
+ nothing , [(t, u) -> t - exp (1 - 1 / t)])
406
406
407
407
function f_dde_neves_thompson (du, u, h, p, t)
408
408
if h (t/ 2 )[1 ] < 0
@@ -447,7 +447,7 @@ u(t) = 1
447
447
for ``t \\ leq 0``.
448
448
"""
449
449
prob_dde_neves_thompson = DDEProblem (f_dde_neves_thompson, t -> [1. ], [1. ], (0. , 2 * log (66 )),
450
- [], [(t, u) -> t/ 2 ])
450
+ nothing , [], [(t, u) -> t/ 2 ])
451
451
452
452
function f_dde_paul1 (du, u, h, p, t)
453
453
du[1 ] = - 2 * h (t - 1 - abs (u[1 ]))[1 ]* (1 - u[1 ]^ 2 )
@@ -471,7 +471,7 @@ u(t) = 1/2
471
471
472
472
for ``t \\ leq 0``.
473
473
"""
474
- prob_dde_paul1 = DDEProblem (f_dde_paul1, t -> [0.5 ], [0.5 ], (0. , 30. ), [],
474
+ prob_dde_paul1 = DDEProblem (f_dde_paul1, t -> [0.5 ], [0.5 ], (0. , 30. ), nothing , [],
475
475
[(t, u) -> 1 + abs (u[1 ])])
476
476
477
477
function f_dde_paul2 (du, u, h, p, t)
485
485
486
486
DDE with state dependent delay (C. A. H. Paul, A test set of functional differential equations, 1994).
487
487
"""
488
- prob_dde_paul2 = DDEProblem (f_dde_paul2, t -> [1 ; 0.5 ], [1 ; 0.5 ], (0. , 30. ), [],
488
+ prob_dde_paul2 = DDEProblem (f_dde_paul2, t -> [1 ; 0.5 ], [1 ; 0.5 ], (0. , 30. ), nothing , [],
489
489
[(t, u) -> u[2 ]])
490
490
491
491
function build_prob_dde_mahaffy (tspan, h, σ₀, T₁, γ, Q, k, a, K, r)
@@ -495,7 +495,7 @@ function build_prob_dde_mahaffy(tspan, h, σ₀, T₁, γ, Q, k, a, K, r)
495
495
du[3 ] = 1 - Q* exp (γ* u[3 ])/ (σ₀* h (t- T₁- u[3 ])[2 ])
496
496
end
497
497
498
- DDEProblem (f, h, h (0 ), tspan, [T₁], [(t, u) -> T₁ + u[3 ]])
498
+ DDEProblem (f, h, h (0 ), tspan, nothing , [T₁], [(t, u) -> T₁ + u[3 ]])
499
499
end
500
500
501
501
function h_mahaffy1 (t)
@@ -535,7 +535,7 @@ DDE with vanishing state dependent delay at ``t = 1`` (K. W. Neves, Automatic in
535
535
of functional differential equations: An approach, 1975).
536
536
"""
537
537
prob_dde_neves2 = DDEProblem (f_dde_neves2, t -> [log (t); 1 / t], [log (0.1 ); 10 ], (0.1 , 5. ),
538
- [], [(t, u) -> t - exp (1 - u[2 ])])
538
+ nothing , [], [(t, u) -> t - exp (1 - u[2 ])])
539
539
540
540
function build_f_dde_gatica (r₁, r₂, α, δ)
541
541
function f_dde_gatica (du, u, h, p, t)
@@ -559,7 +559,7 @@ Model of antigen antibody dynamics with fading memory, with vanishing state depe
559
559
at ``t = 0`` (J. Gatica and P. Waltman, A threshold model of antigen antibody dynamics with fading memory, 1982).
560
560
"""
561
561
prob_dde_gatica = DDEProblem (build_f_dde_gatica (0.02 , 0.005 , 3 , 0.01 ), t -> [5 ; 0.1 ; 0 ; 0 ],
562
- [5 ; 0.1 ; 0 ; 0 ], (0. , 40. ), [], [(t, u) -> u[4 ]])
562
+ [5 ; 0.1 ; 0 ; 0 ], (0. , 40. ), nothing , [], [(t, u) -> u[4 ]])
563
563
564
564
#=
565
565
Quorum Sensing model
@@ -611,7 +611,7 @@ function build_prob_dde_qs(u₀, tspan, τ, D, γₛ, Kₘ, nₛ, a, αₐ, β
611
611
end
612
612
end
613
613
614
- DDEProblem (f_dde_qs, t -> u₀, u₀, tspan, [τ])
614
+ DDEProblem (f_dde_qs, t -> u₀, u₀, tspan, nothing , [τ])
615
615
end
616
616
617
617
"""
0 commit comments