We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4068cd0 commit 7d11edbCopy full SHA for 7d11edb
src/systems/systemstructure.jl
@@ -267,7 +267,7 @@ function TearingState(sys; quick_cancel = false, check = true)
267
_var, _ = var_from_nested_derivative(var)
268
any(isequal(_var), ivs) && continue
269
if isparameter(_var) ||
270
- (istree(_var) && isparameter(operation(_var)) || isconstant(_var))
+ (istree(_var) && isparameter(operation(_var)) || isconstant(_var))
271
continue
272
end
273
varidx = addvar!(var)
test/constants.jl
@@ -9,7 +9,7 @@ MT = ModelingToolkit
9
D = Differential(t)
10
eqs = [D(x) ~ a]
11
@named sys = ODESystem(eqs)
12
-prob = ODEProblem(sys, [0, ], [0.0, 1.0], [])
+prob = ODEProblem(sys, [0], [0.0, 1.0], [])
13
sol = solve(prob, Tsit5())
14
15
# Test structural_simplify substitutions & observed values
@@ -19,16 +19,15 @@ eqs = [D(x) ~ 1,
19
simp = structural_simplify(sys);
20
@test isequal(simp.substitutions.subs[1], eqs[2])
21
@test isequal(equations(simp)[1], eqs[1])
22
-prob = ODEProblem(simp, [0, ], [0.0, 1.0], [])
+prob = ODEProblem(simp, [0], [0.0, 1.0], [])
23
24
@test sol[w][1] == 1
25
26
#Constant with units
27
-@constants β = 1 [unit = u"m/s"]
+@constants β=1 [unit = u"m/s"]
28
MT.get_unit(β)
29
@test MT.isconstant(β)
30
@variables t [unit = u"s"] x(t) [unit = u"m"]
31
32
eqs = [D(x) ~ β]
33
-sys = ODESystem(eqs,name=:sys)
34
-
+sys = ODESystem(eqs, name = :sys)
0 commit comments