Skip to content

Commit

Permalink
use&test remove_bounds in a sensible location
Browse files Browse the repository at this point in the history
  • Loading branch information
exaexa committed Jul 24, 2024
1 parent 1270227 commit 4ea1d35
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions docs/src/examples/04-community-models.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4ea1d35

Please sign in to comment.