Skip to content
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

Changing objective function for optimization in COBRAME #36

Open
sumanasri opened this issue Feb 17, 2020 · 0 comments
Open

Changing objective function for optimization in COBRAME #36

sumanasri opened this issue Feb 17, 2020 · 0 comments

Comments

@sumanasri
Copy link

Hi,I would like to change the objective function from maximize biomass to ATPM in COBRAME. Just changing the objective_coefficient as follows results in a an error where me.solution is NOTYPE. How do we change the objective function?

me.reactions.dummy_reaction_FWD_SPONT.objective_coefficient = 0
me.reactions.ATPM.objective_coefficient = 1

in solve_me_model(me, max_mu, precision, min_mu, using_soplex, compiled_expressions)
11 # Use bisection for now (until the NLP formulation is worked out)
12 muopt, hs, xopt, cache = me_nlp.bisectmu(precision=precision, mumax=max_mu)
---> 13 me.solution.f = me.solution.x_dict['ATPM']
14
15 def show_escher_map(me, solution=None):

AttributeError: 'NoneType' object has no attribute 'x_dict'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant