biosustain / cameo

cameo - computer aided metabolic engineering & optimization
http://cameo.bio
Apache License 2.0
114 stars 44 forks source link

optlang.exceptions.SolverError #209

Closed hongzhonglu closed 6 years ago

hongzhonglu commented 6 years ago

Hi, today when I run: import optlang from cameo.api import design design(product='L-Serine')

I meet the followed error: Traceback (most recent call last): File "/usr/local/lib/python3.6/site-packages/optlang/cplex_interface.py", line 795, in _optimize self.problem.solve() File "/Users/luho/Library/Python/3.6/lib/python/site-packages/cplex/init.py", line 1099, in solve _proc.mipopt(self._env._e, self._lp) File "/Users/luho/Library/Python/3.6/lib/python/site-packages/cplex/_internal/_procedural.py", line 629, in mipopt check_status(env, status) File "/Users/luho/Library/Python/3.6/lib/python/site-packages/cplex/_internal/_procedural.py", line 303, in call raise CplexSolverError(error_string, env, status) cplex.exceptions.errors.CplexSolverError: CPLEX Error 1016: Promotional version. Problem size limits exceeded.

Can you help me find the reason? Great thanks!

Midnighter commented 6 years ago

CPLEX Error 1016: Promotional version. Problem size limits exceeded.

It seems that you are running a trial version of CPLEX which limits the allowed size of the problems. Coming up with a design for a product includes searching the universal database of reactions for potential heterologous pathways and thus introduces a large number of variables exceeding the allowed size.

There are a few things you can do:

  1. IBM offers a free full version for academics and so does Gurobi. If you are working at a university or the like, please install one of those.
  2. If you are comfortable with going a bit more low level. You can first find heterologous pathways using GLPK and then check if your model is small enough to run OptKnock or OptGene with CPLEX. If you want to go this route, please ask us for details.
  3. You can uninstall CPLEX from your Python environment and only use GLPK. This will be much slower I'm afraid.
hongzhonglu commented 6 years ago

@Midnighter Great thanks!