-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
iMM904 Production Envelopes plot_flux_space #22
Comments
Hi Emanuel, This error is produced when straindesign attempts to plot the flux space and then fails because it cannot connect the calculated outlines of the flux space projection into a shape. This either happens if there are no solutions to the model or if some number of calculated solutions are invalid. The latter is the case here. This is definitely a bug since both fluxes, ethanol exchange and growth, have upper and lower bounds and the flux space within these boundaries is convex. I was able to reproduce your problem when using python 3.12. I tried it with python 3.10 instead, and all four solvers managed to produce a valid plot. Can you test your code with python 3.10 and different solvers (at least glpk and scip) and/or with different solvers in 3.12 and tell me if the problem persists? I should try to resolve the issue and if not possible, pin the python version for strain design to 3.10 (or 3.11) and below. |
Hi Philipp, Many thanks for your very prompt help! I'm actually using Python 3.10.12 and the Optlang GLPK solver. Could it be the version of the packages? I leave bellow the details of my environment.
|
Hi again. I just wanted to tell you that I'm working on a solution for this. There seem to be two problems, both with GLPK at their root. Problem one is that the solver selection for computing the production envelope is inconsistent and would pick GLPK for some things, even though a different solver was selected by the user. After fixing this, I would produce the right production envelope for gurobi, scip and cplex, but not yet for GLPK, so that's where I'm at. For the meantime, you might want to install gurobi or cplex and make it your model solver |
This fixes issue #22 by (1) making sure that plot_flux_space uses one solver consistently throughout all optimizations (2) GLPK tol_bnd was reset from 1e-9 to the default (1e-7). Hopefully that change won't have to be reversed, later.
This was fixed with my last commit, by simply increasing the bounding tolerance for GLPK. Hope that doesn't worsen other aspects of straindesign that involve GLPK. I will close this issue for now, fix the other issue, bump the version and make a new release. Please test and reopen this issue if the problem persists. |
I'm reopening this. Loosening the tolerance for GLPK breaks other parts of the package. Consider using SCIP, instead, for the time being. I will try to find a solution without changing GLPK tolerances. Thank you again for raising the issue. This really helps to improve StrainDesign :) |
Hi, I got the following problem running plot_flux_space function on the iMM904 model (no modification from the BiGG). Am I missing any argument? Thank you in advance and beautiful module!
Empty plot and several warnings:
WARNING:root:Computing matrix rank or Delaunay simplices failed.
The text was updated successfully, but these errors were encountered: