From 465594d8711a911891f648122f70bf40f763953d Mon Sep 17 00:00:00 2001 From: Aayush Sabharwal Date: Wed, 24 Jul 2024 12:32:48 +0530 Subject: [PATCH] fixup! refactor: use clock from SciMLBase, fix tests --- src/clock.jl | 5 +---- test/clock.jl | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/clock.jl b/src/clock.jl index 13924d562f..26ea5832da 100644 --- a/src/clock.jl +++ b/src/clock.jl @@ -115,7 +115,4 @@ function Base.showerror(io::IO, cie::ClockInferenceException) print(io, "ClockInferenceException: ", cie.msg) end -struct IntegerSequence - t::Union{Nothing, Symbolic} - IntegerSequence(t::Union{Num, Symbolic}) = new(value(t)) -end +struct IntegerSequence end diff --git a/test/clock.jl b/test/clock.jl index fc9857b257..5bf5e917aa 100644 --- a/test/clock.jl +++ b/test/clock.jl @@ -72,7 +72,7 @@ sss, = ModelingToolkit._structural_simplify!(deepcopy(tss[1]), (inputs[1], ())) @test isempty(equations(sss)) d = Clock(dt) k = ShiftIndex(d) -@test observed(sss) == [yd(k + 1) ~ Sample(t, dt)(y); r(k + 1) ~ 1.0; +@test observed(sss) == [yd(k + 1) ~ Sample(dt)(y); r(k + 1) ~ 1.0; ud(k + 1) ~ kp * (r(k + 1) - yd(k + 1))] d = Clock(dt)