Skip to content

Commit 6282703

Browse files
committed
Format
1 parent 9f9141c commit 6282703

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

src/parameters.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ function isparameter(x)
66

77
if x isa Symbolic && (isp = getmetadata(x, MTKParameterCtx, nothing)) !== nothing
88
return isp
9-
#TODO: Delete this branch
9+
#TODO: Delete this branch
1010
elseif x isa Symbolic && Symbolics.getparent(x, false) !== false
1111
p = Symbolics.getparent(x)
1212
isparameter(p) ||

test/input_output_handling.jl

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -267,17 +267,15 @@ xp1 = f_oop(x1, u, pn, 0)
267267
@test xp1 matrices.A * x1 + matrices.B * [u; 0]
268268

269269
@parameters t
270-
@variables x(t)[1:3]=0
270+
@variables x(t)[1:3] = 0
271271
@variables u(t)[1:2]
272272
D = Differential(t)
273273
y₁, y₂, y₃ = x
274274
u1, u2 = u
275-
k₁, k₂, k₃ = 1,1,1
276-
eqs = [
277-
D(y₁) ~ -k₁*y₁ + k₃*y₂*y₃ + u1
278-
D(y₂) ~ k₁*y₁ - k₃*y₂*y₃ - k₂*y₂^2 + u2
279-
y₁ + y₂ + y₃ ~ 1
280-
]
275+
k₁, k₂, k₃ = 1, 1, 1
276+
eqs = [D(y₁) ~ -k₁ * y₁ + k₃ * y₂ * y₃ + u1
277+
D(y₂) ~ k₁ * y₁ - k₃ * y₂ * y₃ - k₂ * y₂^2 + u2
278+
y₁ + y₂ + y₃ ~ 1]
281279

282280
@named sys = ODESystem(eqs, t)
283281
inputs = [u[1], u[2]]

0 commit comments

Comments
 (0)