Skip to content

Commit dd1ed5b

Browse files
Require public Symbolics code generation API
Raise the Symbolics floor to 7.32 and cover ODEProblem code generation so downgrade testing cannot select a release that predates the public low-level code generation API. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
1 parent db56a6a commit dd1ed5b

3 files changed

Lines changed: 9 additions & 2 deletions

File tree

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ StaticArrays = "1.9.14"
122122
StochasticDiffEq = "6.82.0, 7"
123123
SymbolicIndexingInterface = "0.3.46"
124124
SymbolicUtils = "4.31"
125-
Symbolics = "7.30"
125+
Symbolics = "7.32"
126126
UnPack = "0.1, 1.0"
127127
julia = "1.10"
128128
BenchmarkTools = "1"

lib/ModelingToolkitBase/Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ StochasticDiffEq = "6.82.0, 7"
188188
Sundials = "6"
189189
SymbolicIndexingInterface = "0.3.39"
190190
SymbolicUtils = "4.35.3"
191-
Symbolics = "7.30"
191+
Symbolics = "7.32"
192192
TaskLocalValues = "0.1.3"
193193
Test = "1"
194194
Tracker = "0.2.30"

lib/ModelingToolkitBase/test/simple_mtkcompile.jl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
using ModelingToolkitBase
22
using ModelingToolkitBase: t_nounits as t, D_nounits as D
33

4+
@testset "Problem code generation" begin
5+
@variables x(t)
6+
@mtkcompile sys = System([D(x) ~ 2x + 1], t)
7+
prob = ODEProblem(sys, [x => 1.0], (0.0, 1.0))
8+
@test prob.f(prob.u0, prob.p, 0.0) == [3.0]
9+
end
10+
411
@testset "User-provided `observed` is respected" begin
512
@variables x(t) y(t) z(t)
613
@mtkcompile sys = System([D(x) ~ 2x, z ~ y + x], t; observed = [y ~ 2x + 3])

0 commit comments

Comments
 (0)