Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
LCSB-BioCore
COBREXA.jl
Commits
3dc0251e
Unverified
Commit
3dc0251e
authored
May 06, 2021
by
Miroslav Kratochvil
Browse files
move bounds-generating helpers to a separate file
parent
4b521477
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/analysis/flux_variability_analysis.jl
View file @
3dc0251e
...
...
@@ -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)
...
...
src/base/utils/bounds.jl
0 → 100644
View file @
3dc0251e
"""
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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment