A constraints-based reconstruction and analysis model for biological systems is actually just an application of a class of discrete optimization problems typically solved with linear, mixed integer or quadratic programming techniques. Cobrapy does not implement any algorithms to find solutions to such problems but rather creates an biologically motivated abstraction to these techniques to make it easier to think of how metabolic systems work without paying much attention to how that formulates to an optimization problem.
When you have defined your model, you can switch solver backend by
simply assigning to the
import cobra.test model = cobra.test.create_test_model('textbook')
model.solver = 'glpk' # or if you have cplex installed model.solver = 'cplex'
For information on how to configure and tune the solver, please see the
documentation for optlang project
and note that
model.solver is simply an object optlang of class