Default solver and objective function

34 views
Skip to first unread message

Laura Blicher

unread,
Oct 15, 2024, 9:11:56 AM10/15/24
to cobra pie
Hi team 

When calculating fluxes using the function model.optimize(), I aim to find the distribution of fluxes that satisfy Sv = 0 as well as the constraints. 
However, when using model.optimize() without specifying an objective function, is there a default objective function being used? Also, could you please clarify which solver is the LP default solver? 

Thank you in advance, and happy Tuesday. 

James Morrissey

unread,
Nov 4, 2024, 8:48:40 PM11/4/24
to cobra pie
Hi Laura,

The default objective function depends on the model, it will normally be set by whoever created the model and is typically the biomass reaction. You can easily change it with model.objective = "my_reaction".

The default LP solver is GLPK. You can also change this to CPLEX or Gurobi with (model.solver = 'cplex') but you'll need the commercial licenses for these solvers.

Best wishes,
James
Reply all
Reply to author
Forward
0 new messages