NLPobjPerFlux Calculates the value of the objective v_obj/sum(v.^2) based on a flux distribution value = NLPobjPerFlux(fluxVector,Prob) This function is meant to be used with NLP solvers INPUTS fluxVector Flux vector Prob NLP problem structure OUTPUT value Objective flux / v.^2 Markus Herrgard 12/7/07 c wasn't defined as written so added Prob as input to define c from the model by Daniel Zielinski 3/19/10
0001 function value = NLPobjPerFlux(fluxVector,Prob) 0002 %NLPobjPerFlux Calculates the value of the objective v_obj/sum(v.^2) based on 0003 %a flux distribution 0004 % 0005 % value = NLPobjPerFlux(fluxVector,Prob) 0006 % 0007 % This function is meant to be used with NLP solvers 0008 % 0009 %INPUTS 0010 % fluxVector Flux vector 0011 % Prob NLP problem structure 0012 % 0013 %OUTPUT 0014 % value Objective flux / v.^2 0015 % 0016 % Markus Herrgard 12/7/07 0017 % 0018 % c wasn't defined as written so added Prob as input to define c from the 0019 % model by Daniel Zielinski 3/19/10 0020 0021 model = Prob.user.model; 0022 0023 c = model.c == 1; 0024 0025 value = -sum(c.*fluxVector)/sum(fluxVector.^2);