psamm.lpsolver.generic – Generic linear programming solver

Generic interface to LP solver instantiation.

exception psamm.lpsolver.generic.RequirementsError

Error resolving solver requirements

class psamm.lpsolver.generic.Solver(**kwargs)

Generic solver interface based on requirements

Use the any of the following keyword arguments to restrict which underlying solver is used:

  • integer: Use a solver that support integer variables (MILP)
  • rational: Use a solver that returns rational results
  • quadratic: Use a solver that supports quadratic objective/constraints
  • name: Select a specific solver based on the name

Create a Problem instance

psamm.lpsolver.generic.filter_solvers(solvers, requirements)

Yield solvers that fullfil the requirements.


Entry point for listing available solvers.


Parse a string containing a solver setting