Skip to content

Looping through Model Bounds for Different Conditions #1335

Closed Answered by cdiener
AmalReji asked this question in Q&A
Discussion options

You must be logged in to vote

It's not stochastic but you are trying to reproduce non-unique solutions and that will be hard. So basically your objective value is guaranteed to be unique but your fluxes are not since there may be many different flux solutions yielding an optimal value. The solver just picks whatever is easiest for the solver. When you optimize several times the previous solution is used to seed the solver which speeds it up but also can lead to the behavior you are seeing.

The assignment clean_model = model unfortunately does nothing. They both still point to the same object (Python assigns by reference). If you want to reinitialize your model in every iteration you can do something like for model.cop…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@AmalReji
Comment options

@cdiener
Comment options

Answer selected by AmalReji
@AmalReji
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants