Relaxation

Oftentimes, appying experimental constraints such as proteomics and metabolomics leave the model in a infeashible state. To recover from the infeashibility, geckopy provides different relaxation methods that compute an Irreducibly Inconsistent Set (IIS); i.e., a minimal set of infeashible constraints.

The IIS may not be unique, so we need to set a criterion to select the best IIS. This criterion - the objective of the relaxation problem - is implemented in the form of a enum ObjectiveRule that all of the relaxation functions of geckopy accept as a parameter (objective_rule):

  • Objective_rule.MIN_ELASTIC_SUM: \(\sum_{v \in \text{elastic vars}} v_{flux}\) (LP).

  • Objective_rule.MIN_ELASTIC_SUM_OBJECTIVE: \(\sum_{e \in \text{elastic vars}} + \text{prev objective}\) (LP).

  • Objective_rule.MIN_MILP_COUNT: \(\sum_i^{N} e_i\) where e is a binary variable (MILP).

Relaxation functions on geckopy.Model

  • get_upper_relaxation() builds the relaxation problem (adding elastic variables to protein constraints), sets the objective and solves, returning the IIS and the status of the solver.

  • elastic_upper_relaxation() runs get_upper_relaxation iteratively, removing previous found infeashible variables, to compute a wider IIS (although it might still be non-unique). It is not an in-place operation and returns both a relaxed model and the IIS.

Relaxation functions on thermodynamic geckopy.Model