Skip to content

create_lp discards some inequality constraints

The function create_lp, which converts a cobra model to a gurobi model, does not take general inequality constraints into account. It only converts reaction bounds and stoichiometric equality constraints. A seemingly easy solution to this problem is to replace the function with the call lp_model = model.solver.problem.copy(), since the cobra model already has an internal gurobi model. Advantages: "Guarantees" that the cobra and gurobi models are the same. Lowers maintenance requirements on mp_tool side. Drawback: Will have some effect on the reaction naming downstream.