Unverified Commit 3dc0251e authored by Miroslav Kratochvil's avatar Miroslav Kratochvil
Browse files

move bounds-generating helpers to a separate file

parent 4b521477
......@@ -123,30 +123,6 @@ function flux_variability_analysis_dict(model::MetabolicModel, optimizer; kwargs
)
end
"""
gamma_bounds(gamma)
A bounds-generating function for [`flux_variability_analysis`](@ref) that
limits the objective value to be at least `gamma*Z₀`, as usual in COBRA
packages. Use as the `bounds` argument:
```
flux_variability_analysis(model, some_optimizer; bounds = gamma_bounds(0.9))
```
"""
gamma_bounds(gamma) = z -> (gamma * z, Inf)
"""
(tolerance) = z -> begin
A bounds-generating function for [`flux_variability_analysis`](@ref) that
limits the objective value to a small multiple of Z₀. Use as `bounds` argument,
similarly to [`gamma_bounds`](@ref).
"""
objective_bounds(tolerance) = z -> begin
vs = (z * tolerance, z / tolerance)
(minimum(vs), maximum(vs))
end
"""
_FVA_add_constraint(model, c, x, Z)
......
"""
gamma_bounds(gamma)
A bounds-generating function for [`flux_variability_analysis`](@ref) that
limits the objective value to be at least `gamma*Z₀`, as usual in COBRA
packages. Use as the `bounds` argument:
```
flux_variability_analysis(model, some_optimizer; bounds = gamma_bounds(0.9))
```
"""
gamma_bounds(gamma) = z -> (gamma * z, Inf)
"""
(tolerance) = z -> begin
A bounds-generating function for [`flux_variability_analysis`](@ref) that
limits the objective value to a small multiple of Z₀. Use as `bounds` argument,
similarly to [`gamma_bounds`](@ref).
"""
objective_bounds(tolerance) = z -> begin
vs = (z * tolerance, z / tolerance)
(minimum(vs), maximum(vs))
end
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment