In [1]:
import logging

In [2]:
logging.basicConfig(level="DEBUG")

In [3]:
from cobra.test import create_test_model


DEBUG:optlang.util:Gurobi python bindings found at /home/moritz/.virtualenvs/cobra/lib/python3.5/site-packages/gurobipy
DEBUG:optlang.util:GLPK python bindings found at /home/moritz/.virtualenvs/cobra/lib/python3.5/site-packages/swiglpk
DEBUG:optlang.util:Mosek python bindings not available.
DEBUG:optlang.util:CPLEX python bindings found at /home/moritz/.virtualenvs/cobra/lib/python3.5/site-packages/cplex
DEBUG:optlang.util:Scipy solver not available
DEBUG:pip._internal.utils.misc:lzma module is not available
DEBUG:pip._internal.vcs:Registered VCS backend: git
DEBUG:pip._internal.vcs:Registered VCS backend: hg
DEBUG:pip._internal.vcs:Registered VCS backend: svn
DEBUG:pip._internal.vcs:Registered VCS backend: bzr

In [4]:
from cobra.flux_analysis import geometric_fba

In [5]:
model = create_test_model("textbook")

In [6]:
model.solver = "cplex"

In [7]:
logging.getLogger().setLevel(logging.DEBUG)

In [8]:
%time geometric_fba(model)


DEBUG:cobra.flux_analysis.geometric:Iteration: 1; delta: 4e-13; status: optimal.
CPU times: user 481 ms, sys: 0 ns, total: 481 ms
Wall time: 480 ms
Out[8]:
Optimal solution with objective value 0.000
fluxes reduced_costs
ACALD 0.000000 0.0
ACALDt 0.000000 0.0
ACKr 0.000000 0.0
ACONTa 6.007250 0.0
ACONTb 6.007250 0.0
... ... ...
TALA 1.496984 0.0
THD2 0.000000 0.0
TKT1 1.496984 0.0
TKT2 1.181498 0.0
TPI 7.477382 0.0

95 rows × 2 columns


In [9]:
model.solver = "gurobi"

In [10]:
%time geometric_fba(model)


DEBUG:cobra.flux_analysis.geometric:Iteration: 1; delta: 6.47e-12; status: optimal.
CPU times: user 504 ms, sys: 2.91 ms, total: 507 ms
Wall time: 505 ms
Out[10]:
Optimal solution with objective value 0.000
fluxes reduced_costs
ACALD 0.000000 0.000000e+00
ACALDt 0.000000 0.000000e+00
ACKr 0.000000 0.000000e+00
ACONTa 6.007250 0.000000e+00
ACONTb 6.007250 0.000000e+00
... ... ...
TALA 1.496984 2.220446e-16
THD2 0.000000 2.220446e-16
TKT1 1.496984 0.000000e+00
TKT2 1.181498 -1.110223e-16
TPI 7.477382 0.000000e+00

95 rows × 2 columns


In [11]:
model.solver = "glpk"

In [12]:
%time geometric_fba(model)


DEBUG:optlang.glpk_interface:Status undefined. GLPK status code returned by glp_simplex was 1
DEBUG:cobra.flux_analysis.geometric:Iteration: 1; delta: 2.96e-13; status: optimal.
CPU times: user 263 ms, sys: 3.46 ms, total: 267 ms
Wall time: 263 ms
Out[12]:
Optimal solution with objective value -0.000
fluxes reduced_costs
ACALD 1.495879e-14 2.914335e-16
ACALDt 1.495879e-14 0.000000e+00
ACKr 1.554312e-15 1.110223e-16
ACONTa 6.007250e+00 0.000000e+00
ACONTb 6.007250e+00 0.000000e+00
... ... ...
TALA 1.496984e+00 -1.665335e-15
THD2 5.789919e-14 0.000000e+00
TKT1 1.496984e+00 1.665335e-16
TKT2 1.181498e+00 -2.220446e-16
TPI 7.477382e+00 0.000000e+00

95 rows × 2 columns