Skip to content

Commit 2afacb5

Browse files
committed
Forbid DDEs for now
1 parent 636ad04 commit 2afacb5

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/systems/diffeqs/basic_transformations.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,8 @@ function change_independent_variable(sys::AbstractODESystem, iv, eqs = []; dummi
105105

106106
if !iscomplete(sys)
107107
error("System $(nameof(sys)) is incomplete. Complete it first!")
108+
elseif is_dde(sys)
109+
error("System $(nameof(sys)) contains delay differential equations (DDEs). This is currently not supported!")
108110
elseif isscheduled(sys)
109111
error("System $(nameof(sys)) is structurally simplified. Change independent variable before structural simplification!")
110112
elseif !iscall(iv2_of_iv1) || !isequal(only(arguments(iv2_of_iv1)), iv1)

test/basic_transformations.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,4 +152,8 @@ end
152152
@test_throws "not specified" change_independent_variable(M, v)
153153
@test_throws "not a function of the independent variable" change_independent_variable(M, y)
154154
@test_throws "not a function of the independent variable" change_independent_variable(M, z)
155+
M = ODESystem([D(x) ~ 0, v ~ x], t; name = :M)
156+
@variables x(..) # require explicit argument
157+
M = ODESystem([D(x(t)) ~ x(t-1)], t; name = :M) |> complete
158+
@test_throws "DDE" change_independent_variable(M, M.x)
155159
end

0 commit comments

Comments
 (0)