diff --git a/docs/make.jl b/docs/make.jl index 43cf2f2..4a5a9b3 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -18,7 +18,7 @@ limitations under the License. Changes from copied code are indicated. =# -using Documenter, Literate, DifferentiableMetabolism +using Documenter, Literate, DifferentiableMetabolism, ConstraintTrees, Symbolics, COBREXA examples = sort(filter(x -> endswith(x, ".jl"), readdir(joinpath(@__DIR__, "src"), join = true))) diff --git a/src/get_constraints.jl b/src/get_constraints.jl index e39722e..0b8ccdc 100644 --- a/src/get_constraints.jl +++ b/src/get_constraints.jl @@ -16,6 +16,11 @@ See the License for the specific language governing permissions and limitations under the License. =# +""" +$(TYPEDSIGNATURES) + +TODO +""" constrained(x) = begin y = Symbolics.value(x) y isa Float64 && isinf(y) && return false @@ -36,10 +41,20 @@ function equality_constraints(m::ConstraintTrees.ConstraintTree) sink end +""" +$(TYPEDSIGNATURES) + +TODO +""" function get_equality_constraints(m::ConstraintTrees.ConstraintTree, sink) get_equality_constraints.(values(m), Ref(sink)) end +""" +$(TYPEDSIGNATURES) + +TODO +""" function get_equality_constraints(c::ConstraintTrees.Constraint, sink) if c.bound isa ConstraintTrees.EqualTo || c.bound isa ParameterEqualTo push!(sink, (ConstraintTrees.value(c), Symbolics.Num(c.bound.equal_to))) @@ -73,10 +88,20 @@ function inequality_constraints(m::ConstraintTrees.ConstraintTree) ] end +""" +$(TYPEDSIGNATURES) + +TODO +""" function get_inequality_constraints(m::ConstraintTrees.ConstraintTree, sink) get_inequality_constraints.(values(m), Ref(sink)) end +""" +$(TYPEDSIGNATURES) + +TODO +""" function get_inequality_constraints(c::ConstraintTrees.Constraint, sink) if c.bound isa ConstraintTrees.Between || c.bound isa ParameterBetween push!(