SBRG/cobrame

Changing objective function for optimization in COBRAME

sumanasri opened this issue · 0 comments

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'