Skip to content

Commit bf5742a

Browse files
committed
extend workload
1 parent 9235009 commit bf5742a

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

src/ModelingToolkit.jl

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,11 +225,20 @@ PrecompileTools.@compile_workload begin
225225
@named sys = ODESystem([ModelingToolkit.D_nounits(x) ~ -x], ModelingToolkit.t_nounits)
226226
prob = ODEProblem(structural_simplify(sys), [x => 30.0], (0, 100), [], jac = true)
227227
@mtkmodel __testmod__ begin
228+
@constants begin
229+
c = 1.0
230+
end
228231
@structural_parameters begin
229232
structp = false
230233
end
231-
@variables begin
232-
x(t) = 0.0, [description="foo", guess=1.0]
234+
if structp
235+
@variables begin
236+
x(t) = 0.0, [description="foo", guess=1.0]
237+
end
238+
else
239+
@variables begin
240+
x(t) = 0.0, [description="foo w/o structp", guess=1.0]
241+
end
233242
end
234243
@parameters begin
235244
a = 1.0, [description="bar"]

0 commit comments

Comments
 (0)