Open sirno opened 3 years ago
Yes that is definitely not perfect. I would say it's more a limitation with gurobipy though since they don't provide native serialization like cplex for example: https://groups.google.com/g/gurobi/c/fwLRrWLLJqo. Adjusting the ids in the state setter and getter would work but that would have to be done in optlang.
This would be another place where it'd be great to maintain the SBML IDs and use those since the R_
and M_
prefixes commonly used would avoid this problem and still allow for easy manual inspection of the LP format.
Yes indeed, I suppose one can manually turn of the replacement of those prefixes with f_replace=None
when loading SBML files.
For some models it is not possible to apply
deepcopy
, because the reaction names may match reserved names of the gurobi LP format—see gurobi docs:This happens with sulfur diffusion, see bigg reaction 🤷♀️
Although this problem is related to the way
optlang
sets the state in itsgurobi
interface, I suppose this is still a cobrapy issue... sort of