From 4ea1d352691f79c15588b53b645eecdbd8907c85 Mon Sep 17 00:00:00 2001 From: Mirek Kratochvil Date: Wed, 24 Jul 2024 10:42:44 +0200 Subject: [PATCH] use&test remove_bounds in a sensible location --- docs/src/examples/04-community-models.jl | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/src/examples/04-community-models.jl b/docs/src/examples/04-community-models.jl index 80e962f3..97fd3c95 100644 --- a/docs/src/examples/04-community-models.jl +++ b/docs/src/examples/04-community-models.jl @@ -121,15 +121,17 @@ flux_balance_constraints(ecoli, interface = :boundary).interface # (such as `EX_` for exchanges). # Even if all of these methods fail, a suitable interface yourself can be -# produced manually: +# produced manually. (Additionally, we can do useful stuff, such as removing +# the unnecessary bounds from the exchange descriptions.) custom_model = flux_balance_constraints(ecoli) -custom_model *= +custom_model *= remove_bounds( :interface^C.ConstraintTree( :biomass => custom_model.fluxes.BIOMASS_Ecoli_core_w_GAM, :exchanges => C.ConstraintTree( k => v for (k, v) in custom_model.fluxes if startswith(string(k), "EX_") ), - ) + ), +) custom_model.interface.exchanges # ## Connecting the community constraints manually