Skip to content

Commit f6bae74

Browse files
authored
Update steady_state_stability.jl
up
1 parent b9e6aaa commit f6bae74

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

src/steady_state_stability.jl

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -59,20 +59,13 @@ function steady_state_stability(u::Vector, rs::ReactionSystem, ps; tol = 10*sqrt
5959
u = filter(u_v -> any(isequal(u_v[1]), unknowns(ss_jac.f.sys)), u)
6060
end
6161

62-
# Computes stability (by checking that the real part of all eigenvalues are negative).
63-
# Here, `ss_jac` is a `ODEProblem` with dummy values for `u0` and `p`.
62+
# Generates the Jacobian at the steady state (technically, `ss_jac` is an `ODEProblem` with dummy values for `u0` and `p`).
6463
J = zeros(length(u), length(u))
6564
ss_jac = remake(ss_jac; u0 = u, p = ps)
6665
ss_jac.f.jac(J, ss_jac.u0, ss_jac.p, Inf)
67-
println()
68-
println()
69-
println("Got here")
70-
println(J)
71-
println(typeof(J))
72-
println(eigvals(J))
73-
println(typeof(eigvals(J)))
66+
67+
# Computes stability (by checking that the real part of all eigenvalues is negative).
7468
max_eig = maximum(real(ev) for ev in eigvals(J))
75-
println("Didn't get here")
7669
if abs(max_eig) < tol
7770
error("The system Jacobian's maximum eigenvalue at the steady state is within the tolerance range (abs($max_eig) < $tol). Hence, stability could not be reliably determined. If you still wish to compute the stability, reduce the `tol` argument.")
7871
end
@@ -139,4 +132,4 @@ function steady_state_u_conversion(u, rs::ReactionSystem)
139132
end
140133
end
141134
return symmap_to_varmap(rs, u)
142-
end
135+
end

0 commit comments

Comments
 (0)