You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/concentrationrobustness.jl
+6-6Lines changed: 6 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -6,13 +6,13 @@
6
6
- :GLOBAL_ACR - this species is absolutely concentration-robust for every choice of rate constants
7
7
- :INCONCLUSIVE - the algorithm currently cannot decide whether this network has ACR. One could try calling this function with rate constants provided.
8
8
- :NO_ACR - the reaction network does not have ACR.
9
-
- :INEXACTPARAMS - the algorithm cannot conclude concentration-robustness due to inexact parameters (Floats that are too small)
9
+
- :INEXACTPARAMS - the algorithm cannot conclude concentration-robustness due to inexact parameters (floats that are too small)
10
10
11
11
Follows the approach outlined in [Puente et al. 2023](https://arxiv.org/abs/2401.00078).
@@ -83,7 +84,6 @@ function isconcentrationrobust(rn::ReactionSystem; p::VarMapType = Dict())
83
84
end
84
85
end
85
86
86
-
87
87
return:INCONCLUSIVE
88
88
end
89
89
@@ -118,7 +118,7 @@ end
118
118
119
119
For a network of deficiency one, return a vector of indices corresponding to species that are concentration robust, i.e. for every positive equilbrium, the concentration of species s will be the same.
Copy file name to clipboardExpand all lines: src/concordance.jl
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -49,7 +49,7 @@ end
49
49
"""
50
50
isconcordant(rn::ReactionSystem, atol=1e-12)
51
51
52
-
Given a reaction network (and an absolute tolerance for the nullspace matrix below which entries should be zero), test whether the reaction network's graph has a property called concordance. A concordant network will not admit multiple equilibria in any stoichiometric compatibility class. The algorithm for this check follows Haixia Ji's PhD thesis, (Ji, 2011).
52
+
Given a reaction network (and an absolute tolerance for the nullspace matrix below which entries should be zero), test whether the reaction network's graph has a property called concordance. A concordant network will not admit multiple equilibria in any stoichiometric compatibility class. The algorithm for this check follows Haixia Ji's PhD thesis, (Ji, 2011).
53
53
"""
54
54
functionisconcordant(rn::ReactionSystem)
55
55
S =netstoichmat(rn)
@@ -66,8 +66,8 @@ function isconcordant(rn::ReactionSystem)
66
66
# 2. If α[r] == 0 for some reaction r, either σ[s] == 0 for all s in the reactant complex,
67
67
# 3. or else there are two species s1, s2 in the reactant complex for which sign(σ[s1]) != sign(σ[s2])
Copy file name to clipboardExpand all lines: src/cycles.jl
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@
4
4
Checks if a reaction network is consistent, i.e. admits a positive equilibrium for some choice of rate constants. Equivalent to [`ispositivelydependent`](@ref).
Copy file name to clipboardExpand all lines: src/lp_utils.jl
+19-19Lines changed: 19 additions & 19 deletions
Original file line number
Diff line number
Diff line change
@@ -5,11 +5,11 @@
5
5
#################################
6
6
7
7
"""
8
-
add_subspace_constraints(S; model = nothing, varName = "")
8
+
add_subspace_constraints(S; model = nothing, var_name = "")
9
9
10
10
Given a matrix S, add the constraints that the solution vector μ will lie in the image space of S. If the model does not already exists, initialize one.
11
11
"""
12
-
functionadd_subspace_constraints(S::M; model =nothing, varName::String="") whereM<:AbstractMatrix
12
+
functionadd_subspace_constraints(S::T; model =nothing, var_name::String="") whereT<:AbstractMatrix
13
13
(s, r) =size(S)
14
14
15
15
# Initialize model if none provided.
@@ -20,20 +20,20 @@ function add_subspace_constraints(S::M; model = nothing, varName::String = "") w
add_sign_constraints(S; model = nothing, varName = "")
32
+
add_sign_constraints(S; model = nothing, var_name = "")
33
33
34
-
Given a matrix S, add the constraints that the solution vector var will be sign-compatible with the image space of S. If the model does not already exists, initialize one.
34
+
Given a matrix S, add the constraints that the solution vector var will be sign-compatible with the image space of S. If the model does not already exists, initialize one.
35
35
"""
36
-
functionadd_sign_constraints(S::M; model =nothing, varName::String="") whereM<:AbstractMatrix
36
+
functionadd_sign_constraints(S::T; model =nothing, var_name::String="") whereT<:AbstractMatrix
37
37
(s, r) =size(S)
38
38
39
39
# Initialize model if none provided.
@@ -44,13 +44,13 @@ function add_sign_constraints(S::M; model = nothing, varName::String = "") where
model[Symbol(var)] + M * (ones(s) - model[Symbol(ispos)]) ≥ones(s) * ϵ
73
+
model[Symbol(var_name)] + M * (ones(s) - model[Symbol(ispos)]) ≥ones(s) * ϵ
74
74
(S*model[Symbol(coeffs)]) + M * (ones(s) - model[Symbol(ispos)]) ≥ones(s) * ϵ
75
75
end)
76
76
@@ -101,15 +101,15 @@ function has_positive_solution(M::T; nonneg = false) where {T <: AbstractMatrix}
101
101
end
102
102
103
103
# Suppose we have a cone defined by the intersection of the nullspace of S and the positive orthant. Then is_extreme_ray tells whether a given vector in this cone is an extreme ray.
104
-
functionis_extreme_ray(S::M, x::V; atol =1e-9) where {M<:AbstractMatrix, V <:AbstractVector}
104
+
functionis_extreme_ray(S::T, x::V; atol =1e-9) where {T<:AbstractMatrix, V <:AbstractVector}
105
105
m, n =size(S)
106
106
length(x) != n &&error("The length of x is not correct, expected $n and received $(length(x)).")
107
107
!isapprox(S*x, zeros(m); atol) &&error("The provided vector $x is not a solution to Sx = 0.")
108
108
idxset =findall(!=(0), x)
109
109
is_extreme_idxset(S, idxset)
110
110
end
111
111
112
-
functionis_extreme_idxset(S::M, idxs::Vector{Int}) where {M<:AbstractMatrix}
112
+
functionis_extreme_idxset(S::T, idxs::Vector{Int}) where {T<:AbstractMatrix}
0 commit comments