Skip to content

Commit cc23c88

Browse files
committed
up
1 parent be1b270 commit cc23c88

File tree

3 files changed

+10
-13
lines changed

3 files changed

+10
-13
lines changed

src/systems/discrete_system/discrete_system.jl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ eqs = [x(k+1) ~ σ*(y-x),
1717
@named de = DiscreteSystem(eqs)
1818
```
1919
"""
20-
struct DiscreteSystem <: AbstractDiscreteSystem
20+
struct DiscreteSystem <: AbstractTimeDependentSystem
2121
"""
2222
A tag for the system. If two systems have the same tag, then they are
2323
structurally identical.
@@ -233,7 +233,6 @@ function DiscreteSystem(eqs, iv; kwargs...)
233233
push!(new_ps, p)
234234
end
235235
end
236-
@show allunknowns
237236
return DiscreteSystem(eqs, iv,
238237
collect(allunknowns), collect(new_ps); kwargs...)
239238
end

src/systems/systems.jl

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,13 @@ function structural_simplify(
3939
else
4040
newsys = newsys′
4141
end
42-
# if newsys isa DiscreteSystem &&
43-
# any(eq -> symbolic_type(eq.lhs) == NotSymbolic(), equations(newsys))
44-
# error("""
45-
# Encountered algebraic equations when simplifying discrete system. This is \
46-
# not yet supported.
47-
# """)
48-
# end
42+
if newsys isa DiscreteSystem &&
43+
any(eq -> symbolic_type(eq.lhs) == NotSymbolic(), equations(newsys))
44+
error("""
45+
Encountered algebraic equations when simplifying discrete system. This is \
46+
not yet supported.
47+
""")
48+
end
4949
for pass in additional_passes
5050
newsys = pass(newsys)
5151
end

src/systems/systemstructure.jl

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -430,9 +430,9 @@ function TearingState(sys; quick_cancel = false, check = true)
430430

431431
ts = TearingState(sys, fullvars,
432432
SystemStructure(complete(var_to_diff), complete(eq_to_diff),
433-
complete(graph), nothing, var_types, sys isa AbstractDiscreteSystem),
433+
complete(graph), nothing, var_types, sys isa DiscreteSystem),
434434
Any[])
435-
if sys isa AbstractDiscreteSystem
435+
if sys isa DiscreteSystem
436436
ts = shift_discrete_system(ts)
437437
end
438438
return ts
@@ -456,8 +456,6 @@ function lower_order_var(dervar, t)
456456
diffvar
457457
end
458458

459-
"""
460-
"""
461459
function shift_discrete_system(ts::TearingState)
462460
@unpack fullvars, sys = ts
463461
discvars = OrderedSet()

0 commit comments

Comments
 (0)