Skip to content

Commit f894500

Browse files
committed
Fix test dup
1 parent 2c49ef2 commit f894500

File tree

1 file changed

+0
-21
lines changed

1 file changed

+0
-21
lines changed

test/symbolic_events.jl

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -867,27 +867,6 @@ end
867867
@test sign.(cos.(3 * (required_crossings_c2 .+ 1e-6))) == sign.(last.(cr2))
868868
end
869869

870-
@testset "Discrete variable timeseries" begin
871-
@variables x(t)
872-
@parameters a(t) b(t) c(t)
873-
cb1 = [x ~ 1.0] => [a ~ -a]
874-
function save_affect!(integ, u, p, ctx)
875-
integ.ps[p.b] = 5.0
876-
end
877-
cb2 = [x ~ 0.5] => (save_affect!, [], [b], [b], nothing)
878-
cb3 = 1.0 => [c ~ t]
879-
880-
@mtkbuild sys = ODESystem(D(x) ~ cos(t), t, [x], [a, b, c];
881-
continuous_events = [cb1, cb2], discrete_events = [cb3])
882-
prob = ODEProblem(sys, [x => 1.0], (0.0, 2pi), [a => 1.0, b => 2.0, c => 0.0])
883-
@test sort(canonicalize(Discrete(), prob.p)[1]) == [0.0, 1.0, 2.0]
884-
sol = solve(prob, Tsit5())
885-
886-
@test sol[a] == [-1.0]
887-
@test sol[b] == [5.0, 5.0]
888-
@test sol[c] == [0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0]
889-
end
890-
891870
@testset "Discrete event reinitialization (#3142)" begin
892871
@connector LiquidPort begin
893872
p(t)::Float64, [description = "Set pressure in bar",

0 commit comments

Comments
 (0)