solvers Package

solvers Package

cobra.solvers.optimize(cobra_model, solver='glpk', error_reporting=True, **kwargs)[source]

Wrapper to optimization solvers

cplex_solver Module

glpk_solver Module

cobra.solvers.glpk_solver.create_problem(cobra_model, **kwargs)[source]

Solver-specific method for constructing a solver problem from a cobra.Model. This can be tuned for performance using kwargs

cobra.solvers.glpk_solver.format_solution(lp, cobra_model, **kwargs)[source]
cobra.solvers.glpk_solver.get_status(lp)[source]
cobra.solvers.glpk_solver.set_parameter(lp, parameter_name, parameter_value)[source]

with pyglpk the parameters are set during the solve phase

cobra.solvers.glpk_solver.solve(cobra_model, **kwargs)[source]

Smart interface to optimization solver functions that will convert the cobra_model to a solver object, set the parameters, and try multiple methods to get an optimal solution before returning the solver object and a cobra.Solution (which is attached to cobra_model.solution)

cobra_model: a cobra.Model

returns a dict: {‘the_problem’: solver specific object, ‘the_solution’: cobra.Solution for the optimization problem’}

cobra.solvers.glpk_solver.solve_problem(lp, **kwargs)[source]

A performance tunable method for updating a model problem file

lp: a pyGLPK 0.3 problem

For pyGLPK it is necessary to provide the following parameters, if they are not provided then the default settings will be used: tolerance_optimality, tolerance_integer, lp_method, and objective_sense

cobra.solvers.glpk_solver.update_problem(lp, cobra_model, **kwargs)[source]

A performance tunable method for updating a model problem file

lp: A gurobi problem object

cobra_model: the cobra.Model corresponding to ‘lp’

gurobi_solver Module

legacy Module

cobra.solvers.legacy.test_solvers()[source]

parameters Module

Table Of Contents

Previous topic

mlab Package

Next topic

stats Package

This Page