Closed mmundy42 closed 3 years ago
Mostly because it can not run pFBA because there is no defined optimum and CommunitySolution
also will choke if there are no optimal growth rates. Maybe would be better to raise an exception? Access to the solver object is still possible via Community.solver
, for example community.solver.status
will get you the optimization status. In my experience this usually fails if you define a minimum growth rate for one of the organisms that can not be achieved (in Community.optcom
this defaults to 0.1 which I think I should change). For instance calling com.optcom(min_growth=0.0)
usually fixes those problems...
That makes sense. I found what I was looking for in community.solver.status
.
Maybe you could add a raise_error
parameter and raise an OptimizationError when parameter is set to True.
Yeah that makes sense. Will reopen so I don't forget to make the changes...
Managed internally now by the workflows.
Just curious since there is additional information about what did not work in the cobrapy Solution object that could be returned. Or does it just not make sense to return a CommunitySolution object when the optimization did not work? I'm most interested in knowing what the solver status is.