# micom.problems¶

Implements tradeoff optimization between community and egoistic growth.

## Functions¶

 `regularize_l2_norm`(community, min_growth) Add an objective to find the most "egoistic" solution. `cooperative_tradeoff`(community, min_growth, fraction, ...) Find the best tradeoff between community and individual growth. `knockout_taxa`(community, taxa, fraction, method, progress) Knockout a taxon from the community.

## Module Contents¶

micom.problems.regularize_l2_norm(community, min_growth)[source]

Add an objective to find the most “egoistic” solution.

This adds an optimization objective finding a solution that maintains a (sub-)optimal community growth rate but is the closest solution to the community members individual maximal growth rates. So it basically finds the best possible tradeoff between maximizing community growth and individual (egoistic) growth. Here the objective is given as the sum of squared differences between the individuals current and maximal growth rate. In the linear case squares are substituted by absolute values (Manhattan distance).

Parameters:
• community (micom.Community) – The community to modify.

• min_growth (positive float) – The minimal community growth rate that has to be mantained.

• linear (boolean) – Whether to use a non-linear (sum of squares) or linear version of the cooperativity cost. If set to False requires a QP-capable solver.

• max_gcs (None or dict) – The precomputed maximum individual growth rates.

micom.problems.cooperative_tradeoff(community, min_growth, fraction, fluxes, pfba, atol, rtol)[source]

Find the best tradeoff between community and individual growth.

micom.problems.knockout_taxa(community, taxa, fraction, method, progress, diag=True)[source]

Knockout a taxon from the community.