solvers Package — cobra 0.2.0 documentation

### Navigation

- index
- modules |
- next |
- previous |
- cobra 0.2.0 documentation »
- cobra Package »

# solvers Package

## `solvers` Package

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

  Wrapper to optimization solvers

## `cplex_solver` Module

## `glpk_solver` Module

`cobra.solvers.glpk_solver.` `create_problem`(cobra_model, **kwargs)

  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)

`cobra.solvers.glpk_solver.` `get_status`(lp)

`cobra.solvers.glpk_solver.` `set_parameter`(lp, parameter_name, parameter_value)

  with pyglpk the parameters are set during the solve phase

`cobra.solvers.glpk_solver.` `solve`(cobra_model, **kwargs)

  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)

  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)

  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`()

## `parameters` Module

### Navigation

- index
- modules |
- next |
- previous |
- cobra 0.2.0 documentation »
- cobra Package »