Conditions (Python)¶
raven-toolbox objects in raven_toolbox.conditions, collected from the source of the tracked branch.
Functions¶
| Function | Summary |
|---|---|
apply_condition |
Apply a parsed condition (or a YAML file path) to model in place. |
load_condition |
Parse a condition YAML file into a plain dict. |
set_reaction_bounds |
Set both bounds, bypassing cobra's lb <= ub validator. |
Reference¶
apply_condition¶
Apply a parsed condition (or a YAML file path) to model in place.
Returns the same model object for chaining.
load_condition¶
Parse a condition YAML file into a plain dict.
set_reaction_bounds¶
Set both bounds, bypassing cobra's lb <= ub validator.
Some conditions intentionally land on an infeasible lb > ub state
(e.g. forcing flux via a sentinel bound). cobra's setter rejects
that. This helper writes the underlying private attributes when
needed so the model can match the caller's exact intent.